A
A
Alexander2020-07-06 06:51:12
Vue.js
Alexander, 2020-07-06 06:51:12

How to connect imageUpload plugin from CKEditor5 in vue?

Hello! I'm trying to connect ckeditor5 with the ability to load images locally in my component. With such a connection:

let DecoupledEditor, VueEditor, imageUpload
if (process.browser) {
  imageUpload = require('@ckeditor/ckeditor5-image/src/imageupload')
  DecoupledEditor = require('@ckeditor/ckeditor5-build-classic')
  VueEditor = require('@ckeditor/ckeditor5-vue')
  VueEditor = VueEditor.component
}
-----
  // data моего компонента
  data() {
    return {
      editor: DecoupledEditor,
      editorData: '<p>Content of the editor.</p>',
      editorConfig: {
        plugins: [imageUpload],
        toolbar: [
          'heading',
          '|',
          'bold',
          'italic',
          'bulletedList',
          'numberedList',
          'imageUpload'
        ]
      }
    }
  }

I get the error "ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated". CKEditor has an explanation for this error on their website ( https://ckeditor.com/docs/ckeditor5/latest/framewo... but their solution doesn't help me. I would be grateful for any answer.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question