Skip to content

Font Size Plugin

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

Plugin options:

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
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']
String -
The text to display when the font size is unknown or nothing is selected.
Default: '12'
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[email protected]/js/plugins/font_size.min.js

Plugin CSS link: