Days
Hours
Minutes
Seconds
x

Froala Editor v4.2.1 is HereLEARN MORE

Skip to content

Code Beautifier Plugin

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: