【问题标题】:How to visual/text toolbar button in ckeditor5如何在ckeditor5中显示/文本工具栏按钮
【发布时间】: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 视图和文本。

【问题讨论】:

    标签: ckeditor ckeditor5


    【解决方案1】:

    这个功能似乎是在 2021 年 5 月,在您提出问题的几周后添加的!

    有一个 SourceEditing 功能添加了一个“源”切换按钮 - https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html(向下滚动查看演示以及如何安装它)。

    但它目前被认为是实验性的,它使用的编辑器有一些限制,并注意某些 HTML 将被忽略(例如,对于您没有加载插件的 HTML 功能)。

    【讨论】:

      猜你喜欢
      • 2013-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-05-02
      • 2020-09-10
      • 1970-01-01
      • 2013-11-29
      • 1970-01-01
      相关资源
      最近更新 更多