【发布时间】:2021-05-07 14:26:14
【问题描述】:
ClassicEditor.create( document.querySelector( '.editor' ), {
// extraPlugins: [ AnnotationsUIs ],
// plugins: [ Mention,],
removePlugins:['Title'],
toolbar: {
items: [
"alignment:left", "alignment:right", "alignment:center", "alignment:justify", "alignment", "undo", "redo", "blockQuote", "bold", "link", "ckfinder", "selectAll", "heading", "horizontalLine", "htmlEmbed", "indent", "outdent", "italic", "numberedList", "bulletedList", "mediaEmbed", "pageBreak", "specialCharacters", "restrictedEditingException", "strikethrough", "subscript", "superscript", "insertTable", "tableColumn", "tableRow", "mergeTableCells", "tableCellProperties", "tableProperties", "textPartLanguage", "todoList", "underline"
],
shouldNotGroupWhenFull: true,
},
mention: {
feeds: [
{
marker: '@',
feed: [ '@test' ],
// itemRenderer: customItemRenderer
},
],
},
language: 'en',
} )
.then( editor => {
window.editor = editor;
} )
.catch( error => {
console.error( error );
} );
});
缺少哪个工具栏或插件? 我几乎添加了插件和工具栏项目。 CKEditor 5 没有任何关于文本/视觉按钮的文档。我想添加一个切换按钮,在编辑器中显示 HTML 视图和文本。
【问题讨论】: