配置CKEditor顯示的圖示及配置

萍兒發表於2012-11-21

在config.js檔案中

(1)顯示自定義圖示

config.toolbar_Full =
[
   //['Source','-','Save','NewPage','Preview','-','Templates'],
   ['Source','-','NewPage','Preview','-','Templates'],
   ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'],
   ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
   ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
   '/',
   ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
   ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
   ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
   ['Link','Unlink','Anchor'],
   ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
   '/',
   ['Styles','Format','Font','FontSize'],
   ['TextColor','BGColor'],
   ['Maximize', 'ShowBlocks','-','About']
];
config.language = 'zh-cn';//設定中文語言
(2)顯示全部圖示(或者可以省略)
config.toolbar_Basic =
[
   ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']
];

(3)定義顯示框的大小

     config.width =700;

     config.height = 300;

(4)編輯器顏色

     config.uiColor = '#AADC6E';//編輯器顏色

 (5)字型

    config.font_names = '宋體;楷體_GB2312;新宋體;黑體;隸書;幼圓;微軟雅黑;Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana';

};

相關文章