발생 오류
Uncaught SyntaxError: The requested module '/ckeditor5/build/ckeditor.js' does not provide an export named 'default'
I have the same error but with ReactJS maybe it's work for you also. Instead of make a classic import:
import Editor from '../../path'
Just import directly like:
import from '../../path/'
After this, you can use ClassicEditor in your component. Here's the full example that works to me:
import { CKEditor } from '@ckeditor/ckeditor5-react';
import 'react-markdown-editor-lite/lib/index.css';
import '../../ckeditor5/build/ckeditor';
const RichText = ({ data }) => {
return (
<CKEditor
editor={ClassicEditor} // ESLint가 에러를 내지만 실제로는 문제 없음!
data={data}
onChange={(_, editor) => {
const data = editor.getData();
console.log(data);
}}
/>
);
};
export default RichText;