0
votes
    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 );
  } );
});

Which toolbar or plugin is missing? I have added almost plugging and toolbar items. CKEditor 5 doesn't have any documentation about the text/visual button. I want to add a toggle button which show me HTML view and text in editor.

1

1 Answers

0
votes

It looks like this feature was added in May 2021, a couple of weeks after your question!

There is a SourceEditing feature which adds a 'Source' toggle button - https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html (scroll down for a demo and how to install it).

But it is considered experimental currently, has some limitations of which editors it works with, and note that some HTML will be ignored (e.g. for HTML features you don't have a plugin loaded for).