CKEditor正在剥离/删除标签=(

时间:2015-03-19 18:24:30

标签: drupal drupal-7 tags ckeditor

我是 Drupal 7 上配置CKEditor的新手,即使使用了用户界面,也一直很痛苦。我试图让它停止剥离/删除标签,特别是 - code,pre,ins del,blockquote,q,dl,dd,dt。我有一个测试页面,我用它来测试我的网站的样式,这些都在Full和Filtered中删除。 Grrrr ......

请记住,我不知道我在这做什么。请帮我解决这个问题,所以我不会再浪费一天了。 =(

ACF的额外允许内容

我在那里添加了以下内容:

br; div; span; header; footer; section; aside; figure; a; img; strong; em; h1; h2; h3; h4; h5; h6; ins; del; cite; q; blockquote; code; pre; table; tr; td; th; thead; tfoot; caption; legend; col; ul; ol; li; dl; dd; dt;</code>

config.js

我找到了config.js并添加了以下内容以使其停止剥离标记。

CKEDITOR.editorConfig = function( config ) 
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.allowedContent = 'br div span;' + 
    'header footer section aside figure;' + 
    'a[!href]; img[!src,alt,width,height];strong em h1 h2 h3 h4 h5 h6;' +
     'ins del cite q blockquote code pre;' +
     'table tr td th thead tfoot caption legend col;' + 
     'ul ol li dl dd dt';
config.extraAllowedContent = ' br div(*) span(*);' + 
    'header footer section aside figure;' + 
    'a[!href]; img[!src,alt,width,height];strong em h1 h2 h3 h4 h5 h6;' +
    'ins del cite q blockquote code pre;' +
     'table tr td th thead tfoot caption legend col;' + 
     'ul ol li dl dd dt';
};

1 个答案:

答案 0 :(得分:0)

没有多少地方可以看:

  1. 内容.-确保内容正确,所有标签都已正确关闭并选择了正确的输入过滤器。要排除问题,请选择完整HTML。

  2. CKEditor.-在CKEditor模块页面中说:

  3.   

    CKEditor 4.1+用户注意事项如果您使用的是CKEditor 4.1+,则可能需要调整高级内容过滤器设置。您可以通过编辑CKEditor配置文件并转到高级内容过滤器部分来完成此操作,在该部分中可以完全禁用ACF以及设置&#34;额外允许的内容&#34;。

    尝试禁用它,以便丢弃一个可能的原因。请务必遵循额外允许内容的格式规则。

    object[width,height];param[name,value];embed[*];
    

    ACF将过滤您未选择的所有工具作为&#34;当前工具栏&#34;。

    1. 过滤器.-如果您选择过滤HTML,请确保在&#34;允许的HTML标记&#34;中添加所有标记。配置中的部分,和/或您没有任何其他模块添加另一个过滤器选项。
相关问题