...
Days
Hours
Minutes
Seconds
x
Skip to content
Froala Documentation

Code Beautifier Plugin

Plugins are fully functional during your trial once you've added your trial key to the setup.

Beautifies the code inside the code view mode.


Plugin options:

codeBeautifierOptions
Object
Specify the options for Code Beautifier.
Default:
{
end_with_newline: true,
indent_inner_html: true,
extra_liners: "['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'pre', 'ul', 'ol', 'table', 'dl']",
brace_style: 'expand',
indent_char: '\t',
indent_size: 1,
wrap_line_length: 0
}

Add Plugin to your code:

Plugin name: codeBeautifier

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

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

Plugin CSS link: _


Example:

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.