Ckeditor <;图>&&书信电报;figcapture>;编辑器中的标记

Ckeditor <;图>&&书信电报;figcapture>;编辑器中的标记,ckeditor,Ckeditor,试图告诉嵌入在我的Kentico CMS中的CKeditor v4.4.2实例停止过滤&允许我想要的任何东西,这有点疯狂 举个例子,它总是弄乱我的figure&figcapture标签,有时关闭错误,有时删除它们,有时用段落标签替换标签 我花了几天的时间试图找到这个问题,并且尝试了很多: config.allowedContent = true; config.extraAllowedContent = 'figure figcapture'; CKEDITOR.dtd.$editable.fi

试图告诉嵌入在我的Kentico CMS中的CKeditor v4.4.2实例停止过滤&允许我想要的任何东西,这有点疯狂

举个例子,它总是弄乱我的figure&figcapture标签,有时关闭错误,有时删除它们,有时用段落标签替换标签

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

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[\s\S]*?>/gi ) ;
config.protectedSource.push( /<\/figure[\s\S]*?>/gi ) ; 
config.forcePasteAsPlainText = true;
config.allowedContent=true;
config.extraAllowedContent='figure figcapture';
CKEDITOR.dtd.$editable.figure=1;
CKEDITOR.dtd.$editable.figcaption=1;
CKEDITOR.dtd.$removempty['figure']=false;'
CKEDITOR.dtd.$removempty['figcapture']=false;
config.protectedSource.push(//gi);
config.protectedSource.push(//gi);
config.forcePasteAsPlainText=true;
这些都不管用。所有这些似乎都没有改变这种行为。 我可能缺少什么?

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

config.extraAllowedContent = 'figure figcaption';

你说得对,我完全是在打字上摸索,然后用剪切粘贴的方式把它串起来。有时候你只需要一双新鲜的眼睛…谢谢。