I'm making a rich text editor with Lexical react. I'm reasonably experienced in React. My problem is I can't get the editor to flip between editable and readonly modes. It's stuck in whatever mode it's set when I first load the app. Here is the code snippet - as you can see, I print out the "editable" value and confirm it changes between true
and false
correctly (but the editor mode doesn't change with it):
editorConfig = {
...
editable: editable,
}
console.log(`editable is ${editable}`);
return (
<LexicalComposer initialConfig={editorConfig}>
Any help is appreciated!