I'm using Ckeditor5 for vue in Laravel. Following documentation I have installed modules using npm install --save @ckeditor/ckeditor5-vue @ckeditor/ckeditor5-build-classic and enabled Ckeditor in resources/js/app.js file
import CKEditor from '@ckeditor/ckeditor5-vue';
Vue.use( CKEditor );
const app = new Vue({
el: '#app',
});
After that I have imported ClassicEdditor in vue component
<template>
// A lot of code here
<div class="editor">
<ckeditor :editor="editor" v-model="editorData" :config="editorConfig"></ckeditor>
</div>
</template>
<script>
import Swal from 'sweetalert2';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily'; // <----- Here is the error
export default {
props: ['groups'],
mounted(){
},
data: function(){
return {
// My data
editor: ClassicEditor,
editorData: '',
editorConfig: {
// The configuration of the editor.
toolbar: {
items: [
'FontFamily',
'|',
'bold',
'italic',
'underline',
'subscript',
'superscript',
'|',
'List',
'Code',
'EasyImage',
'ImageUpload',
'|',
'link',
'undo',
'redo'
]
}
}
}
},
methods: {
// My methods here
}
</script>
After that ckeditor show warning in console
toolbarview-item-unavailable: The requested toolbar item is unavailable
{name: "FontFamily"}
In Error Codes page it says that
There was a problem processing the configuration of the toolbar. The item with the given name does not exist so it was omitted when rendering the toolbar.
So I have decided to install plugin via npm and import in Vue component, but after
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily';
Ckeditor throw an error
Uncaught CKEditorError: ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated
I have reinstalled ckeditor - same issue