Ticket #16873: builder-config.2.js

File builder-config.2.js, 4.3 KB (added by abayob, 7 years ago)

builder-config version 4.6.2

Line 
1/**
2 * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
4 */
5
6CKEDITOR.editorConfig = function( config ) {
7        // Define changes to default configuration here. For example:
8        // config.language = 'fr';
9        // config.uiColor = '#AADC6E';
10
11    // config.toolbarGroups = [
12    //     { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
13    //     { name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
14    //     { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
15    //     { name: 'forms', groups: [ 'forms' ] },
16    //     { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
17    //     { name: 'paragraph', groups: [ 'list', 'indent', 'align', 'blocks', 'bidi', 'paragraph' ] },
18    //     { name: 'links', groups: [ 'links' ] },
19    //     { name: 'insert', groups: [ 'insert' ] },
20    //     { name: 'styles', groups: [ 'styles' ] },
21    //     { name: 'colors', groups: [ 'colors' ] },
22    //     { name: 'tools', groups: [ 'tools' ] },
23    //     { name: 'others', groups: [ 'others' ] },
24    //     { name: 'about', groups: [ 'about' ] }
25    // ];
26    //
27   
28    config.toolbar = [
29        { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', '-', 'Undo', 'Redo' ] },
30        { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] },
31        { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'Blockquote' ] },
32        { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] },
33        { name: 'insert', items: [ 'Image', 'HorizontalRule', 'SpecialChar', 'Butane', 'Loremipsum'] },
34        { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize', 'lineheight'] },
35        { name: 'colors', items: [ 'TextColor', 'BGColor' ] }
36    ];
37
38    // StylesSet config of Abayo1.0
39    // config.stylesSet = [
40    // { name: 'Strong Emphasis', element: 'strong' },
41    // { name: 'Emphasis', element: 'em' },
42    // { name: 'Heading 1', element: 'h1' },
43    // { name: 'Heading 2', element: 'h2' },
44    // { name: 'Heading 3', element: 'h3' },
45    // { name: 'Heading 4', element: 'h4' },
46    // { name: 'Heading 5', element: 'h5' },
47    // { name: 'Heading 6', element: 'h6' },
48    // { name: 'lead', element: 'p', attributes: { 'class': 'lead' }},
49    // ];
50
51
52    config.removeButtons = 'PasteFromWord,Source,Save,Templates,NewPage,Preview,Print,Replace,Find,SelectAll,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CreateDiv,BidiLtr,BidiRtl,Language,Flash,Table,Smiley,PageBreak,Iframe,Maximize,ShowBlocks,About';
53
54
55    config.extraPlugins = 'sharedspace,lineheight,butane,iconfont,loremipsum'; 
56    config.removePlugins = 'maximize,resize,floatingspace,magicline';
57
58    // config.extraPlugins = 'lineutils,widget,butane,placebo,lineheight,fontawesome';
59    // config.removePlugins = 'magicline,ckeditor-gwf-plugin,gwfplugin';
60
61    config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;13/13px;14/14px;15/15px;16/16px;18/18px;20/20px;21/21px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px;';
62    config.line_height = '1;1.1;1.2;1.3;1.4;1.5;1.6;1.7;1.8;1.9;2;3';
63    config.font_names = 'Open Sans (Default)/\'Open Sans\', sans-serif;' + config.font_names;
64
65    //Remove all CSS by entering as plain text
66    config.enterMode = CKEDITOR.ENTER_BR;
67    config.shiftEnterMode = CKEDITOR.ENTER_BR;
68    config.forcePasteAsPlainText = false;
69   
70
71    // config.protectedSource.push(/<(i|h1|h2|h3|h4|h5|h6)[^>]*><\/(i|h1|h2|h3|h4|h5|h6)>/g);
72   
73    config.allowedContent = true;
74    // config.extraAllowedContent = 'p(*)[*]{*};div(*)[*]{*};li(*)[*]{*};ul(*)[*]{*};h1(*)[*]{*};h2(*)[*]{*};h3(*)[*]{*};h4(*)[*]{*};h5(*)[*]{*};h6(*)[*]{*}';
75
76    // CKEDITOR.dtd.$removeEmpty['i']  = false;
77    // CKEDITOR.dtd.$removeEmpty['h1'] = false;
78    // CKEDITOR.dtd.$removeEmpty['h2'] = false;
79    // CKEDITOR.dtd.$removeEmpty['h3'] = false;
80    // CKEDITOR.dtd.$removeEmpty['h4'] = false;
81    // CKEDITOR.dtd.$removeEmpty['h5'] = false;
82    // CKEDITOR.dtd.$removeEmpty['span'] = false;
83};
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy