Fix: Stop ckeditor from removing figures and figcaptions.

Backported from master branch.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
onli 2019-10-09 18:10:21 +02:00 committed by Thomas Hochstein
parent 2b9616276f
commit 38a7a3f60b

View File

@ -65,7 +65,7 @@ CKEDITOR.editorConfig = function( config ) {
- Allow <pre[*attributes](*classes)> for custom attributes/classes in code blocks
*/
// protect
config.extraAllowedContent = 'mediainsert[*]{*}(*);gallery[*]{*}(*);media[*]{*}(*);script[*]{*}(*);audio[*]{*}(*);div[*]{*}(*);span[*]{*}(*);img[height,width];pre[*](*);code;';
config.extraAllowedContent = 'mediainsert[*]{*}(*);gallery[*]{*}(*);media[*]{*}(*);script[*]{*}(*);audio[*]{*}(*);div[*]{*}(*);span[*]{*}(*);img[height,width];pre[*](*);code;figure[*]{*}(*); figcaption[*]{*}(*);';
// Do not use auto paragraphs, added to these allowed tags (only!). Please regard that this was marked deprecated by CKE 4.4.5, but is a need for (our use of) extraAllowedContent - check this again by future versions!
config.autoParagraph = false; // defaults(true)