CKEDITOR.editorConfig = function( config ) |
2 | { |
3 | //是否強制複製來的內容去除格式 plugins/pastetext/plugin.js |
4 | config.scayt_autoStartup = false; |
5 | config.forcePasteAsPlainText =false //不去除 |
6 | config.enterMode = CKEDITOR.ENTER_BR; |
7 | config.shiftEnterMode = CKEDITOR.ENTER_P; |
8 | config.font_defaultLabel = '微軟正黑體';//默認的字體名 |
9 | config.font_names = '微軟正黑體;新細明體;標楷體;Arial;New Roman;Verdana;Geneva,sans-serif'; |
10 | config.fontSize_sizes ='8/8px;10/10px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'; |
11 | //設置字體大小時 使用的式樣 |
12 | config.fontSize_style = { |
13 | element : 'font', |
14 | styles : { 'font-size' : '#(size)' }, |
15 | overrides : [ { element : 'font', attributes : { 'size' : null } } ] |
16 | }; |
17 |
18 | config.toolbar = 'Re'; |
19 | config.toolbar_Re = |
20 | [ |
21 | ['Source','RemoveFormat','Maximize', 'ShowBlocks'], |
22 | ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], |
23 | ['Link','Unlink'], |
24 | ['Image','Table','HorizontalRule','Smiley'], |
25 | '/', |
26 | ['Bold','Italic','Underline','Strike','-','NumberedList','BulletedList','-','Blockquote'], |
27 | ['Styles','Format','Font','FontSize'], |
28 | ['TextColor','BGColor'], |
29 | ]; |
30 |
31 | config.toolbar = 'Full'; |
32 | config.toolbar_Full = |
33 | [ |
34 | ['Source','RemoveFormat','Maximize', 'ShowBlocks'], |
35 | ['-','Save','Preview','Templates'], |
36 | ['Cut','Copy','Paste','PasteText','PasteFromWord',], |
37 | ['Undo','Redo','-','Find','Replace','-','SelectAll'], |
38 | ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton'], |
39 | ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar'], |
40 | '/', |
41 | ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], |
42 | ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'], |
43 | ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], |
44 | ['Link','Unlink','Anchor'], |
45 |
46 | ['Styles','Format','Font','FontSize'], |
47 | ['TextColor','BGColor'], |
48 |
49 | ]; |
50 | config.toolbarStartupExpanded = true; |
51 | //工具欄默認是否展開 |
52 | }; |