From b853ef5dfcf8cb00a6daa64b45dd3e6b9ef85f78 Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 6 Jan 2016 13:12:43 +0100 Subject: [PATCH 1/4] update allowed classes and tag per discussion for Bootstrap & FA --- www/script/editor/ckeditor/config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/script/editor/ckeditor/config.js b/www/script/editor/ckeditor/config.js index 458d0538b7..64f6deafd2 100644 --- a/www/script/editor/ckeditor/config.js +++ b/www/script/editor/ckeditor/config.js @@ -33,8 +33,9 @@ CKEDITOR.editorConfig = function( config ) { // Set the most common block elements. config.format_tags = 'p;h1;h2;h3;pre'; - // Allow all div classes (from theme) - config.extraAllowedContent = 'div(*)'; + // Allow all div classes (from theme and for Boostrap and FontAwesome), allow empty + config.extraAllowedContent = 'div(*)[*]{*}; a[!href]; span(*)[*]{*};table(*)[*]{*}; p(*)[*]{*}; li(*)[*]{*}; ul(*)[*]{*}'; + CKEDITOR.dtd.$removeEmpty.i = 0; // Simplify the dialog windows. config.removeDialogTabs = 'image:advanced;link:advanced'; From b43ab494e7a7ba67f0818dbdecaebb023d562124 Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 6 Jan 2016 13:20:55 +0100 Subject: [PATCH 2/4] upd for empty span --- www/script/editor/ckeditor/config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/script/editor/ckeditor/config.js b/www/script/editor/ckeditor/config.js index 64f6deafd2..8e4f47f598 100644 --- a/www/script/editor/ckeditor/config.js +++ b/www/script/editor/ckeditor/config.js @@ -36,6 +36,7 @@ CKEDITOR.editorConfig = function( config ) { // Allow all div classes (from theme and for Boostrap and FontAwesome), allow empty config.extraAllowedContent = 'div(*)[*]{*}; a[!href]; span(*)[*]{*};table(*)[*]{*}; p(*)[*]{*}; li(*)[*]{*}; ul(*)[*]{*}'; CKEDITOR.dtd.$removeEmpty.i = 0; + CKEDITOR.dtd.$removeEmpty['span'] = 0; // Simplify the dialog windows. config.removeDialogTabs = 'image:advanced;link:advanced'; From 8d9479b3b7006acef48a686485c14564b86a875c Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 6 Jan 2016 13:29:36 +0100 Subject: [PATCH 3/4] upd cleaner typo --- www/script/editor/ckeditor/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/script/editor/ckeditor/config.js b/www/script/editor/ckeditor/config.js index 8e4f47f598..f7ae15047c 100644 --- a/www/script/editor/ckeditor/config.js +++ b/www/script/editor/ckeditor/config.js @@ -36,7 +36,7 @@ CKEDITOR.editorConfig = function( config ) { // Allow all div classes (from theme and for Boostrap and FontAwesome), allow empty config.extraAllowedContent = 'div(*)[*]{*}; a[!href]; span(*)[*]{*};table(*)[*]{*}; p(*)[*]{*}; li(*)[*]{*}; ul(*)[*]{*}'; CKEDITOR.dtd.$removeEmpty.i = 0; - CKEDITOR.dtd.$removeEmpty['span'] = 0; + CKEDITOR.dtd.$removeEmpty.span = 0; // Simplify the dialog windows. config.removeDialogTabs = 'image:advanced;link:advanced'; From 37fe9e2888add38a8b44d184e9c089253490627c Mon Sep 17 00:00:00 2001 From: Marc Date: Wed, 6 Jan 2016 13:50:54 +0100 Subject: [PATCH 4/4] forgot img --- www/script/editor/ckeditor/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/script/editor/ckeditor/config.js b/www/script/editor/ckeditor/config.js index f7ae15047c..17645ccec3 100644 --- a/www/script/editor/ckeditor/config.js +++ b/www/script/editor/ckeditor/config.js @@ -34,7 +34,7 @@ CKEDITOR.editorConfig = function( config ) { config.format_tags = 'p;h1;h2;h3;pre'; // Allow all div classes (from theme and for Boostrap and FontAwesome), allow empty - config.extraAllowedContent = 'div(*)[*]{*}; a[!href]; span(*)[*]{*};table(*)[*]{*}; p(*)[*]{*}; li(*)[*]{*}; ul(*)[*]{*}'; + config.extraAllowedContent = 'div(*)[*]{*}; a[!href]; span(*)[*]{*};table(*)[*]{*}; p(*)[*]{*}; li(*)[*]{*}; ul(*)[*]{*}; img(*)[*]{*}'; CKEDITOR.dtd.$removeEmpty.i = 0; CKEDITOR.dtd.$removeEmpty.span = 0;