Reputation: 3346
Any ideas how to make the CKEditor font size combo-box editable to allow a custom font size?
Or how can I add my own font size control instead of the combo-box?
For example, I want to replace the combo-box with an input.
Upvotes: 2
Views: 712
Reputation: 3151
I'm not aware of a way for the user to enter a custom font size, but you can use fontSize_sizes
configuration property to alter the default font sizes that are presented to the user.
From docs:
The list of fonts size to be displayed in the Font Size combo in the toolbar. Entries are separated by semi-colons (';').
Any kind of "CSS like" size can be used, like '12px', '2.3em', '130%', 'larger' or 'x-small'.
A display name may be optionally defined by prefixing the entries with the name and the slash character. For example, 'Bigger Font/14px' will be displayed as 'Bigger Font' in the list, but will be outputted as '14px'.
config.fontSize_sizes = '16/16px;24/24px;48/48px;';
config.fontSize_sizes = '12px;2.3em;130%;larger;x-small';
config.fontSize_sizes = '12 Pixels/12px;Big/2.3em;30 Percent More/130%;Bigger/larger;Very Small/x-small';
Upvotes: 1