Thursday, July 18, 2013

Config default and customize Font in CKEDITOR

Selecting the default font name in drop-down.

config.font_defaultLabel = 'Arial';  /* Enter your favorite font name here */

And make your own css file and link it to creditor as following in config.js file:

config.contentsCss = 'css/mine.css';

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

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

config.js

CKEDITOR.editorConfig = function( config )
{
    // Define changes to default configuration here. For example: 
    //config.language = 'fr'; 
    config.uiColor = '#FCFFEB'; 
    config.enterMode = CKEDITOR.ENTER_BR; 
    config.extraPlugins = "imageUploader,tableoperations";
    config.pasteFromWordRemoveFontStyles = false;
    config.disableNativeSpellChecker = false;
    config.font_defaultLabel = "Lucida Sans Unicode";
    config.contentsCss = BASE_URL + 'js/common/ckeditor/mine.css';
}; 

No comments:

Post a Comment