So I’m using TinyMCE and I’d like to allow the user to change the Font Size to one predefined size (larger).
I’ve managed to do that with this custom setting:
font_size_style_values: "large,x-small,small,medium,large,x-large,xx-large",
theme_advanced_font_sizes: "1",
However, in the font size select drop down list, the text that appears is “1 (8pt)”, which is not very user friendly.
I’d like to change this to “large”, or anything really. Any ideas?
Here are my complete custom settings, if that helps:
tinyMCE.init({
mode: "exact",
elements: "Details", // "EventDetails_Directions, EventDetails_Details"
width: "673",
height: "320",
theme: "advanced",
plugins: "paste, media",
autocomplete: "off",
convert_fonts_to_spans : true,
theme_advanced_buttons1: "bold,italic,underline,justifyleft,justifycenter,fontsizeselect,link,unlink,image,bullist,separator,undo,redo,code",
theme_advanced_buttons2: "",
theme_advanced_buttons3: "",
font_size_style_values: "large,x-small,small,medium,large,x-large,xx-large",
theme_advanced_font_sizes: "1",
paste_auto_cleanup_on_paste: true,
paste_remove_styles: true,
paste_retain_style_properties: "none",
paste_strip_class_attributes: "all",
paste_preprocess: function(p1, o) {
o.content = replaceWordChars(o.content);
},
content_css: "/ClientControlRoom/assets/css/tinymce_custom.css"
});
The theme_advanced_font_sizes config option since TinyMCE 3.2 has allowed you to map a text value to the font size (pixel or relative) or a class.
So if you only want one option (“large”) for you users in the drop down, you could have
or, if you are using relative sizes simple