【发布时间】:2016-09-05 08:42:03
【问题描述】:
我正在使用 dokuwiki 并尝试使用配置参数设置 CKeditor。我面临的问题:当用户输入时,例如
保存后变成:
^ 和 x 之间的空格由 HTML 标记(在示例中为 )后面的空格创建。
<p>
Die Eingabe 3<strong>^</strong> x führt zu 3<sup>x</sup>.
</p>
我已经检查了ckeditor的HTML Output formatting并尝试实现它,但没有任何区别,html标签仍然存在换行符。这是我在配置中使用的代码:
CKEDITOR.on('instanceReady', function(ev)
{
// var myTags = new Array ('p','h1','h2','h3','h4','h5','h6');
var myTags = new Array ('span', 'strong', 'sup', 'sub');
for(var Tag in myTags)
{
ev.editor.dataProcessor.writer.setRules(myTags[Tag],
{
// indicates that this tag causes indentation on line breaks inside of it.
// indent : false,
// inserts a line break before the opening tag.
breakBeforeOpen : false,
// inserts a line break after the opening tag.
breakAfterOpen : false,
// inserts a line break before the closing tag.
breakBeforeClose : false,
// inserts a line break after the closing tag.
breakAfterClose : false
});
}
});
我的猜测是breakAfterClose : false 可以解决问题,但它没有。
PS:我也不确定 DokuWiki 软件和使用的 ckgedit 插件是否在这里干扰...
【问题讨论】:
标签: ckeditor