mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
* Fixing issue #16067 * Creating reusable Editor component for Editor * fix editor issue * remove log * fix: unit test * fix: unit test * add unit test for the plugin and changes --------- Co-authored-by: unknown <[email protected]> Co-authored-by: Anik Dhabal Babu <[email protected]> Co-authored-by: Amit Sharma <[email protected]>
8 lines
259 B
TypeScript
8 lines
259 B
TypeScript
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
|
|
export default function EditablePlugin({ editable }: { editable: boolean }) {
|
|
const [editor] = useLexicalComposerContext();
|
|
editor.setEditable(editable);
|
|
return null;
|
|
}
|