Ошибка в браузере widget-toolbar-no-items при подключении CKEkeditor 5 для toolbarId: "image"
В представлении подключаю визуальный редактор для поля content и description:
<script src="{{ asset('assets/admin/ckeditor5/build/ckeditor.js') }}"> </script>
<script src="{{ asset('assets/admin/ckfinder/ckfinder.js') }}"> </script>
<script>
ClassicEditor
.create (document.querySelector( '#content' ), {
ckfinder: {
uploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files&responseType=json'
},
image: {
// You need to configure the image toolbar, too, so it uses the new style buttons.
toolbar: [ 'imageTextAlternative', '|', 'imageStyle:alignLeft', 'imageStyle:full', 'imageStyle:alignRight' ],
styles: [
// This option is equal to a situation where no style is applied.
'full',
// This represents an image aligned to the left.
'alignLeft',
// This represents an image aligned to the right.
'alignRight'
]
},
toolbar: {
items: [
'heading',
'|',
'bold',
'italic',
'link',
'bulletedList',
'numberedList',
'|',
'indent',
'outdent',
'alignment',
'|',
'CKFinder',
'blockQuote',
'insertTable',
'undo',
'redo',
'mediaEmbed'
]
},
language: 'ru',
table: {
contentToolbar: [
'tableColumn',
'tableRow',
'mergeTableCells'
]
},
})
.catch( function( error ) {
console.error( error );
});
ClassicEditor
.create( document.querySelector( '#description' ), {
toolbar: [ 'heading', '|', 'bold', 'italic', '|', 'undo', 'redo' ]
} )
.catch( function( error ) {
console.error( error );
} );
</script>
В помощи к редактору сообщается, что при регистрации новой панели инструментов вам необходимо предоставить непустой массив с элементами, которые будут вставлены в панель инструментов. Я же в коде предоставляю этот массив. Панель image я не подключаю.