Days
Hours
Minutes
Seconds
x

New Froala Editor v5.0.0 is here โ€“ Learn More

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:

Sign up

Download the code by signing up for our newsletter

Sign up

Download the code by signing up for our newsletter

Note: By registering, you confirm that you agree to the processing of your personal data by Froala, Inc. - Froala as described in the Privacy Statement. Froala, Inc. - Froala is part of the Idera group and may share your information with its parent company Idera, Inc., and its affiliates. For further details on how your data is used, stored, and shared, please review our Privacy Statement.