8

Does anyone know how to customize (add or remove) fonts in the CKEditor 3.x series? I looked all over and I can't figure out how. Supposedly there is a /plugin/fonts folder but it does not exist in 3.5+ of CKEditor.

Jeromy French
  • 11,372
  • 13
  • 67
  • 119
kidcapital
  • 4,754
  • 8
  • 43
  • 65

1 Answers1

16

The fonts in the font menu are configured using CKEDITOR.config.font_names:

<static> {String} CKEDITOR.config.font_names

The list of fonts names to be displayed in the Font combo in the toolbar. [...]

So all you need to do is set font_names in your configuration to the font names you want, for example:

config.font_names =
    'Arial/Arial, Helvetica, sans-serif;' +
    'Times New Roman/Times New Roman, Times, serif;' +
    'Verdana';

Will give you these font names in the menu:

  • Arial
  • Times New Roman
  • Verdana
mu is too short
  • 396,305
  • 64
  • 779
  • 743
  • 4
    thanks. in addition i added CKEDITOR.config.font_names so i get all of them, eg. config.font_names = CKEDITOR.config.font_names + "NewFont" – kidcapital Jun 18 '11 at 21:23