【问题标题】:How do I stop CKEditor from inserting close tags after empty (self-close) MathML tags?如何阻止 CKEditor 在空(自关闭)MathML 标签后插入关闭标签?
【发布时间】:2015-12-07 21:03:34
【问题描述】:

Proper MathML notation of repeating decimals 调用一个空的<mline /> 标签:

<math><mover align="right"><mn>0.16</mn><mline spacing="6" /></mover></math>

CKEditor 无法将其识别为正确的空标记,并且无益地插入了结束标记 </mline> 并弄乱了 MathJax 解释:

<math><mover align="right"><mn>0.16</mn><mline spacing="3"></mline></mover></math>

这对使用 MathML 的其他空标签有影响,例如 <maligngroup/><malignmark/>

【问题讨论】:

    标签: ckeditor mathml


    【解决方案1】:

    解决方案是将mline 添加到ckeditor_config.js 中$empty 标签的CKEditors 列表中:

    CKEDITOR.dtd.$empty['mline'] = 1;

    最后添加了一些以防万一:

    _(['mline', 'mspace', 'maligngroup', 'malignmark', 'msline']).each(function(tag, index){
      CKEDITOR.dtd.$empty[tag] = 1;
    })
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-12-30
      • 1970-01-01
      • 2019-05-16
      • 1970-01-01
      • 1970-01-01
      • 2014-04-29
      • 2012-12-11
      • 2022-12-03
      相关资源
      最近更新 更多