fix: whatsapp message body sometimes editable (Issue #16067) (#16185)

* 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]>
This commit is contained in:
authored and GitHub committed 2024-08-20 16:19:24 +09:00
1 parent 86f8c6c5fa
commit 4ff2ce90f9
5 files changed
+81 -47

No files matched your search

@@ -0,0 +1,7 @@
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
export default function EditablePlugin({ editable }: { editable: boolean }) {
const [editor] = useLexicalComposerContext();
editor.setEditable(editable);
return null;
}