diff --git a/package-lock.json b/package-lock.json
index b06f115..602596e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,22 +10,22 @@
"license": "MIT",
"dependencies": {
"@excalidraw/excalidraw": "0.11.0",
- "@lexical/clipboard": "0.3.11",
- "@lexical/code": "0.3.11",
- "@lexical/file": "0.3.11",
- "@lexical/hashtag": "0.3.11",
- "@lexical/link": "0.3.11",
- "@lexical/list": "0.3.11",
- "@lexical/mark": "0.3.11",
- "@lexical/overflow": "0.3.11",
- "@lexical/plain-text": "0.3.11",
- "@lexical/react": "0.3.11",
- "@lexical/rich-text": "0.3.11",
- "@lexical/selection": "0.3.11",
- "@lexical/table": "0.3.11",
- "@lexical/utils": "0.3.11",
+ "@lexical/clipboard": "^0.5.0",
+ "@lexical/code": "^0.5.0",
+ "@lexical/file": "^0.5.0",
+ "@lexical/hashtag": "^0.5.0",
+ "@lexical/link": "^0.5.0",
+ "@lexical/list": "^0.5.0",
+ "@lexical/mark": "^0.5.0",
+ "@lexical/overflow": "^0.5.0",
+ "@lexical/plain-text": "^0.5.0",
+ "@lexical/react": "^0.5.0",
+ "@lexical/rich-text": "^0.5.0",
+ "@lexical/selection": "^0.5.0",
+ "@lexical/table": "^0.5.0",
+ "@lexical/utils": "^0.5.0",
"katex": "^0.15.2",
- "lexical": "0.3.11",
+ "lexical": "^0.5.0",
"use-child": "^1.0.0",
"utility-types": "^3.10.0",
"y-websocket": ">=1.3.x",
@@ -4207,244 +4207,244 @@
}
},
"node_modules/@lexical/clipboard": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.3.11.tgz",
- "integrity": "sha512-ly+9R2Rccz80eV9Gu0hOi701fXIyU50t+S7OR0Ensos09oAmQPae6poFkvS3k36tH+leLgk0hRZ47pB/+ejENA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.5.0.tgz",
+ "integrity": "sha512-JFvdH4N/80GxC0jhaiO/fdUOeYcX8pMFrcrpBDeNIcBN/9eF8Rn/czvoPLLNB9Kcbz8d8XXqabKEGCz2hFL//w==",
"dependencies": {
- "@lexical/html": "0.3.11",
- "@lexical/list": "0.3.11",
- "@lexical/selection": "0.3.11",
- "@lexical/utils": "0.3.11"
+ "@lexical/html": "0.5.0",
+ "@lexical/list": "0.5.0",
+ "@lexical/selection": "0.5.0",
+ "@lexical/utils": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/code": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.3.11.tgz",
- "integrity": "sha512-huyOUwrihXydgrNQgrSjy8fkgTNqM67+Yx1c3X0VFWcTvavbbNT8R/sXx8qDMWUARCKEnoEPBUk3Jbtt+9CfPQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.5.0.tgz",
+ "integrity": "sha512-GmqRaQ8EBtlu13ObSZYiGDzIsrkwRyyqI2HRVBrPo2iszLBpby+7uIncAVQVkxt1JNYOKE2n4JfxK8TSYyMtYQ==",
"dependencies": {
- "@lexical/utils": "0.3.11",
+ "@lexical/utils": "0.5.0",
"prismjs": "^1.27.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/dragon": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.3.11.tgz",
- "integrity": "sha512-JEIjctxc5IAYWY2Su1xLChco/BaI0ErdQZIgUNzeVLDPTtvZuVJFvlEYkcZov6l0TUdWUzO19hRzqVIp/EWjew==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.5.0.tgz",
+ "integrity": "sha512-Gf0jN8hjlF8E71wAsvbRpR1u9oS6RUjUw3VWp/Qa+IrtjBFFVzdTUloUs3cjMX9E/MFRJgt3wPsaKx2IuLBWQw==",
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/file": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/file/-/file-0.3.11.tgz",
- "integrity": "sha512-etufm9hoc5R3yKxX365EJTc5DS8xW59Wa8awRpgeRu8UjkP1DVdRyJWxOYkkKBlziwFs6PvIFLXrPCNQ0Om1DA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/file/-/file-0.5.0.tgz",
+ "integrity": "sha512-Jxh7DOReoeFJUViLqLX+r42j/6CHGX55deyEXna2os82+Q0xcM9GGLYA8NrZdrLUql8p5FWAMIaCBok/8N8h9A==",
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/hashtag": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.3.11.tgz",
- "integrity": "sha512-dNUiIGW5F+Oqj/JBfp9nrSlnutpiUI0eml19CTAiAbgeMZiOeFPmicKdVMn/Lx6nxW6c+uxIbBk3ONSNZar2zA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.5.0.tgz",
+ "integrity": "sha512-3MT72y72BmK4q7Rtb9gP3n83UL4vWC078T9io4zyPxKEI1Mh3UAVuRwh6Ypn0FeH94XvmuZAGVdoOC/nTd1now==",
"dependencies": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/history": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.3.11.tgz",
- "integrity": "sha512-XzhT0pKXs1QhTVIpiYHbeIf8J0M85mQQUnQFlT1FVd14SFodfpLJiYaLZNiUxm1NcMnJStmBGf0DiGdkdCIWDg==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.5.0.tgz",
+ "integrity": "sha512-DCQgh1aQ1KS5JVYPU6GYr52BN0MQqmoXfFtf5uYCX9CbSAC0hDSK8ZPqwFW7jINqe6GwXxy7bo32j7E0A5023A==",
"dependencies": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/html": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.3.11.tgz",
- "integrity": "sha512-cw6IjI+OQr6Dwm1Mvkws0HsMOZ0lIky/DIhSt7ZAcUya+N1sis3kNIhg5Gijvpao+/n17QPgOwWS2sE7PFESmg==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.5.0.tgz",
+ "integrity": "sha512-uJAof6gXTLOH9JnmPJ+wxILFtu7I/eCebFyVMjV53sqaeLsQ3pDfBTUe4RO+NciC+XBQ1WVpZgCM8Yx5c5cMmQ==",
"dependencies": {
- "@lexical/selection": "0.3.11"
+ "@lexical/selection": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/link": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.3.11.tgz",
- "integrity": "sha512-oNxS9vKKoYwkVyWdbHHPjcgtzap4yTj+72JEKcqmpQyox6FhUJpapEiWtWdpYPW/KaMZWfABY/zn5Cea0gq5CQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.5.0.tgz",
+ "integrity": "sha512-XB8e+UPI9jeqsi7+Wr0n9SToljiS+gZmJ5gXANtR6lSZPtpcSUPs1iJZU2A2dNKXdvsZwSPCFdPL6ogFaaRvvQ==",
"dependencies": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/list": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.3.11.tgz",
- "integrity": "sha512-l79kqwFRTuUx+fNxRmYaqP27tB7va/MAKoRL1Jzv1EYBZjz0fEHxpaRBG7Y5JHSMMFRQrJEhL4hKMs2EiCecvQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.5.0.tgz",
+ "integrity": "sha512-TYXe4FtNL7Lk3XDEhPyUbT0Pb1TU58qZywGCdrtuRjPnF4oDvRXgg9EhYWfHzYwdsyhNgaHId+Fq41CjrwTMYg==",
"dependencies": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/mark": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.3.11.tgz",
- "integrity": "sha512-+OF+wytxcg54hVtM2zkjcGTS7CIgVhgyznoukWTgwWgFjkPHMfnLafBqmn61F5kAua1YZZZszzHOifinW2d4pA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.5.0.tgz",
+ "integrity": "sha512-leeqegWD4hqUdfYNsxB5iwsWozX2oc6mnJzcJfR4UB3Ksr0zH2xHc/z3Zp+CTeGuK5Tzppq5yGS+4cQ5xNpVgQ==",
"dependencies": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/markdown": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.3.11.tgz",
- "integrity": "sha512-Qz8jxhvgDBUY6PzbSArnOHtoOkzCVaOpEwOSZbkSbiWgXyIti1sw7kSFWSEy3lnGNHTacrmYcxwHLHUChMmMLA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.5.0.tgz",
+ "integrity": "sha512-02RLx7PdVzvYxvx65FTbXkW6KcjQZ1waAaMDNKdtBV9r9Mv2Y2XunCUjErYHQ1JN9JkGGv0+JuliRT7qZTsF+Q==",
"dependencies": {
- "@lexical/code": "0.3.11",
- "@lexical/link": "0.3.11",
- "@lexical/list": "0.3.11",
- "@lexical/rich-text": "0.3.11",
- "@lexical/text": "0.3.11",
- "@lexical/utils": "0.3.11"
+ "@lexical/code": "0.5.0",
+ "@lexical/link": "0.5.0",
+ "@lexical/list": "0.5.0",
+ "@lexical/rich-text": "0.5.0",
+ "@lexical/text": "0.5.0",
+ "@lexical/utils": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/offset": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.3.11.tgz",
- "integrity": "sha512-PD/8CZlG9sFJp4NAeRUpcTLedX6TbI3G3zhNJtJFb23deESF7BEZOywEsInR/7RDe/xEd3MKR+GCD89/D9INWg==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.5.0.tgz",
+ "integrity": "sha512-ie4AFbvtt0CFBqaMcb0/gUuhoTt+YwbFXPFo1hW+oDVpmo3rJsEJKVsHhftBvHIP+/G5QlgPIhVmnlcSvEteTw==",
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/overflow": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.3.11.tgz",
- "integrity": "sha512-2UBiGC99ho9B2NDUu6ctUT5hoAEq8EfsbHhrwZBlNnspbl9DVmV70hhSgm0gVI/kRPvgkee0AUWywmfDAg1UPw==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.5.0.tgz",
+ "integrity": "sha512-N+BQvgODU9lS7VK4FlxIRhGeASwsxfdkECtZ5iomHfqqNEI0WPLHbCTCkwS10rjfH1NrkXC314Y0SG2F7Ncv9Q==",
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/plain-text": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.3.11.tgz",
- "integrity": "sha512-AfCHJPtY0g/gknYDCU2uZ5NHASSp1Gg7Ho7OuAi3sVOuVqs+SHI+ZkeC3y7MxrGhOP3TnZ+EsltAbToEQclSDA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.5.0.tgz",
+ "integrity": "sha512-t1rnVnSXbPs9jLN/36/xZLNAlF9jwv8rSh6GHsjRIYiWX/MovNmgPmhNq/nkc+gRFZ2FKTFjdz3UeAUF4xQZMw==",
"peerDependencies": {
- "@lexical/clipboard": "0.3.11",
- "@lexical/selection": "0.3.11",
- "@lexical/utils": "0.3.11",
- "lexical": "0.3.11"
+ "@lexical/clipboard": "0.5.0",
+ "@lexical/selection": "0.5.0",
+ "@lexical/utils": "0.5.0",
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/react": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.3.11.tgz",
- "integrity": "sha512-ynqsHl/ZDuvBoJjqcvWdlXKtGaZ47GbvcJtIARt9ya6G+z6+dqGzLp+ZSJIXHSt0Bet3YMzu3BZxCDpmJZkhbQ==",
- "dependencies": {
- "@lexical/clipboard": "0.3.11",
- "@lexical/code": "0.3.11",
- "@lexical/dragon": "0.3.11",
- "@lexical/hashtag": "0.3.11",
- "@lexical/history": "0.3.11",
- "@lexical/link": "0.3.11",
- "@lexical/list": "0.3.11",
- "@lexical/mark": "0.3.11",
- "@lexical/markdown": "0.3.11",
- "@lexical/overflow": "0.3.11",
- "@lexical/plain-text": "0.3.11",
- "@lexical/rich-text": "0.3.11",
- "@lexical/selection": "0.3.11",
- "@lexical/table": "0.3.11",
- "@lexical/text": "0.3.11",
- "@lexical/utils": "0.3.11",
- "@lexical/yjs": "0.3.11"
- },
- "peerDependencies": {
- "lexical": "0.3.11",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.5.0.tgz",
+ "integrity": "sha512-bba0KXslxjf6M8XXJhx1rsrq9UV/6eo73WCZel2K+tGz8NEn1HCRTebQoebmRikzEQatEa3SoB6R47drMlk7Yw==",
+ "dependencies": {
+ "@lexical/clipboard": "0.5.0",
+ "@lexical/code": "0.5.0",
+ "@lexical/dragon": "0.5.0",
+ "@lexical/hashtag": "0.5.0",
+ "@lexical/history": "0.5.0",
+ "@lexical/link": "0.5.0",
+ "@lexical/list": "0.5.0",
+ "@lexical/mark": "0.5.0",
+ "@lexical/markdown": "0.5.0",
+ "@lexical/overflow": "0.5.0",
+ "@lexical/plain-text": "0.5.0",
+ "@lexical/rich-text": "0.5.0",
+ "@lexical/selection": "0.5.0",
+ "@lexical/table": "0.5.0",
+ "@lexical/text": "0.5.0",
+ "@lexical/utils": "0.5.0",
+ "@lexical/yjs": "0.5.0"
+ },
+ "peerDependencies": {
+ "lexical": "0.5.0",
"react": ">=17.x",
"react-dom": ">=17.x"
}
},
"node_modules/@lexical/rich-text": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.3.11.tgz",
- "integrity": "sha512-AkNVVo+Pw68C8ngl34ySJ2WC3AWLaOANE7ZyCjBLoq8u5SWlysSNNpRemWynnlFXBA6pOP6L55dUSND4kCAukA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.5.0.tgz",
+ "integrity": "sha512-JhgMn70K410j3T/2WefPpEswZ+hWF3aJMNu7zkrCf2wB+KdrrGYoeNSZUzg2r4e6BuJgS117KlD99+MDnokCuw==",
"peerDependencies": {
- "@lexical/clipboard": "0.3.11",
- "@lexical/selection": "0.3.11",
- "@lexical/utils": "0.3.11",
- "lexical": "0.3.11"
+ "@lexical/clipboard": "0.5.0",
+ "@lexical/selection": "0.5.0",
+ "@lexical/utils": "0.5.0",
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/selection": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.3.11.tgz",
- "integrity": "sha512-6SlXUmLP6K2E1OQFS2QcOiGe1fZV4o1vFLynq/st7BVzpQ1/bDMp2lnsnNWyA0H6v36n+wVUvipKsyFcrDtH/w==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.5.0.tgz",
+ "integrity": "sha512-6I5qlqkYDIbDZPGwSOuvpWQUrqMY6URaKwrWsijQZMnNNKscGpC7IKb7sSDKn6YkLm7tuqig3hf2p+6hshkyWg==",
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/table": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.3.11.tgz",
- "integrity": "sha512-/6nDug81vfs6eI3u23JTRcCny1fsJ/gjM/ljERd6+f9rP+yXbStMKIyAsWebz6ZSskoyl5LIj8Po3PParhCdGg==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.5.0.tgz",
+ "integrity": "sha512-VNHWSsTFDSHNzLdQOR9qgKx4tvTuiDz6w0GfwBnMP4Ro2iKKtNowmZO4wDEZtVlUHvLMuOGuYqipOtKEDKbD4w==",
"dependencies": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/text": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.3.11.tgz",
- "integrity": "sha512-GrjVVaN+hpunuzr5vxgoJir6WJeBpKSppqptrWtXwNcUdWTZjl64iT8pq/cseyvK61lVuL6boBEOmY2l0DC0RA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.5.0.tgz",
+ "integrity": "sha512-RqhOBU2Ecg0WVW8p1d3OB2a8sQyvh3suADdr7We50+Dn/k1M+jhKVWiQnf07ve4/yqYTj6/9/8AAg7kuNS2P/A==",
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/utils": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.3.11.tgz",
- "integrity": "sha512-J3HQjPSYg33Yd+g/SUx9Selqn27qCmXN253+0lIEH8R8pn2A+Pe4vrk+/DSr/URuN1GUq+jjLWci3SDsA4h3xQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.5.0.tgz",
+ "integrity": "sha512-FhQ+thPFTOyBxyRGcd3yJuYh/rvD8ro43DaelWD1KpSlwQ/YuWpdxsSuMqJ32ERpl+bmPPFP2kjkBofxSw1Quw==",
"dependencies": {
- "@lexical/list": "0.3.11",
- "@lexical/table": "0.3.11"
+ "@lexical/list": "0.5.0",
+ "@lexical/table": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11"
+ "lexical": "0.5.0"
}
},
"node_modules/@lexical/yjs": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.3.11.tgz",
- "integrity": "sha512-8EXD5EOJF25a5197MNmPqLtThpXhmRkIQadJfOpWwzy/UQ0bwfp02HRwrW8YzuUu43RlVYi5vdeVTOS9LT9pIQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.5.0.tgz",
+ "integrity": "sha512-2io4GqnRoSh6Nu9bzsDOlwPFJYjXZ9SdgU4ZioH2VvyW4wVstd+ZF2QVcUJlhuwgQr6DzuvM/pqN914IufLzpw==",
"dependencies": {
- "@lexical/offset": "0.3.11"
+ "@lexical/offset": "0.5.0"
},
"peerDependencies": {
- "lexical": "0.3.11",
+ "lexical": "0.5.0",
"yjs": ">=13.5.22"
}
},
@@ -21810,9 +21810,9 @@
}
},
"node_modules/lexical": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.3.11.tgz",
- "integrity": "sha512-HZvQ2T3g0jWBX6MC/A0HY1N7NMvR+FrmTfR4vn6WnoCg56UPlkgIX3GKa6rCyGOAnOtykXRPJ831JWEKJUHalQ=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.5.0.tgz",
+ "integrity": "sha512-J0cFuNPQQY5P9W5XW2/xgqp5W0eEQ2rxShLf8eevLvxFWsPSY3zjg3RCzTHyheSiGBBjKDIaM4gxtO8eNeJr2A=="
},
"node_modules/lib0": {
"version": "0.2.52",
@@ -35304,173 +35304,173 @@
}
},
"@lexical/clipboard": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.3.11.tgz",
- "integrity": "sha512-ly+9R2Rccz80eV9Gu0hOi701fXIyU50t+S7OR0Ensos09oAmQPae6poFkvS3k36tH+leLgk0hRZ47pB/+ejENA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/clipboard/-/clipboard-0.5.0.tgz",
+ "integrity": "sha512-JFvdH4N/80GxC0jhaiO/fdUOeYcX8pMFrcrpBDeNIcBN/9eF8Rn/czvoPLLNB9Kcbz8d8XXqabKEGCz2hFL//w==",
"requires": {
- "@lexical/html": "0.3.11",
- "@lexical/list": "0.3.11",
- "@lexical/selection": "0.3.11",
- "@lexical/utils": "0.3.11"
+ "@lexical/html": "0.5.0",
+ "@lexical/list": "0.5.0",
+ "@lexical/selection": "0.5.0",
+ "@lexical/utils": "0.5.0"
}
},
"@lexical/code": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.3.11.tgz",
- "integrity": "sha512-huyOUwrihXydgrNQgrSjy8fkgTNqM67+Yx1c3X0VFWcTvavbbNT8R/sXx8qDMWUARCKEnoEPBUk3Jbtt+9CfPQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/code/-/code-0.5.0.tgz",
+ "integrity": "sha512-GmqRaQ8EBtlu13ObSZYiGDzIsrkwRyyqI2HRVBrPo2iszLBpby+7uIncAVQVkxt1JNYOKE2n4JfxK8TSYyMtYQ==",
"requires": {
- "@lexical/utils": "0.3.11",
+ "@lexical/utils": "0.5.0",
"prismjs": "^1.27.0"
}
},
"@lexical/dragon": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.3.11.tgz",
- "integrity": "sha512-JEIjctxc5IAYWY2Su1xLChco/BaI0ErdQZIgUNzeVLDPTtvZuVJFvlEYkcZov6l0TUdWUzO19hRzqVIp/EWjew=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/dragon/-/dragon-0.5.0.tgz",
+ "integrity": "sha512-Gf0jN8hjlF8E71wAsvbRpR1u9oS6RUjUw3VWp/Qa+IrtjBFFVzdTUloUs3cjMX9E/MFRJgt3wPsaKx2IuLBWQw=="
},
"@lexical/file": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/file/-/file-0.3.11.tgz",
- "integrity": "sha512-etufm9hoc5R3yKxX365EJTc5DS8xW59Wa8awRpgeRu8UjkP1DVdRyJWxOYkkKBlziwFs6PvIFLXrPCNQ0Om1DA=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/file/-/file-0.5.0.tgz",
+ "integrity": "sha512-Jxh7DOReoeFJUViLqLX+r42j/6CHGX55deyEXna2os82+Q0xcM9GGLYA8NrZdrLUql8p5FWAMIaCBok/8N8h9A=="
},
"@lexical/hashtag": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.3.11.tgz",
- "integrity": "sha512-dNUiIGW5F+Oqj/JBfp9nrSlnutpiUI0eml19CTAiAbgeMZiOeFPmicKdVMn/Lx6nxW6c+uxIbBk3ONSNZar2zA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/hashtag/-/hashtag-0.5.0.tgz",
+ "integrity": "sha512-3MT72y72BmK4q7Rtb9gP3n83UL4vWC078T9io4zyPxKEI1Mh3UAVuRwh6Ypn0FeH94XvmuZAGVdoOC/nTd1now==",
"requires": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
}
},
"@lexical/history": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.3.11.tgz",
- "integrity": "sha512-XzhT0pKXs1QhTVIpiYHbeIf8J0M85mQQUnQFlT1FVd14SFodfpLJiYaLZNiUxm1NcMnJStmBGf0DiGdkdCIWDg==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/history/-/history-0.5.0.tgz",
+ "integrity": "sha512-DCQgh1aQ1KS5JVYPU6GYr52BN0MQqmoXfFtf5uYCX9CbSAC0hDSK8ZPqwFW7jINqe6GwXxy7bo32j7E0A5023A==",
"requires": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
}
},
"@lexical/html": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.3.11.tgz",
- "integrity": "sha512-cw6IjI+OQr6Dwm1Mvkws0HsMOZ0lIky/DIhSt7ZAcUya+N1sis3kNIhg5Gijvpao+/n17QPgOwWS2sE7PFESmg==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/html/-/html-0.5.0.tgz",
+ "integrity": "sha512-uJAof6gXTLOH9JnmPJ+wxILFtu7I/eCebFyVMjV53sqaeLsQ3pDfBTUe4RO+NciC+XBQ1WVpZgCM8Yx5c5cMmQ==",
"requires": {
- "@lexical/selection": "0.3.11"
+ "@lexical/selection": "0.5.0"
}
},
"@lexical/link": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.3.11.tgz",
- "integrity": "sha512-oNxS9vKKoYwkVyWdbHHPjcgtzap4yTj+72JEKcqmpQyox6FhUJpapEiWtWdpYPW/KaMZWfABY/zn5Cea0gq5CQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/link/-/link-0.5.0.tgz",
+ "integrity": "sha512-XB8e+UPI9jeqsi7+Wr0n9SToljiS+gZmJ5gXANtR6lSZPtpcSUPs1iJZU2A2dNKXdvsZwSPCFdPL6ogFaaRvvQ==",
"requires": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
}
},
"@lexical/list": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.3.11.tgz",
- "integrity": "sha512-l79kqwFRTuUx+fNxRmYaqP27tB7va/MAKoRL1Jzv1EYBZjz0fEHxpaRBG7Y5JHSMMFRQrJEhL4hKMs2EiCecvQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/list/-/list-0.5.0.tgz",
+ "integrity": "sha512-TYXe4FtNL7Lk3XDEhPyUbT0Pb1TU58qZywGCdrtuRjPnF4oDvRXgg9EhYWfHzYwdsyhNgaHId+Fq41CjrwTMYg==",
"requires": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
}
},
"@lexical/mark": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.3.11.tgz",
- "integrity": "sha512-+OF+wytxcg54hVtM2zkjcGTS7CIgVhgyznoukWTgwWgFjkPHMfnLafBqmn61F5kAua1YZZZszzHOifinW2d4pA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/mark/-/mark-0.5.0.tgz",
+ "integrity": "sha512-leeqegWD4hqUdfYNsxB5iwsWozX2oc6mnJzcJfR4UB3Ksr0zH2xHc/z3Zp+CTeGuK5Tzppq5yGS+4cQ5xNpVgQ==",
"requires": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
}
},
"@lexical/markdown": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.3.11.tgz",
- "integrity": "sha512-Qz8jxhvgDBUY6PzbSArnOHtoOkzCVaOpEwOSZbkSbiWgXyIti1sw7kSFWSEy3lnGNHTacrmYcxwHLHUChMmMLA==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/markdown/-/markdown-0.5.0.tgz",
+ "integrity": "sha512-02RLx7PdVzvYxvx65FTbXkW6KcjQZ1waAaMDNKdtBV9r9Mv2Y2XunCUjErYHQ1JN9JkGGv0+JuliRT7qZTsF+Q==",
"requires": {
- "@lexical/code": "0.3.11",
- "@lexical/link": "0.3.11",
- "@lexical/list": "0.3.11",
- "@lexical/rich-text": "0.3.11",
- "@lexical/text": "0.3.11",
- "@lexical/utils": "0.3.11"
+ "@lexical/code": "0.5.0",
+ "@lexical/link": "0.5.0",
+ "@lexical/list": "0.5.0",
+ "@lexical/rich-text": "0.5.0",
+ "@lexical/text": "0.5.0",
+ "@lexical/utils": "0.5.0"
}
},
"@lexical/offset": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.3.11.tgz",
- "integrity": "sha512-PD/8CZlG9sFJp4NAeRUpcTLedX6TbI3G3zhNJtJFb23deESF7BEZOywEsInR/7RDe/xEd3MKR+GCD89/D9INWg=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/offset/-/offset-0.5.0.tgz",
+ "integrity": "sha512-ie4AFbvtt0CFBqaMcb0/gUuhoTt+YwbFXPFo1hW+oDVpmo3rJsEJKVsHhftBvHIP+/G5QlgPIhVmnlcSvEteTw=="
},
"@lexical/overflow": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.3.11.tgz",
- "integrity": "sha512-2UBiGC99ho9B2NDUu6ctUT5hoAEq8EfsbHhrwZBlNnspbl9DVmV70hhSgm0gVI/kRPvgkee0AUWywmfDAg1UPw=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/overflow/-/overflow-0.5.0.tgz",
+ "integrity": "sha512-N+BQvgODU9lS7VK4FlxIRhGeASwsxfdkECtZ5iomHfqqNEI0WPLHbCTCkwS10rjfH1NrkXC314Y0SG2F7Ncv9Q=="
},
"@lexical/plain-text": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.3.11.tgz",
- "integrity": "sha512-AfCHJPtY0g/gknYDCU2uZ5NHASSp1Gg7Ho7OuAi3sVOuVqs+SHI+ZkeC3y7MxrGhOP3TnZ+EsltAbToEQclSDA=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/plain-text/-/plain-text-0.5.0.tgz",
+ "integrity": "sha512-t1rnVnSXbPs9jLN/36/xZLNAlF9jwv8rSh6GHsjRIYiWX/MovNmgPmhNq/nkc+gRFZ2FKTFjdz3UeAUF4xQZMw=="
},
"@lexical/react": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.3.11.tgz",
- "integrity": "sha512-ynqsHl/ZDuvBoJjqcvWdlXKtGaZ47GbvcJtIARt9ya6G+z6+dqGzLp+ZSJIXHSt0Bet3YMzu3BZxCDpmJZkhbQ==",
- "requires": {
- "@lexical/clipboard": "0.3.11",
- "@lexical/code": "0.3.11",
- "@lexical/dragon": "0.3.11",
- "@lexical/hashtag": "0.3.11",
- "@lexical/history": "0.3.11",
- "@lexical/link": "0.3.11",
- "@lexical/list": "0.3.11",
- "@lexical/mark": "0.3.11",
- "@lexical/markdown": "0.3.11",
- "@lexical/overflow": "0.3.11",
- "@lexical/plain-text": "0.3.11",
- "@lexical/rich-text": "0.3.11",
- "@lexical/selection": "0.3.11",
- "@lexical/table": "0.3.11",
- "@lexical/text": "0.3.11",
- "@lexical/utils": "0.3.11",
- "@lexical/yjs": "0.3.11"
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/react/-/react-0.5.0.tgz",
+ "integrity": "sha512-bba0KXslxjf6M8XXJhx1rsrq9UV/6eo73WCZel2K+tGz8NEn1HCRTebQoebmRikzEQatEa3SoB6R47drMlk7Yw==",
+ "requires": {
+ "@lexical/clipboard": "0.5.0",
+ "@lexical/code": "0.5.0",
+ "@lexical/dragon": "0.5.0",
+ "@lexical/hashtag": "0.5.0",
+ "@lexical/history": "0.5.0",
+ "@lexical/link": "0.5.0",
+ "@lexical/list": "0.5.0",
+ "@lexical/mark": "0.5.0",
+ "@lexical/markdown": "0.5.0",
+ "@lexical/overflow": "0.5.0",
+ "@lexical/plain-text": "0.5.0",
+ "@lexical/rich-text": "0.5.0",
+ "@lexical/selection": "0.5.0",
+ "@lexical/table": "0.5.0",
+ "@lexical/text": "0.5.0",
+ "@lexical/utils": "0.5.0",
+ "@lexical/yjs": "0.5.0"
}
},
"@lexical/rich-text": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.3.11.tgz",
- "integrity": "sha512-AkNVVo+Pw68C8ngl34ySJ2WC3AWLaOANE7ZyCjBLoq8u5SWlysSNNpRemWynnlFXBA6pOP6L55dUSND4kCAukA=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/rich-text/-/rich-text-0.5.0.tgz",
+ "integrity": "sha512-JhgMn70K410j3T/2WefPpEswZ+hWF3aJMNu7zkrCf2wB+KdrrGYoeNSZUzg2r4e6BuJgS117KlD99+MDnokCuw=="
},
"@lexical/selection": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.3.11.tgz",
- "integrity": "sha512-6SlXUmLP6K2E1OQFS2QcOiGe1fZV4o1vFLynq/st7BVzpQ1/bDMp2lnsnNWyA0H6v36n+wVUvipKsyFcrDtH/w=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/selection/-/selection-0.5.0.tgz",
+ "integrity": "sha512-6I5qlqkYDIbDZPGwSOuvpWQUrqMY6URaKwrWsijQZMnNNKscGpC7IKb7sSDKn6YkLm7tuqig3hf2p+6hshkyWg=="
},
"@lexical/table": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.3.11.tgz",
- "integrity": "sha512-/6nDug81vfs6eI3u23JTRcCny1fsJ/gjM/ljERd6+f9rP+yXbStMKIyAsWebz6ZSskoyl5LIj8Po3PParhCdGg==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/table/-/table-0.5.0.tgz",
+ "integrity": "sha512-VNHWSsTFDSHNzLdQOR9qgKx4tvTuiDz6w0GfwBnMP4Ro2iKKtNowmZO4wDEZtVlUHvLMuOGuYqipOtKEDKbD4w==",
"requires": {
- "@lexical/utils": "0.3.11"
+ "@lexical/utils": "0.5.0"
}
},
"@lexical/text": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.3.11.tgz",
- "integrity": "sha512-GrjVVaN+hpunuzr5vxgoJir6WJeBpKSppqptrWtXwNcUdWTZjl64iT8pq/cseyvK61lVuL6boBEOmY2l0DC0RA=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/text/-/text-0.5.0.tgz",
+ "integrity": "sha512-RqhOBU2Ecg0WVW8p1d3OB2a8sQyvh3suADdr7We50+Dn/k1M+jhKVWiQnf07ve4/yqYTj6/9/8AAg7kuNS2P/A=="
},
"@lexical/utils": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.3.11.tgz",
- "integrity": "sha512-J3HQjPSYg33Yd+g/SUx9Selqn27qCmXN253+0lIEH8R8pn2A+Pe4vrk+/DSr/URuN1GUq+jjLWci3SDsA4h3xQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/utils/-/utils-0.5.0.tgz",
+ "integrity": "sha512-FhQ+thPFTOyBxyRGcd3yJuYh/rvD8ro43DaelWD1KpSlwQ/YuWpdxsSuMqJ32ERpl+bmPPFP2kjkBofxSw1Quw==",
"requires": {
- "@lexical/list": "0.3.11",
- "@lexical/table": "0.3.11"
+ "@lexical/list": "0.5.0",
+ "@lexical/table": "0.5.0"
}
},
"@lexical/yjs": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.3.11.tgz",
- "integrity": "sha512-8EXD5EOJF25a5197MNmPqLtThpXhmRkIQadJfOpWwzy/UQ0bwfp02HRwrW8YzuUu43RlVYi5vdeVTOS9LT9pIQ==",
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/@lexical/yjs/-/yjs-0.5.0.tgz",
+ "integrity": "sha512-2io4GqnRoSh6Nu9bzsDOlwPFJYjXZ9SdgU4ZioH2VvyW4wVstd+ZF2QVcUJlhuwgQr6DzuvM/pqN914IufLzpw==",
"requires": {
- "@lexical/offset": "0.3.11"
+ "@lexical/offset": "0.5.0"
}
},
"@mdx-js/mdx": {
@@ -48761,9 +48761,9 @@
}
},
"lexical": {
- "version": "0.3.11",
- "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.3.11.tgz",
- "integrity": "sha512-HZvQ2T3g0jWBX6MC/A0HY1N7NMvR+FrmTfR4vn6WnoCg56UPlkgIX3GKa6rCyGOAnOtykXRPJ831JWEKJUHalQ=="
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/lexical/-/lexical-0.5.0.tgz",
+ "integrity": "sha512-J0cFuNPQQY5P9W5XW2/xgqp5W0eEQ2rxShLf8eevLvxFWsPSY3zjg3RCzTHyheSiGBBjKDIaM4gxtO8eNeJr2A=="
},
"lib0": {
"version": "0.2.52",
diff --git a/package.json b/package.json
index 890d9e5..da6f777 100644
--- a/package.json
+++ b/package.json
@@ -90,22 +90,22 @@
},
"dependencies": {
"@excalidraw/excalidraw": "0.11.0",
- "@lexical/clipboard": "0.3.11",
- "@lexical/code": "0.3.11",
- "@lexical/file": "0.3.11",
- "@lexical/hashtag": "0.3.11",
- "@lexical/link": "0.3.11",
- "@lexical/list": "0.3.11",
- "@lexical/mark": "0.3.11",
- "@lexical/overflow": "0.3.11",
- "@lexical/plain-text": "0.3.11",
- "@lexical/react": "0.3.11",
- "@lexical/rich-text": "0.3.11",
- "@lexical/selection": "0.3.11",
- "@lexical/table": "0.3.11",
- "@lexical/utils": "0.3.11",
+ "@lexical/clipboard": "^0.5.0",
+ "@lexical/code": "^0.5.0",
+ "@lexical/file": "^0.5.0",
+ "@lexical/hashtag": "^0.5.0",
+ "@lexical/link": "^0.5.0",
+ "@lexical/list": "^0.5.0",
+ "@lexical/mark": "^0.5.0",
+ "@lexical/overflow": "^0.5.0",
+ "@lexical/plain-text": "^0.5.0",
+ "@lexical/react": "^0.5.0",
+ "@lexical/rich-text": "^0.5.0",
+ "@lexical/selection": "^0.5.0",
+ "@lexical/table": "^0.5.0",
+ "@lexical/utils": "^0.5.0",
"katex": "^0.15.2",
- "lexical": "0.3.11",
+ "lexical": "^0.5.0",
"use-child": "^1.0.0",
"utility-types": "^3.10.0",
"y-websocket": ">=1.3.x",
diff --git a/src/Editor.tsx b/src/Editor.tsx
index 44d4ba6..f0a0481 100644
--- a/src/Editor.tsx
+++ b/src/Editor.tsx
@@ -46,8 +46,7 @@ interface IEditorProps {
actionsEnabled?: boolean;
placeholder?: string;
listMaxIndent?: number;
- initialEditorState?: string;
- isReadOnly?: boolean;
+ isEditable?: boolean;
onChange?: (editorState: string, editorInstance?: LexicalEditor) => void;
}
@@ -59,8 +58,7 @@ const Editor = ({
actionsEnabled = false,
listMaxIndent = 7,
placeholder = '',
- initialEditorState,
- isReadOnly = false,
+ isEditable = true,
onChange,
}: IEditorProps) => {
const [editor] = useLexicalComposerContext();
@@ -75,7 +73,7 @@ const Editor = ({
const scrollRef = useRef(null);
useEffect(() => {
- editor.setReadOnly(isReadOnly);
+ editor.setEditable(isEditable);
}, []);
return (
@@ -97,10 +95,8 @@ const Editor = ({
}
placeholder={placeholderComponent}
- initialEditorState={initialEditorState}
/>
{
onChange?.(JSON.stringify(editorState), activeEditor);
return (editorStateRef.current = editorState);
diff --git a/src/nodes/ExcalidrawNode/index.tsx b/src/nodes/ExcalidrawNode/index.tsx
index 58dad2c..d245088 100644
--- a/src/nodes/ExcalidrawNode/index.tsx
+++ b/src/nodes/ExcalidrawNode/index.tsx
@@ -48,7 +48,7 @@ function ExcalidrawComponent({
}): JSX.Element {
const [editor] = useLexicalComposerContext();
const [isModalOpen, setModalOpen] = useState(
- data === '[]' && !editor.isReadOnly()
+ data === '[]' && editor.isEditable()
);
const imageContainerRef = useRef(null);
const buttonRef = useRef(null);
@@ -77,9 +77,9 @@ function ExcalidrawComponent({
// Set editor to readOnly if excalidraw is open to prevent unwanted changes
useEffect(() => {
if (isModalOpen) {
- editor.setReadOnly(true);
+ editor.setEditable(false);
} else {
- editor.setReadOnly(false);
+ editor.setEditable(true);
}
}, [isModalOpen, editor]);
@@ -135,7 +135,7 @@ function ExcalidrawComponent({
}, [editor, nodeKey]);
const setData = (newData: ReadonlyArray) => {
- if (editor.isReadOnly()) {
+ if (!editor.isEditable()) {
return;
}
return editor.update(() => {
@@ -169,11 +169,11 @@ function ExcalidrawComponent({
isShown={isModalOpen}
onDelete={deleteNode}
onHide={() => {
- editor.setReadOnly(false);
+ editor.setEditable(true);
setModalOpen(false);
}}
onSave={(newData) => {
- editor.setReadOnly(false);
+ editor.setEditable(true);
setData(newData);
setModalOpen(false);
}}
diff --git a/src/nodes/ImageNode.tsx b/src/nodes/ImageNode.tsx
index e86cb3c..2cc4a80 100644
--- a/src/nodes/ImageNode.tsx
+++ b/src/nodes/ImageNode.tsx
@@ -286,7 +286,6 @@ function ImageComponent({
Enter a caption...
}
- initialEditorState={null}
/>
{showNestedEditorTreeView === true ? : null}
diff --git a/src/nodes/StickyNode.tsx b/src/nodes/StickyNode.tsx
index 220d870..a34893b 100644
--- a/src/nodes/StickyNode.tsx
+++ b/src/nodes/StickyNode.tsx
@@ -268,7 +268,6 @@ function StickyComponent({
What's up?
}
- initialEditorState={null}
/>
diff --git a/src/nodes/TypeaheadNode.ts b/src/nodes/TypeaheadNode.ts
index 503ce93..1f65b01 100644
--- a/src/nodes/TypeaheadNode.ts
+++ b/src/nodes/TypeaheadNode.ts
@@ -54,5 +54,5 @@ export class TypeaheadNode extends TextNode {
}
export function $createTypeaheadNode(text: string): TypeaheadNode {
- return new TypeaheadNode(text).setMode('inert');
+ return new TypeaheadNode(text).setMode('token');
}
diff --git a/src/plugins/ActionsPlugin.tsx b/src/plugins/ActionsPlugin.tsx
index eaf1c1c..3de6f49 100644
--- a/src/plugins/ActionsPlugin.tsx
+++ b/src/plugins/ActionsPlugin.tsx
@@ -42,7 +42,7 @@ export default function ActionsPlugin({
isRichText: boolean;
}): JSX.Element {
const [editor] = useLexicalComposerContext();
- const [isReadOnly, setIsReadyOnly] = useState(() => editor.isReadOnly());
+ const [isEditable, setIsEditable] = useState(() => editor.isEditable());
const [isSpeechToText, setIsSpeechToText] = useState(false);
const [connected, setConnected] = useState(false);
const [isEditorEmpty, setIsEditorEmpty] = useState(true);
@@ -52,8 +52,8 @@ export default function ActionsPlugin({
useEffect(() => {
return mergeRegister(
- editor.registerReadOnlyListener((readOnly) => {
- setIsReadyOnly(readOnly);
+ editor.registerEditableListener((editable) => {
+ setIsEditable(editable);
}),
editor.registerCommand(
CONNECTED_COMMAND,
@@ -165,15 +165,15 @@ export default function ActionsPlugin({