I am using DraftJS Plugins Editor in my NextJS project like below:
const Editor = dynamic(() => import("@draft-js-plugins/editor"), {
ssr: false,
});
const inlineToolbarPlugin = createInlineToolbarPlugin();
const { InlineToolbar } = inlineToolbarPlugin;
function MyEditor() {
const [editorState, setEditorState] = useState(EditorState.createEmpty());
return (
<div className="editor-container">
<Editor
placeholder="Start writing..."
editorState={editorState}
onChange={setEditorState}
plugins={[inlineToolbarPlugin]}
/>
<InlineToolbar />
</div>
);
}
export default MyEditor;
But the app keeps crashing with the below error:
TypeError: store.getItem(...) is not a function
Any idea how to fix this?