Ckeditor5 - "widget toolbar no items" {toolbarId: 'mediaEmbed'}

Ckeditor5 - "widget toolbar no items" {toolbarId: 'mediaEmbed'}

我将 Ckeditor5 与 React 一起使用,当组件呈现时我在控制台中收到此警告,我该如何摆脱它?

Error screenshot

这是官方文档上的错误参考

https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-widget-toolbar-no-items

这是我的组件

export const EditorField = (props) => {

    const {name,method,placeholder,isSimplified} = props

    const link = {
        decorators: {
            toggleDownloadable: {
                mode: 'manual',
                label: 'Downloadable',
                attributes: {
                    download: 'file'
                }
            },
            openInNewTab: {
                mode: 'manual',
                label: 'Open in a new tab',
                defaultValue: true,
                attributes: {
                    target: '_blank',
                    rel: 'noopener noreferrer'
                }
            }
        }
    }
    const image = {
        toolbar: [
            'imageTextAlternative',
            'imageStyle:inline',
            'imageStyle:block',
            'imageStyle:side',
            'linkImage'
        ]
    }
    const table = {
        contentToolbar: [
            'tableColumn',
            'tableRow',
            'mergeTableCells',
            'tableCellProperties',
            'tableProperties'
        ]
    }
    const toolbar = isSimplified ? {
        items: [
            'bold','italic','underline','strikethrough','|',
            'link','|',
            'specialCharacters','|',
            'undo','redo'
        ], shouldNotGroupWhenFull: true
    } : {
        items: [
            'heading','|',
            'bold','italic','underline','strikethrough','|',
            'fontColor','fontBackgroundColor','|',
            'bulletedList','numberedList','|',
            'link','imageUpload','insertTable','mediaEmbed','|',
            'specialCharacters','blockQuote','horizontalLine','|',
            'undo','redo'
        ], shouldNotGroupWhenFull: true
    }

    return (
        <CKEditor
            config={ {
                toolbar,
                language: 'it',
                placeholder,
                link,
                image,
                table,
            } }
            editor={ Editor }
            data={request[name] || ''}
            onChange={ (event, editor) => {
                const data = editor.getData()
                dispatch(setValue({method,name,value:data}))
            } }
        />
    )
}

我终于设法通过将其添加到我的配置中来解决此问题。

removePlugins: ["MediaEmbedToolbar"],

目前,这个插件没有做任何事情:https://github.com/ckeditor/ckeditor5/issues/9824