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 | |
---|
6 | |
---|
7 | CKEDITOR.editorConfig = function (config) { |
---|
8 | // Define changes to default configuration here. |
---|
9 | // For complete reference see: |
---|
10 | // http://docs.ckeditor.com/#!/api/CKEDITOR.config |
---|
11 | |
---|
12 | // The toolbar groups arrangement, optimized for two toolbar rows. |
---|
13 | config.toolbar = [ |
---|
14 | { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] }, |
---|
15 | { name: 'editing', items: [ 'Scayt' ] }, |
---|
16 | { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, |
---|
17 | { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] }, |
---|
18 | { name: 'tools', items: [ 'Maximize'] }, |
---|
19 | '/', |
---|
20 | { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }, |
---|
21 | { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] }, |
---|
22 | '/', |
---|
23 | { name: 'styles', items: [ 'Styles', 'Format', 'Font', 'FontSize' ] }, |
---|
24 | { name: 'colors', items: [ 'TextColor', 'BGColor' ] }, |
---|
25 | { name: 'document', items: [ 'Source'] }, |
---|
26 | { name: 'mode' } |
---|
27 | ]; |
---|
28 | |
---|
29 | config.extraPlugins = 'scayt,justify,font,colorbutton,sourcearea,menu,menubutton'; |
---|
30 | config.scayt_autoStartup = true; |
---|
31 | config.allowedContent = true; //do not filter the html (iframes, inline attributes, classes, etc) |
---|
32 | |
---|
33 | // Remove some buttons provided by the standard plugins, which are |
---|
34 | // not needed in the Standard(s) toolbar. |
---|
35 | //config.removeButtons = 'Underline,Subscript,Superscript'; |
---|
36 | |
---|
37 | // Set the most common block elements. |
---|
38 | //config.format_tags = 'p;h1;h2;h3;pre'; |
---|
39 | |
---|
40 | // Simplify the dialog windows. |
---|
41 | //config.removeDialogTabs = 'image:advanced;link:advanced'; |
---|
42 | |
---|
43 | //number of spaces to add when tab is hit |
---|
44 | config.tabSpaces = 4; //this currently removes the TAB/SHIFT+TAB behavior from table cells (not sure if there's a work-around for that - the old editor behaves similarly so I think we're ok) |
---|
45 | |
---|
46 | //use a <br> instead of <p> while hitting the ENTER key |
---|
47 | //http://stackoverflow.com/a/8098960/556142 |
---|
48 | config.enterMode = CKEDITOR.ENTER_BR; |
---|
49 | config.shiftEnterMode = CKEDITOR.ENTER_P; //we'll swap the behavior and have SHIFT+ENTER be double spacing |
---|
50 | |
---|
51 | //http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-pasteFromWordCleanupFile |
---|
52 | config.pasteFromWordPromptCleanup = true; |
---|
53 | config.pasteFromWordCleanupFile = '/jquery/ckeditor/plugins/pastefromword/filter/default.js'; //we can't bundle the pastefromword plugin it gets added here |
---|
54 | config.pasteFromWordRemoveFontStyles = false; |
---|
55 | config.pasteFromWordNumberedHeadingToList = true; |
---|
56 | config.pasteFromWordRemoveStyles = true; |
---|
57 | |
---|
58 | config.toolbarLocation = "bottom"; |
---|
59 | }; |
---|