Skip to content

Paragraph Style Plugin

Allows users to choose a style for the selected paragraph inside the WYSIWYG HTML editor.


Plugin options:

paragraphStyles
Object -
Set custom styles for the selected paragraph. The classes should be defined in CSS, otherwise no changes will be visible on the paragraph's appearance.
Default:
{
'fr-text-gray': 'Gray',
'fr-text-bordered': 'Bordered',
'fr-text-spaced': 'Spaced',
'fr-text-uppercase': 'Uppercase'
}
paragraphMultipleStyles
Boolean -
Allows multiple paragraph styles to be selected at a time.

Default: true

Plugin methods:

paragraphStyle.apply (value)
returns: Object
Style the selected paragraphs using CSS classes.
● value: The class to apply.
Type: String

Add Plugin to your code:

Plugin name: paragraphStyle

Plugin JS Script: ../js/plugins/paragraph_style.min.js

Or from CDN https://cdn.jsdelivr.net/npm/[email protected]/js/plugins/paragraph_style.min.js

Plugin CSS link:


Example :

● Paragraph Styles