<figure> <figcapture> CKeditor中的标签



试图告诉嵌入在我的Kentico CMS中的CKeditor v4.4.2实例停止过滤&我想要什么就允许什么。

举例来说,它总是弄乱我的身材& &;捕捉标签,有时关闭不正确,有时删除它们,有时用段落标签替换标签。

我花了好几天时间试图找到这个,并且尝试了很多次:

config.allowedContent = true;
config.extraAllowedContent = 'figure figcapture';
CKEDITOR.dtd.$editable.figure = 1;
CKEDITOR.dtd.$editable.figcaption = 1;
CKEDITOR.dtd.$removeEmpty['figure'] = false;'
CKEDITOR.dtd.$removeEmpty['figcapture'] = false;
config.protectedSource.push( /<figure[sS]*?>/gi ) ;
config.protectedSource.push( /</figure[sS]*?>/gi ) ; 
config.forcePasteAsPlainText = true;

这些都不起作用。这些似乎都不能改变他的行为。我还能错过什么呢?

<figcapture> ?在HTML中没有这样的元素。你的意思是<figcaption>,这就足够了:

config.extraAllowedContent = 'figure figcaption';

最新更新