From 7f9ad75257c059eb90ffe0c268e4224eb22a8794 Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Sat, 21 Feb 2015 03:56:39 +0400 Subject: [PATCH] Additional ckeditor configurations --- dev/Common/Globals.js | 8 ++++++++ dev/Common/HtmlEditor.js | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/dev/Common/Globals.js b/dev/Common/Globals.js index cf5e999b1..c70e1839b 100644 --- a/dev/Common/Globals.js +++ b/dev/Common/Globals.js @@ -129,7 +129,15 @@ 'removeDialogTabs': 'link:advanced;link:target;image:advanced;images:advanced', 'extraPlugins': 'plain,signature', + 'allowedContent': true, + 'extraAllowedContent': true, + + 'forceEnterMode': true, + + 'autoParagraph': false, + 'fillEmptyBlocks': false, + 'ignoreEmptyParagraph': true, 'font_defaultLabel': 'Arial', 'fontSize_defaultLabel': '13', diff --git a/dev/Common/HtmlEditor.js b/dev/Common/HtmlEditor.js index 7a4bf479a..73e3fa328 100644 --- a/dev/Common/HtmlEditor.js +++ b/dev/Common/HtmlEditor.js @@ -267,6 +267,19 @@ window.CKEDITOR.env.isCompatible = true; } +// oConfig.allowedContent = { +// $1: { +// elements: window.CKEDITOR.dtd, +// attributes: true, +// styles: true, +// classes: true +// } +// }; +// +// oConfig.disallowedContent = 'script; style; iframe; frame; *[on*]'; + + window.CKEDITOR.dtd.$removeEmpty['p'] = 1; + self.editor = window.CKEDITOR.appendTo(self.$element[0], oConfig); self.editor.on('key', function(oEvent) {