|
| 1 | +/*============================================================================================================================== |
| 2 | +| Author Ignia, LLC |
| 3 | +| Client Ignia, LLC |
| 4 | +| Project OnTopic Editor |
| 5 | +\=============================================================================================================================*/ |
1 | 6 | /* |
2 | 7 | Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. |
3 | 8 | For licensing, see LICENSE.html or http://ckeditor.com/license |
4 | 9 | */ |
5 | 10 |
|
| 11 | +/*============================================================================================================================== |
| 12 | +| METHOD: EDITOR CONFIG |
| 13 | +\-----------------------------------------------------------------------------------------------------------------------------*/ |
| 14 | +/** |
| 15 | + * Provides configuration settings for CKEditor. |
| 16 | + */ |
6 | 17 | CKEDITOR.editorConfig = function( config ) { |
7 | | -//Define changes to default configuration here. For example: |
8 | | -//config.language = 'fr'; |
9 | | -//config.uiColor = '#AADC6E'; |
10 | | -//config.extraPlugins = 'a11ychecker'; |
11 | | - config.removePlugins = 'autosave'; |
| 18 | + config.removePlugins = 'autosave,scayt'; |
12 | 19 | config.allowedContent = true; |
13 | 20 | config.baseHref = '/'; |
14 | 21 | config.skin = 'moono-lisa'; |
15 | | -//config.uiColor = '#CFCFCF'; |
16 | | -//config.height = '515px'; |
17 | | -//config.resize_maxHeight = '800'; |
18 | 22 | config.resize_maxWidth = '800'; |
19 | 23 | config.fillEmptyBlocks = false; |
20 | 24 | config.shiftEnterMode = CKEDITOR.ENTER_BR; |
21 | 25 | config.contentsCss = '/_content/OnTopic.Editor.AspNetCore/Shared/Styles/CKEditor.css'; |
| 26 | + config.disableNativeSpellChecker = false; |
22 | 27 | config.toolbar = [ |
23 | | - { name: 'document', items: [ 'Source' ] }, |
24 | | - { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', '-', 'Undo', 'Redo' ] }, |
25 | | - { name: 'blocks', items: [ 'ShowBlocks', 'RemoveFormat' ] }, |
26 | | - { name: 'editing', items: [ 'Scayt' ] }, |
27 | | - { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] }, |
28 | | - { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] }, |
| 28 | + { |
| 29 | + name : 'document', |
| 30 | + items : ['Source'] |
| 31 | + }, |
| 32 | + { |
| 33 | + name : 'clipboard', |
| 34 | + items : ['Undo', 'Redo', '-', 'Cut', 'Copy', 'Paste'] |
| 35 | + }, |
| 36 | + { |
| 37 | + name : 'blocks', |
| 38 | + items : ['ShowBlocks', 'RemoveFormat'] |
| 39 | + }, |
| 40 | + { |
| 41 | + name : 'links', |
| 42 | + items : ['Link', 'Unlink', 'Anchor'] |
| 43 | + }, |
| 44 | + { |
| 45 | + name : 'insert', |
| 46 | + items : ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] |
| 47 | + }, |
29 | 48 | '/', |
30 | | - { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] }, |
31 | | - { name: 'position', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', '-', 'Outdent', 'Indent' ] }, |
32 | | - { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Blockquote' ] }, |
33 | | - '/', |
34 | | - { name: 'styles', items: ['Styles', 'Format'] }, |
35 | | - { name: 'tools', items: [ 'Find', 'Replace', 'SelectAll', 'Maximize' ] } |
| 49 | + { |
| 50 | + name : 'styles', |
| 51 | + items : ['Format'] |
| 52 | + }, |
| 53 | + { |
| 54 | + name : 'basicstyles', |
| 55 | + items : ['Bold', 'Italic', 'Strike', 'Subscript', 'Superscript'] |
| 56 | + }, |
| 57 | + { |
| 58 | + name : 'position', |
| 59 | + items : ['JustifyLeft', 'JustifyCenter', 'JustifyRight'] |
| 60 | + }, |
| 61 | + { |
| 62 | + name : 'paragraph', |
| 63 | + items : ['NumberedList', 'BulletedList', 'Outdent', 'Indent', '-', 'Blockquote'] |
| 64 | + }, |
| 65 | + { |
| 66 | + name : 'tools', |
| 67 | + items : ['Find', 'Replace', 'SelectAll', 'Maximize'] |
| 68 | + } |
36 | 69 | ]; |
37 | 70 | config.toolbarCanCollapse = true; |
38 | | - config.toolbar_Full = [ |
39 | | - ['Source','-','Save','NewPage','Preview','-','Templates'], |
40 | | - ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], |
41 | | - ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], |
42 | | - ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], |
43 | | - '/', |
44 | | - ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'], |
45 | | - ['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'], |
46 | | - ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], |
47 | | - ['Link','Unlink','Anchor'], |
48 | | - ['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'], |
49 | | - '/', |
50 | | - ['Styles','Format','Font','FontSize'], |
51 | | - ['TextColor','BGColor'], |
52 | | - ['Maximize', 'ShowBlocks','-','About'] |
53 | | - ]; |
54 | | - config.toolbar_Basic = [ |
55 | | - ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About'] |
56 | | - ]; |
57 | | - config.toolbar_OnTopic = [ |
58 | | - ['Preview','Source','Undo','Redo','ShowBlocks','RemoveFormat'], |
59 | | - ['Bold','Italic','Cut','Copy','Paste','PasteText','Scayt'], |
60 | | - ['Styles'], //,'Format' |
61 | | - '/', |
62 | | - ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','Outdent','Indent'], |
63 | | - ['NumberedList','BulletedList','Link','Unlink','Anchor'], |
64 | | - ['CreateDiv','Image','Table','HorizontalRule','SpecialChar'], |
65 | | - ['Find','Replace','SelectAll','Maximize'], |
66 | | - ]; |
67 | | -//Set font names |
68 | | - config.font_names = |
69 | | - 'Tahoma/Tahoma, Arial/Arial, sans-serif;' + |
70 | | - 'Times New Roman/Times New Roman, Times, serif;' + |
71 | | - 'Verdana'; |
72 | | -//Call external styles set definition for Styles dropdown menu |
73 | | - config.stylesCombo_stylesSet = 'OnTopicStyleSet:/_content/OnTopic.Editor.AspNetCore/Shared/Scripts/CkEditor/StylesSet.js'; |
74 | | -//Set classes for styles defined in styles set |
75 | 71 | config.bodyClass = 'CKEPanel'; |
76 | | - |
77 | 72 | }; |
78 | 73 |
|
| 74 | +/*============================================================================================================================== |
| 75 | +| METHOD: INSTANCE READY |
| 76 | +\-----------------------------------------------------------------------------------------------------------------------------*/ |
| 77 | +/** |
| 78 | + * Provides late binding rules to initialize once the editor instance is ready. |
| 79 | + */ |
79 | 80 | CKEDITOR.on('instanceReady', function (ev) { |
80 | 81 | var blockTags = ['div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'pre', 'ul', 'ol', 'li', 'br']; |
81 | 82 | var rules = { |
|
0 commit comments