Несколько CKEditor5 (различной сборки) в ReactJs - Завершается в 'CKEditorError: ckeditor-duplicated-modules' - PullRequest
0 голосов
/ 26 октября 2019

Я создал основной компонент и два подкомпонента для загрузки двух разных сборок CKeditor5 (классическая и воздушная);но выдает ошибку ниже:

CKEditorError: ckeditor-duplicated-modules: Некоторые модули CKEditor 5 дублируются. Подробнее: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-ckeditor-duplicated-modules

Первый компонент:

import React from "react";
import CKEditor from "@ckeditor/ckeditor5-react";
import BalloonEditor from "@ckeditor/ckeditor5-build-balloon";

..

return (
<CKEditor
  editor={BalloonEditor}
  //data="<p>Hello from CKEditor 5!</p>" //using placeholder instead
  config={editorConfiguration}
  onInit={editor => {
    // You can store the "editor" and use when it is needed.
    console.log("Editor is ready to use!", editor);
  }}
  onChange={(event, editor) => {
    const data = editor.getData();
    //console.log({ event, editor, data });
  }}
/>);

Второй компонент:

import React from "react";
import CKEditor from "@ckeditor/ckeditor5-react";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";

 ..

return (
    <CKEditor
      editor={BalloonEditor}
      //data="<p>Hello from CKEditor 5!</p>" //using placeholder instead
      config={editorConfiguration}
      onInit={editor => {
        // You can store the "editor" and use when it is needed.
        console.log("Editor is ready to use!", editor);
      }}
      onChange={(event, editor) => {
        const data = editor.getData();
        //console.log({ event, editor, data });
      }}
    />);

Основной компонент:

return (
  <CardFront />
  <CardBack />
)

Любые идеи о том, как преодолеть это? Или это ограничение?

...