javascriptcleditor

add a custom font to jquery CLeditor


I use http://premiumsoftware.net/cleditor in my projects and there is some font shown by default in font drop down list, now i have a font and want to use this font in cleditor font list and when user pick this font the font css apply to it.

enter image description here


Solution

  • As with most plugins there are options exposed and fonts is one property that you can set when you initialize plugin

    $("#input").cleditor({               
                fonts: // font names in the font popup
                    "Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," +
                    "Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana"
    })
    

    See Optional Parameters in Getting STarted