Skip to content

Paragraph Format Plugin

Allows users to change the type of a paragraph:

use normal paragraphs, write some code or just highlight ideas using headings.


Plugin options:

paragraphDefaultSelection
String -
The default option to select for Paragraph Format.

Default: 'Paragraph Format'
paragraphFormat
Object -
An Object with the options that will appear in the Paragraph Format dropdown from the toolbar. Where 'N' tag will be treated as a when the enter option is set to FroalaEditor.ENTER_P and as a
when the enter option is set to FroalaEditor.ENTER_DIV.

Default:
{
N: 'Normal',
H1: 'Heading 1',
H2: 'Heading 2',
H3: 'Heading 3',
H4: 'Heading 4',
PRE: 'Code'
}
paragraphFormatSelectiont
Boolean -
The Paragraph Format button from the WYSIWYG editor's toolbar is replaced with a dropdown showing the actual paragraph format name for the current text selection.

Default: false

Plugin methods:

paragraphFormat.apply (value)
returns: Object
Change the format of the selected paragraphs.
● value: The format value to apply.
Type: String

Add Plugin to your code:

Plugin name: paragraphFormat

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

Or from CDN https://cdn.jsdelivr.net/npm/froala-editor@latest/js/plugins/paragraph_format.min.js

Plugin CSS link:


File: 15732