'How add To-do lists feature to CKEditor 5 in react application?
I have a simple ClassicEditor config in my app, and it's working fine, but I also want to add some extra plugins like todo-list enter link description here
And I have trouble doing this. How correctly add todo-list feature or some other using React and CKEditor 5?
When I try to import TodoList feature from ckeditor I get the next error
Uncaught CKEditorError: ckeditor-duplicated-modules
My code:
import { CKEditor } from "@ckeditor/ckeditor5-react";
import TodoList from '@ckeditor/ckeditor5-list/src/todolist';
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
export default function ScriptTextSection({ script, dispatch }) {
const onChangeScript = (script) => {
return dispatch(scriptTextFieldUpdateAction({ script }));
};
return (
<div className="script_section">
<CKEditor
editor={ClassicEditor}
data={script}
config={{
toolbar: [
"heading",
"|",
"bold",
"italic",
"link",
"bulletedList",
"numberedList",
"blockQuote",
"|",
"undo",
"redo",
"todoList"
],
plugins: [TodoList]
}}
onReady={(editor) => {}}
onChange={(event, editor) => {
const data = editor.getData();
return onChangeScript(data);
}}
/>
</div>
);
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
