Skip to content Skip to sidebar Skip to footer

Changing Font Size Options On WYSIWYG Editor?

So I have a bootstrap wysiwyg editor from a jqueryscript.net plugin and I'm trying to give more font options in the font size dropdown. So I went into the JS and found the var for

Solution 1:

Following the solution to this question, I've created a custom function for replacing <font size="7"> with CSS of the selected font size.

'font_size': { "select":true,
    "default": "Font size",
    "tooltip": "Font Size",
    "commandname":"fontSize", 
    "custom":function(button){
        document.execCommand("fontSize", false, "7");
        $("#contentarea font[size]").removeAttr("size")
            .css("font-size", $(button).data('value'));
    }
}

JSFiddle: http://jsfiddle.net/wfaLa3h0/6/


Post a Comment for "Changing Font Size Options On WYSIWYG Editor?"