• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

CKEditorError: ckeditor-duplicated-modules

21.01.29 11:03 작성 조회수 3.51k

0

안녕하세요. CKEDITOR5 잘 따라가고 있는와중에 EditorConfig에서 import한 editorConfiguration을 사용하려고하는데 errror가 떠서 질문드립니다.

에러는 KEditorError: ckeditor-duplicated-modules Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-ckeditor-duplicated-modules

이런식으로나옵니다.

import React, { useStateuseEffect } from "react";
import styled from "styled-components";
import { CKEditor } from "@ckeditor/ckeditor5-react";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import { editorConfiguration } from "../../Components/Editor/EditorConfig";

const CategoryBoard = ({ setInputData }) => {
  const onChange = (e=> {
    setInputData(e.editor.getData());
  };

  const getDataFromCKEditor = (eventeditor=> {
    console.log(editor);
  };

  return (
    <>
      <CKEditor editor={ClassicEditor} confing={editorConfiguration} />
    </>
  );
};

export default CategoryBoard;

답변 1

답변을 작성해보세요.

0

import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';

src에서 가여와야 합니다. src에서 가져와 웹팩이 빌드해서 build폴더로 옮겨놓는데, build에서 가져오면 빌드된게 2개라

중복되었다고 나옵니다.