Custom tinymce font size entered in font size list
I know how to increase the font size in TinyMCE, but I would like to add an option where the user can enter their own font size values.
I am currently using this parameter in the tinyMCE initialization function:
theme_advanced_font_sizes :
"8=8px,10=10px,12=12px,14=14px,16=16px,18=18px,20=20px,22=22px,24=24px,26=26px,28=28px,30=30px,32=32px,34=34px,36=36px,38=38px,40=40px,42=42px,44=44px,46=46px,48=48px,50=50px,52=52px,54=54px,56=56px,58=58px,60=60px,62=62px,64=64px,66=66px,68=68px,70=70px,72=72px,74=74px,76=76px,78=78px,80=80px",
But what if the user wants to use 12.5? So I want it to be something like an input-select box, not just a select box.
I mean, like in MS Word, sort of like an input selection control:
How can we add this control or modify an existing one to turn it into this?
source to share
Due to the fact that this parameter is read when the editor is initialized, you will need to create a string for theme_advanced_font_sizes
before starting the editor. Another way is to re-install the edit using this option. After the user selects the desired option, you turn off tinymce and re-enable it. For configuration, this will do:
theme_advanced_font_sizes : "8=8px,10=10px,12=12.5px ..."
source to share