Answer the question
In order to leave comments, you need to log in
How to make compact font and font size change button in Tinymce 4?
Hello! In the Tinymce 4 editor, by default, changing the font and font size is done in the drop-down list as HERE . It is not very compact, especially takes up a lot of space on mobile phones. How to make icons instead of a drop-down list, like the rest of the blocks? Found on a third party forum and took screenshots for clarity. I did the initialization like this:
plugins: [
"advlist autolink lists link image preview anchor responsivefilemanager",
"code fullscreen save textcolor colorpicker charmap nonbreaking",
"insertdatetime media table contextmenu paste imagetools stylebuttons"
],
toolbar_items_size : 'small',
menubar:'edit insert format table',
toolbar1: "undo redo | fontselect fontsizeselect forecolor backcolor | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist | link unlink image media | removeformat fullscreen code",
Answer the question
In order to leave comments, you need to log in
Make a separate button for each size, or use a self-made plug-in that will open a modal with a choice of font size and apply it to the selected area. Documentation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question