Days
Hours
Minutes
Seconds
x

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

Skip to content
Froala Documentation

Font Size Plugin

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

Allows users to change the font size with pixel precision. No more "small", "medium", "large" and nothing between them.


Plugin options:

fontSizeSelection
Boolean -
The Font Size button from the WYSIWYG editor's toolbar is replaced with a dropdown showing the actual font size value for the current text selection.
Default: false
fontSize
Array -
Defines the font sizes that appear under the Font Size button from the rich text editor's toolbar.
Default: ['8', '9', '10', '11', '12', '14', '18', '24', '30', '36', '48', '60', '72', '96']
fontSizeDefaultSelection
String -
The text to display when the font size is unknown or nothing is selected.
Default: '12'
fontSizeUnit
String -
The unit to be used for the font size.
Default: 'px'

Plugin methods:

fontSize.apply (value)
returns: Object
Set the font size of the selected text.
โ— value: The value of the font size. Type: String

Add Plugin to your code:

Plugin name: fontSize

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

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

Plugin CSS link:

Ready to dive in? Explore our plans

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.