Open JacobJohn88 opened 7 months ago
I am facing difficulties in making a particular block non editable in the editor. I tried with the following function but its not working
const makeBlockContenteditableFalse = (blockKey: string) => { const block = editorState .getCurrentContent() .getBlockMap() .get(blockKey) .merge({ data: { contenteditable: false, }, }); const updatedEditorState = EditorState.push(editorState, block); setEditorState(updatedEditorState); };
I am facing difficulties in making a particular block non editable in the editor. I tried with the following function but its not working
const makeBlockContenteditableFalse = (blockKey: string) => { const block = editorState .getCurrentContent() .getBlockMap() .get(blockKey) .merge({ data: { contenteditable: false, }, }); const updatedEditorState = EditorState.push(editorState, block); setEditorState(updatedEditorState); };