【发布时间】:2016-10-15 06:57:28
【问题描述】:
我得到了文本并向 span 添加了一些类。 setData 更新内容但不应用内容 css。
我可以检查(在 Chrome 中)并查看新课程。我在纯文本和所见即所得(禁用-启用富文本)之间切换 Drupal 页面,它看起来不错。
就好像编辑器忘记或停止在 setData 上应用内容 css
我试过了:
function submitaftersetdata() {
this.updateElement();
this.checkdirty;
CKEDITOR.config.contentsCss = 'http://www.mooyai.com/sites/all/modules/custom/languagetool/atd-ckeditor/atd.css';
alert('done');
}
editor.setData(editorContents, submitaftersetdata);
editor.insertHtml(editorContents);
可以很好地添加新文本并且看起来正确(应用了内容 css)
setData 为空 '' 然后插入有效,但再次破坏 css
【问题讨论】:
标签: javascript drupal ckeditor