问题描述
我找不到关于如何向编辑器添加allowContent
的任何建议,我的问题是保存highlight
后要设置HTML
或其他文本更改属性不能作为HTML代码触发。
ClassicEditor.create( document.querySelector( '.editor' ),{
toolbar: {
items: [
'fontBackgroundColor','highlight','|','fontColor','fontSize','fontFamily'
]
},language: 'en',table: {
contentToolbar: [
'tableColumn','tableRow','mergeTableCells','tableCellProperties','tableProperties'
]
}
})
.then( editor => {
window.editor = editor;
editor.config.set('allowedContent','*(*)'); //i tried this but nothing happens
} )
.catch( error => {
});
例如,它返回:The _purpose_ of these contract
而不是<p>The <b>purpose</b> of these <mark>contract</mark></p>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)