How to add a new font into the CK Editor

HelenaG Grulichova asked on February 23, 2012 01:42

How to add a new font into the CK Editor

Correct Answer

HelenaG Grulichova answered on February 23, 2012 01:42

If you want to add a new font into the drop-down list of fonts in the CK Editor, you need to add the definition of that font into the ckeditor.js file, which is located in the ~\CMSAdminControls\CKeditor\ directory. However, the content of the file is minimized so it is difficult to navigate there. The code where you can make changes to fonts is on line 57 and it looks like this:

i.font_names='New font/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif';

where the format of font definition is:

Title/Font style definition;
0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.