{"_id":"@dalfiannur/lexical-editor","_rev":"10-bc51d64e9d7775db0906ec83e29a230a","name":"@dalfiannur/lexical-editor","dist-tags":{"latest":"1.0.8"},"versions":{"0.38.2":{"name":"@dalfiannur/lexical-editor","version":"0.38.2","_id":"@dalfiannur/lexical-editor@0.38.2","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"dist":{"shasum":"0e0788704a26c9ed4c65acfa66dcd2aace49f1f0","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-0.38.2.tgz","fileCount":375,"integrity":"sha512-F3iFAtZiq8dfjwcxLrC58z8r2fb7Ff4URjRckIaUzT1YY2xESdl1uPmcuEv6Oqw65FbKlNHIsC02o3u83oxK4w==","signatures":[{"sig":"MEYCIQDOBlVJkZKvQiPUd+Scam2Yu/I5cqNpYuKBg42pxu8fnwIhAMiBRdkXeEsAbrPbampSE6A7HMi0bBbQvA4AMmoB4xCC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4123504},"type":"module","gitHead":"6296fe9f1bf08b6c92b3b7acc9961d794172fe48","private":false,"scripts":{"dev":"vite --host --port 3000","preview":"vite preview","build-dev":"vite build","build-prod":"vite build --mode production","build-vercel":"(cd ../../ && node ./scripts/build.js) && npm run build-dev"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"_npmVersion":"11.6.2","directories":{},"sideEffects":false,"_nodeVersion":"25.1.0","dependencies":{"yjs":">=13.5.42","katex":"^0.16.10","react":"^19.1.1","lexical":"0.38.2","date-fns":"^4.1.0","prettier":"^3.6.2","lodash-es":"^4.17.21","react-dom":"^19.1.1","y-websocket":"^1.5.4","@lexical/code":"0.38.2","@lexical/file":"0.38.2","@lexical/link":"0.38.2","@lexical/list":"0.38.2","@lexical/mark":"0.38.2","@lexical/react":"0.38.2","@lexical/table":"0.38.2","@lexical/utils":"0.38.2","@lexical/hashtag":"0.38.2","react-day-picker":"^9.7.0","@lexical/overflow":"0.38.2","@lexical/clipboard":"0.38.2","@lexical/rich-text":"0.38.2","@lexical/selection":"0.38.2","@lexical/code-shiki":"0.38.2","@lexical/plain-text":"0.38.2","react-error-boundary":"^6.0.0","@excalidraw/excalidraw":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.1.4","@prettier/sync":"^0.6.1","@types/lodash-es":"^4.14.182","rollup-plugin-copy":"^3.5.0","@babel/preset-react":"^7.24.7","@rollup/plugin-babel":"^6.0.4","@vitejs/plugin-react":"^5.0.2","@rollup/plugin-commonjs":"^25.0.7","vite-plugin-static-copy":"^2.3.0","@babel/plugin-transform-flow-strip-types":"^7.24.7"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_0.38.2_1762943637527_0.366915163176754","host":"s3://npm-registry-packages-npm-production"}},"0.38.3":{"name":"@dalfiannur/lexical-editor","version":"0.38.3","_id":"@dalfiannur/lexical-editor@0.38.3","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"dist":{"shasum":"e79360ab455748dc7febc4a5a86286c537c05509","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-0.38.3.tgz","fileCount":132,"integrity":"sha512-X9s626IiCuhrr5+Ipy1GLdGjWGUTZr9fd2pm1qmu93JDUxAxVl73l3HxWzNM/hP/2W2XqBVPpekaZOHYH68Ftw==","signatures":[{"sig":"MEUCIFNLRTUOkYowBZoZ4pT+WQuJ3HfdJSE9UsicTg5JdfgbAiEArhtdVkihoctj25xlVdPvuDdWViGxauoHtk03QFaO8Zs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28679872},"type":"module","exports":{".":{"import":"./dist/lexical-editor.js","require":"./dist/lexical-editor.umd.js"}},"gitHead":"6296fe9f1bf08b6c92b3b7acc9961d794172fe48","private":false,"scripts":{"dev":"vite --host --port 3000","preview":"vite preview","publish":"npm run build-lib && npm publish --access public","build-dev":"vite build","build-lib":"vite --config vite-library.config.ts build --mode production","build-prod":"vite build --mode production","build-vercel":"(cd ../../ && node ./scripts/build.js) && npm run build-dev"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"_npmVersion":"11.6.2","directories":{},"sideEffects":false,"_nodeVersion":"25.1.0","dependencies":{"yjs":">=13.5.42","katex":"^0.16.10","lexical":"0.38.2","date-fns":"^4.1.0","prettier":"^3.6.2","lodash-es":"^4.17.21","y-websocket":"^1.5.4","@lexical/code":"0.38.2","@lexical/file":"0.38.2","@lexical/link":"0.38.2","@lexical/list":"0.38.2","@lexical/mark":"0.38.2","@lexical/react":"0.38.2","@lexical/table":"0.38.2","@lexical/utils":"0.38.2","@lexical/hashtag":"0.38.2","react-day-picker":"^9.7.0","@lexical/overflow":"0.38.2","@lexical/clipboard":"0.38.2","@lexical/rich-text":"0.38.2","@lexical/selection":"0.38.2","@lexical/code-shiki":"0.38.2","@lexical/plain-text":"0.38.2","react-error-boundary":"^6.0.0","@excalidraw/excalidraw":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.1.4","@prettier/sync":"^0.6.1","@types/lodash-es":"^4.14.182","rollup-plugin-copy":"^3.5.0","@babel/preset-react":"^7.24.7","@rollup/plugin-babel":"^6.0.4","@vitejs/plugin-react":"^5.0.2","@rollup/plugin-commonjs":"^25.0.7","vite-plugin-static-copy":"^2.3.0","@babel/plugin-transform-flow-strip-types":"^7.24.7"},"peerDependencies":{"react":"^19.1.1","react-dom":"^19.1.1"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_0.38.3_1762947052500_0.9080454297853546","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@dalfiannur/lexical-editor","version":"1.0.1","_id":"@dalfiannur/lexical-editor@1.0.1","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"dist":{"shasum":"cf6d4d062756066cdbdbca078ebfc3daac7e520e","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-1.0.1.tgz","fileCount":108,"integrity":"sha512-vL/KkRW2cGwIFuWJ+GHV/YG2ANuPRIeRNWfwzs1bAdZI+NOKx/Un/NHmrlWlIVolRxFx8g0qQqFFizwhEfQm8A==","signatures":[{"sig":"MEQCIBVeBrJp0TdqLpxzJgo32UNJYQID8N8qbZfNG8Uu4zHOAiAkFSfE+Rxp25NB0I96+xFU72FcpCkOpoeXeF5zfTc46w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":448330},"private":false,"scripts":{"dev":"rspack dev","build":"rspack build","check":"biome check --write","format":"biome format --write","preview":"rspack preview","npm:publish":"npm publish"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"_npmVersion":"11.6.2","description":"Install the dependencies:","directories":{},"_nodeVersion":"24.11.1","dependencies":{"yjs":"^13.6.27","katex":"^0.16.25","react":"^19.1.1","lexical":"^0.38.2","react-dom":"^19.1.1","y-websocket":"^3.0.0","@lexical/yjs":"^0.38.2","@lexical/link":"^0.38.2","@lexical/react":"^0.38.2","@lexical/utils":"^0.38.2","react-day-picker":"^9.11.1","@lexical/code-shiki":"^0.38.2","@excalidraw/excalidraw":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@rspack/cli":"^1.6.1","@rspack/core":"^1.6.1","@types/react":"^19.1.13","react-refresh":"^0.18.0","@biomejs/biome":"2.3.2","@types/react-dom":"^19.1.9","@rspack/plugin-react-refresh":"^1.5.2"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_1.0.1_1765179870158_0.01936545604532247","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@dalfiannur/lexical-editor","version":"1.0.2","_id":"@dalfiannur/lexical-editor@1.0.2","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"dist":{"shasum":"5ee66ea2c0faaef7b4c8a394c1ac62567774d603","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-1.0.2.tgz","fileCount":271,"integrity":"sha512-rpQ12IeLhliWirAaCMySneZD+mwlPtTiVYLMbVvrMsd8u4SSr+xneV0FsR1KG4cAbpLaFuVBcwle2ncMZQXXbw==","signatures":[{"sig":"MEQCIHNvkePIuuUBXbtUwp+cMrAHdaDr6ku9nWtGJaHvoBsFAiA+8AewTc7jQO/XhPoIpcYqS9TRhbtgqo70UNkqXuZCZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2772222},"exports":{"./*":"./src/*.tsx","./css/*":"./src/*.css"},"private":false,"scripts":{"lint":"eslint . --max-warnings 0","check-types":"tsc --noEmit","npm:publish":"npm publish","generate:component":"turbo gen react-component"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"_npmVersion":"11.6.2","description":"To install dependencies:","directories":{},"_nodeVersion":"24.11.1","dependencies":{"yjs":"^13.6.27","clsx":"^2.1.1","katex":"^0.16.25","react":"^19.2.0","lexical":"^0.38.2","date-fns":"^4.1.0","lodash-es":"^4.17.21","react-dom":"^19.2.0","y-websocket":"^3.0.0","@lexical/yjs":"^0.38.2","@lexical/code":"^0.38.2","@lexical/file":"^0.38.2","@lexical/html":"^0.38.2","@lexical/link":"^0.38.2","@lexical/list":"^0.38.2","@lexical/mark":"^0.38.2","@lexical/text":"^0.38.2","@lexical/react":"^0.38.2","@lexical/table":"^0.38.2","@lexical/utils":"^0.38.2","@lexical/hashtag":"^0.38.2","react-day-picker":"^9.11.1","@lexical/markdown":"^0.38.2","@lexical/overflow":"^0.38.2","@floating-ui/react":"^0.27.16","@lexical/clipboard":"^0.38.2","@lexical/rich-text":"^0.38.2","@lexical/selection":"^0.38.2","@lexical/code-shiki":"^0.38.2","react-error-boundary":"^6.0.0","@excalidraw/excalidraw":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.2","@types/react":"^19.2.4","@types/react-dom":"^19.2.3","@repo/typescript-config":"*"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_1.0.2_1765180885659_0.4022538668052995","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@dalfiannur/lexical-editor","version":"1.0.3","_id":"@dalfiannur/lexical-editor@1.0.3","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"dist":{"shasum":"080e273db18deb5be0e265b103a1cbc1bbf5b941","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-1.0.3.tgz","fileCount":271,"integrity":"sha512-UCJlyYCE92GrvHz79CjI0f1xy4GDo/Q7SAcX08L5Mpzsw4FRLIuR+VDXSo2L5rqt1jAbZuc8cl2rA3lqSiBRrw==","signatures":[{"sig":"MEQCIG8TYKc2j+t68O9G8ys0Ip49PdvV1h6Va5yLUj7kto90AiBBqXq00gihlm1dt8xr7EreEpzSCWIir7HQ7CONPgV+CQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2772119},"exports":{"./*":"./src/*.tsx","./css/*":"./src/*.css"},"private":false,"scripts":{"lint":"eslint . --max-warnings 0","build":"tsc","check-types":"tsc --noEmit","npm:publish":"npm publish","generate:component":"turbo gen react-component"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"_npmVersion":"11.6.2","description":"To install dependencies:","directories":{},"_nodeVersion":"24.11.1","dependencies":{"yjs":"^13.6.27","clsx":"^2.1.1","katex":"^0.16.25","react":"^19.2.0","lodash":"^4.17.21","lexical":"^0.38.2","date-fns":"^4.1.0","prettier":"^3.7.4","lodash-es":"^4.17.21","react-dom":"^19.2.0","y-websocket":"^3.0.0","@lexical/yjs":"^0.38.2","@lexical/code":"^0.38.2","@lexical/file":"^0.38.2","@lexical/html":"^0.38.2","@lexical/link":"^0.38.2","@lexical/list":"^0.38.2","@lexical/mark":"^0.38.2","@lexical/text":"^0.38.2","@lexical/react":"^0.38.2","@lexical/table":"^0.38.2","@lexical/utils":"^0.38.2","@lexical/hashtag":"^0.38.2","react-day-picker":"^9.11.1","@lexical/headless":"^0.38.2","@lexical/markdown":"^0.38.2","@lexical/overflow":"^0.38.2","@floating-ui/react":"^0.27.16","@lexical/clipboard":"^0.38.2","@lexical/rich-text":"^0.38.2","@lexical/selection":"^0.38.2","@lexical/code-shiki":"^0.38.2","react-error-boundary":"^6.0.0","@excalidraw/excalidraw":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.2","@types/react":"^19.2.4","@types/lodash":"^4.17.21","@types/lodash-es":"^4.17.12","@types/react-dom":"^19.2.3"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_1.0.3_1765183427059_0.7693251936366523","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@dalfiannur/lexical-editor","version":"1.0.4","_id":"@dalfiannur/lexical-editor@1.0.4","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"dist":{"shasum":"e636305202bc8570865710ebc34c4b874c9295f5","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-1.0.4.tgz","fileCount":351,"integrity":"sha512-5DHOzuk7w+ZUvP54DFKOVAVIFhZor5mgpGC9IGPCQrPEFEsk4V9HHOmBpjpOwFPeD8PujzyxEooKZkDH2gBd0w==","signatures":[{"sig":"MEYCIQD282Pjr4D2vkKSqf3NvhcNBNhrSk2hO2ADqaL/0QlaOgIhAMf2Z8jQ6BGu13n0RjyWO1ORy4PwqGKouJEAjaBAr4MG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1605748},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","private":false,"scripts":{"lint":"eslint . --max-warnings 0","build":"tsc","check-types":"tsc --noEmit","npm:publish":"npm publish","generate:component":"turbo gen react-component"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"_npmVersion":"11.6.2","description":"To install dependencies:","directories":{},"_nodeVersion":"24.11.1","dependencies":{"yjs":"^13.6.27","clsx":"^2.1.1","katex":"^0.16.25","react":"^19.2.0","lodash":"^4.17.21","lexical":"^0.38.2","date-fns":"^4.1.0","prettier":"^3.7.4","lodash-es":"^4.17.21","react-dom":"^19.2.0","y-websocket":"^3.0.0","@lexical/yjs":"^0.38.2","@lexical/code":"^0.38.2","@lexical/file":"^0.38.2","@lexical/html":"^0.38.2","@lexical/link":"^0.38.2","@lexical/list":"^0.38.2","@lexical/mark":"^0.38.2","@lexical/text":"^0.38.2","@lexical/react":"^0.38.2","@lexical/table":"^0.38.2","@lexical/utils":"^0.38.2","@lexical/hashtag":"^0.38.2","react-day-picker":"^9.11.1","@lexical/headless":"^0.38.2","@lexical/markdown":"^0.38.2","@lexical/overflow":"^0.38.2","@floating-ui/react":"^0.27.16","@lexical/clipboard":"^0.38.2","@lexical/rich-text":"^0.38.2","@lexical/selection":"^0.38.2","@lexical/code-shiki":"^0.38.2","react-error-boundary":"^6.0.0","@excalidraw/excalidraw":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.2","@types/react":"^19.2.4","@types/lodash":"^4.17.21","@types/lodash-es":"^4.17.12","@types/react-dom":"^19.2.3"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_1.0.4_1765183706192_0.10482570537661817","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@dalfiannur/lexical-editor","version":"1.0.5","_id":"@dalfiannur/lexical-editor@1.0.5","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"dist":{"shasum":"a27b32bf0b678d1f2012fbd67a615d91cc8b37a6","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-1.0.5.tgz","fileCount":486,"integrity":"sha512-7LkCtWQI626y9lxr5CZIpWHPeK+9MVoPhtfFL1qWvjpPlaluv0mVvEhJT1KhNRc4DlE8RJxb1B7wscH7Mq+tKw==","signatures":[{"sig":"MEYCIQCETlihkvH3KSGLddINLSFQw9YqaX2cxj3pLMl2ZOzTsgIhAJkzOcsgUZ6cD1iHmxUaQ++gfq5tt+ixJ8/s1zy1WeHo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3365249},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","private":false,"scripts":{"lint":"eslint . --max-warnings 0","build":"tsc && node -e \"require('fs').cpSync('src', 'dist', {recursive: true, filter: (src) => !src.endsWith('.ts') && !src.endsWith('.tsx')});\"","check-types":"tsc --noEmit","npm:publish":"npm publish","generate:component":"turbo gen react-component"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"_npmVersion":"11.6.2","description":"To install dependencies:","directories":{},"_nodeVersion":"24.11.1","dependencies":{"yjs":"^13.6.27","clsx":"^2.1.1","katex":"^0.16.25","react":"^19.2.0","lodash":"^4.17.21","lexical":"^0.38.2","date-fns":"^4.1.0","prettier":"^3.7.4","lodash-es":"^4.17.21","react-dom":"^19.2.0","y-websocket":"^3.0.0","@lexical/yjs":"^0.38.2","@lexical/code":"^0.38.2","@lexical/file":"^0.38.2","@lexical/html":"^0.38.2","@lexical/link":"^0.38.2","@lexical/list":"^0.38.2","@lexical/mark":"^0.38.2","@lexical/text":"^0.38.2","@lexical/react":"^0.38.2","@lexical/table":"^0.38.2","@lexical/utils":"^0.38.2","@lexical/hashtag":"^0.38.2","react-day-picker":"^9.11.1","@lexical/headless":"^0.38.2","@lexical/markdown":"^0.38.2","@lexical/overflow":"^0.38.2","@floating-ui/react":"^0.27.16","@lexical/clipboard":"^0.38.2","@lexical/rich-text":"^0.38.2","@lexical/selection":"^0.38.2","@lexical/code-shiki":"^0.38.2","react-error-boundary":"^6.0.0","@excalidraw/excalidraw":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.2","@types/react":"^19.2.4","@types/lodash":"^4.17.21","@types/lodash-es":"^4.17.12","@types/react-dom":"^19.2.3"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_1.0.5_1765184556948_0.7746181817715836","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@dalfiannur/lexical-editor","version":"1.0.6","_id":"@dalfiannur/lexical-editor@1.0.6","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"dist":{"shasum":"f8283d06e159460fcc95df11497788dd05f916d1","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-1.0.6.tgz","fileCount":399,"integrity":"sha512-RVMF2zNL74kp19cg12WrKv8PRmQJ1ZfhGn7OM2oUYJkGlIchR0jp+y+FAT/FDZFNZt8KfRYbH16L023OjoxsxQ==","signatures":[{"sig":"MEUCIQCv0MfCppaPMmSXCtbIOtZGtjPNHhrEjKXx2KeulYJqjgIgZPtcgPN8giBjOYXnL5JrDSZI3d7x/eo6+Xdt7qsvQV8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2873885},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","private":false,"scripts":{"lint":"eslint . --max-warnings 0","build":"tsc && node -e \"require('fs').cpSync('src', 'dist', {recursive: true, filter: (src) => !src.endsWith('.ts') && !src.endsWith('.tsx')});\"","check-types":"tsc --noEmit","npm:publish":"npm publish","generate:component":"turbo gen react-component"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"_npmVersion":"11.6.2","description":"To install dependencies:","directories":{},"_nodeVersion":"24.11.1","dependencies":{"yjs":"^13.6.27","clsx":"^2.1.1","katex":"^0.16.25","react":"^19.2.0","lodash":"^4.17.21","lexical":"^0.38.2","date-fns":"^4.1.0","prettier":"^3.7.4","lodash-es":"^4.17.21","react-dom":"^19.2.0","y-websocket":"^3.0.0","@lexical/yjs":"^0.38.2","@lexical/code":"^0.38.2","@lexical/file":"^0.38.2","@lexical/html":"^0.38.2","@lexical/link":"^0.38.2","@lexical/list":"^0.38.2","@lexical/mark":"^0.38.2","@lexical/text":"^0.38.2","@lexical/react":"^0.38.2","@lexical/table":"^0.38.2","@lexical/utils":"^0.38.2","@lexical/hashtag":"^0.38.2","react-day-picker":"^9.11.1","@lexical/headless":"^0.38.2","@lexical/markdown":"^0.38.2","@lexical/overflow":"^0.38.2","@floating-ui/react":"^0.27.16","@lexical/clipboard":"^0.38.2","@lexical/rich-text":"^0.38.2","@lexical/selection":"^0.38.2","@lexical/code-shiki":"^0.38.2","react-error-boundary":"^6.0.0","@excalidraw/excalidraw":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.2","@types/react":"^19.2.4","@types/lodash":"^4.17.21","@types/lodash-es":"^4.17.12","@types/react-dom":"^19.2.3"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_1.0.6_1765185356071_0.10803132388626002","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"@dalfiannur/lexical-editor","version":"1.0.7","keywords":["react","lexical","editor","contenteditable","rich-text","wysiwyg","clickup text editer","HarshVardhan","Dhrupad patel","Brijesh Padsala","clickuptexteditor","react editor","texteditor","besttexteditor","richtexteditor","drag-and-drop editor","inline formatting","content styles","mobile text editor","nexteditor","nexttexteditor","quill","editor","ck editer","next rich-text editer","language translator rich text editor","language translator","AI (Artificial Intelligence)","AI editor","AI richtexteditor","AI Based text editor","AI Based richtexteditor","AI Based editor","AI Based rich text editor","AI Based texteditor","AI Based richtexteditor","AI Based editor","AI Based rich text editor","AI Based texteditor","AI Based richtexteditor","AI Based editor","AI Based rich text editor"],"author":{"name":"Dhrupad patel ,HarshVardhan ,  Brijesh Padsala"},"license":"MIT","_id":"@dalfiannur/lexical-editor@1.0.7","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"homepage":"https://github.com/drcpythonmfe/-lexical-texteditorclickup#readme","bugs":{"url":"https://github.com/drcpythonmfe/-lexical-texteditorclickup/issues"},"dist":{"shasum":"de78233901b3d0c23c04ccfe79bd3033f999332f","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-1.0.7.tgz","fileCount":280,"integrity":"sha512-chizQl1zoKV2LQYHBZ7sK4zuJpopocL+BbXnjjg5AUzROS6+DP2QghOE+t1jmFKy5wzEaE5f6dFHBpuBgFE6TA==","signatures":[{"sig":"MEUCIQDThSfVs70qNi63aHzsZXcFTJ9nX5vB2Ysq814livht9AIgc9OLam+S6MlmNnwE2eGOiZso5GRXU/Ls0JGv4fenVVU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5463667},"main":"LexicalPlayground.js","gitHead":"a38f1ccc3839c5936d0ade45be8c48ea63fedf6d","private":false,"scripts":{"dev":"vite --host","preview":"vite preview","build-dev":"vite build","build-prod":"vite build --config vite.prod.config.js","build-vercel":"(cd ../../ && node ./scripts/build.js --prod) && npm run build-prod"},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"repository":{"url":"git+https://github.com/drcpythonmfe/-lexical-texteditorclickup.git","type":"git","directory":"packages/lexical-playground"},"_npmVersion":"11.6.2","description":"A temporary packaged fork of Lexical's official playground.","directories":{},"_nodeVersion":"24.11.1","dependencies":{"yjs":">=13.5.42","katex":"^0.15.2","react":">=17.x","lodash":"^4.17.21","lexical":"0.8.1","prettier":"^2.3.2","react-dom":">=17.x","y-websocket":">=1.3.x","use-debounce":"^8.0.1","@lexical/code":"0.8.1","@lexical/file":"0.8.1","@lexical/link":"0.8.1","@lexical/list":"0.8.1","@lexical/mark":"0.8.1","@lexical/react":"0.8.1","@lexical/table":"0.8.1","@lexical/utils":"0.8.1","@lexical/hashtag":"0.8.1","@lexical/overflow":"0.8.1","@lexical/clipboard":"0.8.1","@lexical/rich-text":"0.8.1","@lexical/selection":"0.8.1","@lexical/plain-text":"0.8.1","react-error-boundary":"^3.1.4","@excalidraw/excalidraw":"^0.17.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^2.8.0","katex":"^0.15.2","react":"^18.2.0","react-dom":"^18.2.0","@types/lodash":"^4.14.182","vite-plugin-replace":"0.1.1","@vitejs/plugin-react":"^1.0.7","@excalidraw/excalidraw":"0.17.0"},"peerDependencies":{"react":">=17.x","react-dom":">=17.x"},"_npmOperationalInternal":{"tmp":"tmp/lexical-editor_1.0.7_1765188063266_0.6632245372417325","host":"s3://npm-registry-packages-npm-production"}},"1.0.8":{"name":"@dalfiannur/lexical-editor","description":"A temporary packaged fork of Lexical's official playground.","license":"MIT","keywords":["react","lexical","editor","contenteditable","rich-text","wysiwyg","clickup text editer","HarshVardhan","Dhrupad patel","Brijesh Padsala","clickuptexteditor","react editor","texteditor","besttexteditor","richtexteditor","drag-and-drop editor","inline formatting","content styles","mobile text editor","nexteditor","nexttexteditor","quill","editor","ck editer","next rich-text editer","language translator rich text editor","language translator","AI (Artificial Intelligence)","AI editor","AI richtexteditor","AI Based text editor","AI Based richtexteditor","AI Based editor","AI Based rich text editor","AI Based texteditor","AI Based richtexteditor","AI Based editor","AI Based rich text editor","AI Based texteditor","AI Based richtexteditor","AI Based editor","AI Based rich text editor"],"version":"1.0.8","private":false,"main":"LexicalPlayground.js","scripts":{"dev":"vite --host","build-dev":"vite build","build-prod":"vite build --config vite.prod.config.js","build-vercel":"(cd ../../ && node ./scripts/build.js --prod) && npm run build-prod","preview":"vite preview"},"dependencies":{"@excalidraw/excalidraw":"^0.17.0","@lexical/clipboard":"0.8.1","@lexical/code":"0.8.1","@lexical/file":"0.8.1","@lexical/hashtag":"0.8.1","@lexical/link":"0.8.1","@lexical/list":"0.8.1","@lexical/mark":"0.8.1","@lexical/overflow":"0.8.1","@lexical/plain-text":"0.8.1","@lexical/react":"0.8.1","@lexical/rich-text":"0.8.1","@lexical/selection":"0.8.1","@lexical/table":"0.8.1","@lexical/utils":"0.8.1","katex":"^0.15.2","lexical":"0.8.1","lodash":"^4.17.21","prettier":"^2.3.2","react":">=17.x","react-dom":">=17.x","react-error-boundary":"^3.1.4","use-debounce":"^8.0.1","y-websocket":">=1.3.x","yjs":">=13.5.42"},"peerDependencies":{"react":">=17.x","react-dom":">=17.x"},"devDependencies":{"@excalidraw/excalidraw":"0.17.0","@types/lodash":"^4.14.182","@vitejs/plugin-react":"^1.0.7","katex":"^0.15.2","react":"^18.2.0","react-dom":"^18.2.0","vite":"^2.8.0","vite-plugin-replace":"0.1.1"},"repository":{"type":"git","url":"git+https://github.com/drcpythonmfe/-lexical-texteditorclickup.git","directory":"packages/lexical-playground"},"author":{"name":"Dhrupad patel ,HarshVardhan ,  Brijesh Padsala"},"gitHead":"a38f1ccc3839c5936d0ade45be8c48ea63fedf6d","_id":"@dalfiannur/lexical-editor@1.0.8","bugs":{"url":"https://github.com/drcpythonmfe/-lexical-texteditorclickup/issues"},"homepage":"https://github.com/drcpythonmfe/-lexical-texteditorclickup#readme","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-v+6Pa4SDiQgSZQPFjH0BAlscrDtZI3B3dV8735LjgYoBX2NgqMA+PX+LRqP3PAkVTLPZZa8HkOGbwogmPK1kHQ==","shasum":"531850e628aa247b8ebe0d35f79b290d7c40bf4f","tarball":"https://registry.npmjs.org/@dalfiannur/lexical-editor/-/lexical-editor-1.0.8.tgz","fileCount":280,"unpackedSize":5463622,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICgIDogcehvTDVHxIPN+g44NxZZ3ts8McPvUVGuZMvYGAiAYm15yEUD51xiEuMh0yfTTKPPSIHcRWRZEoGd1lmgBlA=="}]},"_npmUser":{"name":"dalfiannur","email":"dalfiannur@gmail.com"},"directories":{},"maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/lexical-editor_1.0.8_1765192720421_0.4073516197176841"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-12T10:33:57.415Z","modified":"2025-12-08T11:18:40.911Z","0.38.2":"2025-11-12T10:33:57.746Z","0.38.3":"2025-11-12T11:30:53.006Z","1.0.1":"2025-12-08T07:44:30.316Z","1.0.2":"2025-12-08T08:01:25.873Z","1.0.3":"2025-12-08T08:43:47.299Z","1.0.4":"2025-12-08T08:48:26.395Z","1.0.5":"2025-12-08T09:02:37.162Z","1.0.6":"2025-12-08T09:15:56.294Z","1.0.7":"2025-12-08T10:01:03.597Z","1.0.8":"2025-12-08T11:18:40.726Z"},"bugs":{"url":"https://github.com/drcpythonmfe/-lexical-texteditorclickup/issues"},"author":{"name":"Dhrupad patel ,HarshVardhan ,  Brijesh Padsala"},"license":"MIT","homepage":"https://github.com/drcpythonmfe/-lexical-texteditorclickup#readme","keywords":["react","lexical","editor","contenteditable","rich-text","wysiwyg","clickup text editer","HarshVardhan","Dhrupad patel","Brijesh Padsala","clickuptexteditor","react editor","texteditor","besttexteditor","richtexteditor","drag-and-drop editor","inline formatting","content styles","mobile text editor","nexteditor","nexttexteditor","quill","editor","ck editer","next rich-text editer","language translator rich text editor","language translator","AI (Artificial Intelligence)","AI editor","AI richtexteditor","AI Based text editor","AI Based richtexteditor","AI Based editor","AI Based rich text editor","AI Based texteditor","AI Based richtexteditor","AI Based editor","AI Based rich text editor","AI Based texteditor","AI Based richtexteditor","AI Based editor","AI Based rich text editor"],"repository":{"type":"git","url":"git+https://github.com/drcpythonmfe/-lexical-texteditorclickup.git","directory":"packages/lexical-playground"},"description":"A temporary packaged fork of Lexical's official playground.","maintainers":[{"name":"dalfiannur","email":"dalfiannur@gmail.com"}],"readme":"![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image.png)\n\n\nUse the toolbar to adjust your text formatting:\n\nTurn into: Convert the selected text into headings, banners, a code block, or a quote block.\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image1.png)\n\n\nRich text: Bold, italics, underline, strikethrough, or inline code formatting.\n\nText colors and Text highlights: Select from a range of vibrant text colors.\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image2.png)\n\n\nBadges: Insert a colorful badge to emphasize or call attention to a line or block of content. You can also add some rich text formatting to the text in the badge like you can in a banner. \n\n\nAlignment: Indent and set text to left, center, or right justified.\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image5.png)\n\n\nBulleted List: Format text into a bulleted list.\nAll Lists: Click the caret icon next to the Bulleted List icon to format text into a Numbered List or Toggled List.\n\n\nCheck List: Format text into a check list.\n\n\nInsert a link: Insert a hyperlink.\n\n\nCreate subpage: Create a series of subtopics that are part of the main Doc.\n\nCreate comment: Add comments about the Doc to the right sidebar of the Doc. Text that has comments is highlighted.\n\nUndo: Undo your last action.\n\nRedo: Redo your last action.\n\n\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image3.png)\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image4.png)\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image6.png)\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image7.png)\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image8.png)\n\n\n\n## text transformation functionality to the editor\n\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image14.png)\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image15.png)\n\n\n\n## /Slash Commands\n\nUse /Slash Commands, our custom shortcuts that quickly add rich text, attach images, move a task, change a due date, and more!\n\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image9.png)\n\n\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image10.png)\n\n\n## Emojis\nAdd emojis to give your content some flair!\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image11.png)\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image12.png)\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image13.png)\n\n\n\n![image info](https://raw.githubusercontent.com/drcpythonmfe/-lexical-texteditorclickup/refs/heads/main/image/image22.png)\n\n\n\n\n\n```tsx \nconst uploadImg = async (file: File, altText: string) => {\n  console.log(\"file\",file)\n  await delay(500);\n   await delay(500);\n  let data = {\n    url : `http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4`,\n    id :  126548545485465 \n  }\n  return data\n  \n};\n\nconst onDataSend = async (file: File) => {   // all file upload\n  console.log(file)\n await delay(500);\n  let data = {\n    url : `http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4`,\n    id :  126548545485465 \n  }\n  return data\n};\n\nfunction App({\n  html,\n  setHtml,\n  userList\n}: {\n  html: string;\n  setHtml: (newHtml: string) => void;\n  userList:any;\n}): JSX.Element {\n  useSyncWithInputHtml(html);\n\n  return (\n    <Editor\n      isRichText={true}\n      onChange={setHtml}\n      onUpload={uploadImg}\n      onDataSend={uploadImg}\n      onChangeMode=\"html\"\n      onDataSend={onDataSend}\n      dummyMentionsDatas={userList || []}\n    />\n  );\n}\n```\n\n## dummyMentionsData \n```tsx\n\nconst dummyMentionsData = [\n  {\n    name: 'Aayla Secura',\n    email: 'aayla.secura@example.com',\n  },\n  {\n    name: 'Adi Gallia',\n    email: 'adi.gallia@example.com',\n  },\n]\n\nconst delay = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms));\n\nconst uploadImg = async (file: File, altText: string) => {\n  console.log(\"file\",file)\n  await delay(500);\n  let data = {\n    url : `http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4`,\n    id :  126548545485465 \n  }\n  return data\n};\n\n//handleAIData \n\nconst handleAIData = async (data: string): Promise<any> => {\n  await delay(500);  // api call\n  return \"AI Data\";\n};\n\n\nconst toolbarConfig ={\n  align: true,\n  bgColorPicker: true,\n  biu: true,\n  codeBlock: false,\n  fontFamilyOptions: false,\n  fontSizeOptions: false,\n  formatBlockOptions: true,\n  formatTextOptions: true,\n  insertOptions: true,\n  link: true,\n  textColorPicker: true,\n  undoRedo: true,\n  paragraph: false,      //   / type data \n  heading1: false,\n  heading2: false,\n  heading3: false,\n  table: true,\n  numberedList: false,\n  bulletedList: false,\n  checkList: true,\n  embedYoutubeVideo: false,\n  embedVideo: false,\n  embedPdf: false,\n  embedOffice: false,\n  UploadDocuments: true,\n  alignLeft: false,\n  alignCenter: false,\n  alignRight: false,\n  alignJustify: false,\n  editorshow:true, \n  uppercase:true,\n  lowercase:true,\n  capitalize:true,\n  RTL:true,\n  LTR:true,\n  ai:true  // handleAIData\n  video:true,\n  Sticky:true,\n  Poll:true,\n  Table:true,\n  Horizontal:true,\n  Collapsible:true,\n}\n\n\nfunction App({\n  html,\n  setHtml,\n  userList\n}: {\n  html: string;\n  setHtml: (newHtml: string) => void;\n  userList:any;\n}): JSX.Element {\n  useSyncWithInputHtml(html);\n\n  return (\n    <Editor\n      isRichText={true}\n      onChange={setHtml}\n      onUpload={uploadImg}\n      onChangeMode=\"html\"\n      toolbarConfig={toolbarConfig}\n      handleAIData={handleAIData}\n      dummyMentionsDatas={userList || []}\n    />\n  );\n}\n\n\nfunction validateParagraphs(htmlText: string): boolean {\n  const tempDiv = document.createElement('div');\n  tempDiv.innerHTML = htmlText.trim();\n\n  if (tempDiv.querySelectorAll('img').length > 0) {\n    return false;\n  }\n\n  if (tempDiv.querySelectorAll('table').length > 0) {\n    return false;\n  }\n\n  if (tempDiv.querySelectorAll('h1').length > 0) {\n    return false;\n  }\n\n  if (tempDiv.querySelectorAll('h2').length > 0) {\n    return false;\n  }\n\n  if (tempDiv.querySelectorAll('h3').length > 0) {\n    return false;\n  }\n\n  if (tempDiv.querySelectorAll('li').length > 0) {\n    return false;\n  }\n\n  \n  const paragraphs = tempDiv.querySelectorAll('p');\n\n  if (paragraphs.length === 0) {\n      return false;\n  }\n\n  let nonEmptyTextCount = 0;\n\n  for (const paragraph of Array.from(paragraphs)) {\n      const directTextContent = Array.from(paragraph.childNodes)\n          .filter(node => node.nodeType === Node.TEXT_NODE)\n          .map(node => node.textContent?.trim())\n          .filter(text => text && text !== '');\n\n      if (directTextContent.length > 0) {\n          nonEmptyTextCount++;\n      }\n\n      const childTextContent = paragraph.textContent?.trim() || '';\n\n      if (childTextContent !== '') {\n          nonEmptyTextCount++;\n      }\n  }\n\n  return nonEmptyTextCount <= 0;\n}\n\nexport default function PlaygroundApp1(): JSX.Element {\n \n  const [html, setHtml] = useState(``);\n\n   React.useEffect(()=>{\n    validateParagraphs(html)\n   },[html])\n  \n  return (\n    <>\n    <EditorComposer>\n        <App html={html}  setHtml={setHtml}   userList={dummyMentionsData} />\n      </EditorComposer>\n            <button disabled={ validateParagraphs(html)}> Button </button>\n\n      <div dangerouslySetInnerHTML={{__html: html}} />\n    </>\n  );\n}\n\n```\n\n## Dark Mode\n\n```\n<body class=\"theme-dark\">  // Add  class name theme-dark\n\n</body>\n```\n\n\n## HTML as formatHTMLData\n\n```tsx\nfunction formatHTMLData(data: string): string {\n  const parser = new DOMParser();\n  const doc = parser.parseFromString(data, 'text/html');\n\n  function cleanNestedLists(element: Element): void {\n    const nestedUls = element.querySelectorAll('ul > ul');\n    nestedUls.forEach(ul => {\n      const parentLi = ul.parentNode as Element;\n      if (parentLi.tagName === 'LI') {\n        parentLi.parentNode?.insertBefore(ul, parentLi.nextSibling);\n      }\n    });\n  }\n\n  function removeEmptyElements(element: Element): void {\n    element.querySelectorAll('*').forEach(el => {\n      if (el.innerHTML.trim() === '' && !['img', 'br', 'hr'].includes(el.tagName.toLowerCase())) {\n        el.parentNode?.removeChild(el);\n      }\n    });\n  }\n\n  function wrapTextNodesInPTags(element: Element): void {\n    let textContent = '';\n    const childNodes = Array.from(element.childNodes);\n    for (let i = 0; i < childNodes.length; i++) {\n      const node = childNodes[i];\n      if (node.nodeType === Node.TEXT_NODE) {\n        textContent += node.textContent?.trim() || '';\n        element.removeChild(node);\n      } else if (node.nodeType === Node.ELEMENT_NODE) {\n        if (textContent) {\n          const p = doc.createElement('p');\n          p.textContent = textContent;\n          element.insertBefore(p, node);\n          textContent = '';\n        }\n        if (node.nodeName !== 'BR') {\n          wrapTextNodesInPTags(node as Element);\n        }\n      }\n    }\n    if (textContent) {\n      const p = doc.createElement('p');\n      p.textContent = textContent;\n      element.appendChild(p);\n    }\n  }\n\n  function correctTextPrimayClass(element: Element): void {\n    element.querySelectorAll('a.text-primay').forEach(el => {\n      el.classList.remove('text-primay');\n      el.classList.add('text-primary');\n    });\n  }\n\n  function replaceATagWithSpan(element: Element): void {\n    const links = element.querySelectorAll('a.text-primary');\n    links.forEach(link => {\n      const span = doc.createElement('span');\n      span.setAttribute('data-lexical-text', 'true');\n      span.textContent = link.textContent;\n\n      const newAnchor = doc.createElement('a');\n      newAnchor.setAttribute('href', link.getAttribute('href'));\n      newAnchor.setAttribute('rel', 'noopener');\n      newAnchor.setAttribute('class', 'TextEditor__link TextEditor__ltr');\n      newAnchor.appendChild(span);\n\n      const p = doc.createElement('p');\n      p.appendChild(newAnchor);\n\n      link.parentNode?.replaceChild(p, link);\n    });\n  }\n\n  const wrapper = doc.createElement('div');\n  while (doc.body.firstChild) {\n    wrapper.appendChild(doc.body.firstChild);\n  }\n\n  cleanNestedLists(wrapper);\n  removeEmptyElements(wrapper);\n  wrapTextNodesInPTags(wrapper);\n  correctTextPrimayClass(wrapper);\n  replaceATagWithSpan(wrapper);\n\n  wrapper.innerHTML = wrapper.innerHTML.replace(/&nbsp;/g, ' ').trim();\n\n  const prettyHTML = prettifyHTML(wrapper.innerHTML);\n  const cleanedString = prettyHTML.replace(/<br\\s*\\/?>/gi, \"\").replace(/<p class=\"TextEditor__paragraph\"><br><\\/p>\\s*/g, '');\n  return cleanedString;\n}\n\nfunction prettifyHTML(html: string): string {\n  let indent = 0;\n  const tab = '    ';\n  let pretty = '';\n  html.split(/>\\s*</).forEach(element => {\n    if (element.match(/^\\/\\w/)) {\n      indent = Math.max(0, indent - 1);\n    }\n    pretty += tab.repeat(indent) + '<' + element + '>\\n';\n    if (element.match(/^<?\\w[^>]*[^\\/]$/) && !element.startsWith('input') && !element.startsWith('img') && !element.startsWith('br')) {\n      indent++;\n    }\n  });\n  return pretty.substring(1, pretty.length - 2);\n}\n```\n\n```tsx\n  const [html, setHtml] = useState(formatHTMLData(data3));\n```\n\n\n### HTML as input/output\n\n```tsx\nimport { Editor, EditorComposer, useSyncWithInputHtml } from '@drcpythonmfe/lexical-playground';\nimport \"@drcpythonmfe/lexical-playground/editor.css\"\nimport \"@drcpythonmfe/lexical-playground/theme.css\"\n\nfunction MyEditor({ html, setHtml }: {\n  html: string;\n  setHtml: (newHtml: string) => void;\n}): JSX.Element {\n  useSyncWithInputHtml(html);\n\n  return (\n    <Editor isRichText onChange={setHtml} onUpload={uploadImg} onChangeMode=\"html\" />\n  );\n}\n\nexport default function PlaygroundApp(): JSX.Element {\n  const [html, setHtml] = useState('<b>test</b>');\n  return (\n    <EditorComposer>\n      <MyEditor html={html} setHtml={setHtml} />\n    </EditorComposer>\n  );\n}\n```\n\n### A JSON string as input/output\n\n```tsx\nimport { Editor, EditorComposer, useSyncWithInputHtml } from '@drcpythonmfe/lexical-playground';\nimport \"@drcpythonmfe/lexical-playground/editor.css\"\nimport \"@drcpythonmfe/lexical-playground/theme.css\"\n\nfunction MyEditor({ json, setJson }: {\n  json: string;\n  setJson: (html: string) => void;\n}): JSX.Element {\n  useSyncWithInputJson(json); // either a string or an object\n\n  return <Editor isRichText onChange={setJson} onChangeMode=\"json\" />;\n}\n\nexport default function PlaygroundApp(): JSX.Element {\n  const [json, setJson] = useState(\n    '{\"root\":{\"children\":[{\"children\":[{\"detail\":0,\"format\":1,\"mode\":\"normal\",\"style\":\"\",\"text\":\"test\",\"type\":\"text\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"paragraph\",\"version\":1}],\"direction\":\"ltr\",\"format\":\"\",\"indent\":0,\"type\":\"root\",\"version\":1}}',\n  );\n  return (\n    <EditorComposer>\n      <MyEditor json={json} setJson={setJson} />\n    </EditorComposer>\n  );\n}\n```\n\n### Customizing the toolbar\nCertain buttons can be ommited from the toolbar, and some can be configured if necessary:\n```tsx\nimport { Editor, EditorComposer, EditorProps } from '@drcpythonmfe/lexical-playground';\n\nconst toolbarConfig: EditorProps['toolbarConfig'] = {\n  textColorPicker: false,\n  bgColorPicker: false,\n  fontFamilyOptions: [\n    ['Roboto', 'Roboto'],\n    ['Open Sans', 'Open Sans'],\n  ],\n};\n\nfunction MyEditor(): JSX.Element {\n  return <Editor toolbarConfig={toolbarConfig} isRichText />;\n};\n\nexport default function PlaygroundApp(): JSX.Element {\n  return (\n    <EditorComposer>\n      <MyEditor />\n    </EditorComposer>\n  );\n}\n\n```\n### Theme overriding\nIt's recommended to replace built-in class names with your own:\n\n```tsx\nimport { Editor, EditorComposer, EditorThemeClasses } from '@drcpythonmfe/lexical-playground';\nimport '@drcpythonmfe/lexical-playground/editor.css';\nimport './myTheme.css';\n\nconst theme: EditorThemeClasses = {\n  characterLimit: 'MyTheme__characterLimit',\n  code: 'MyTheme__code',\n  // ...\n};\n\nfunction MyEditor(): JSX.Element {\n  return <Editor isRichText />;\n}\n\nexport default function PlaygroundApp(): JSX.Element {\n  return (\n    <EditorComposer initialConfig={{ theme }}>\n      <MyEditor />\n    </EditorComposer>\n  );\n}\n```\n### Uploading an image and returning a path\nBy default images are converted to data URLs.\n```tsx\n  // ...\n  const uploadImg = async (file: File, altText: string) => {\n    // process the file\n    return urlOfImage;\n  }\n  return (\n    <Editor \n      onUpload={uploadImg}  \n      isRichText\n      // ...\n    />\n  );\n```\n\n### Getting an access to the lexical editor's instance\n```tsx\nfunction MyEditor(): JSX.Element {\n  const [editor] = useLexicalComposerContext();\n\n  return (\n    <Editor isRichText />\n  );\n}\n\nexport default function PlaygroundApp(): JSX.Element {\n  return (\n    <EditorComposer>\n      <MyEditor />\n    </EditorComposer>\n  );\n}\n```\n\n### Showing exported HTML w/o loading the entire editor\nThe only thing that's needed to display HTML that lexical generated is to import `theme.css`.\n\n```tsx\nimport '@drcpythonmfe/lexical-playground/theme.css'; // or import your own theme styles\n\nexport default function PlaygroundApp({ html }: { html: string }): JSX.Element {\n  return (\n    <div dangerouslySetInnerHTML={{__html: html}} />\n  );\n}\n```\n\n### SSR\nAt this point the editor does not support SSR and needs to be loaded on the client.\n#### Next.js\n```tsx\nimport type { NextPage } from 'next'\nimport dynamic from 'next/dynamic'\n\nconst MyEditor = dynamic(() => import('./path-to-my-editor-that-loads-lexical-playground'), {\n  ssr: false,\n})\n\nconst MyPage: NextPage = () => {\n  return (\n    <MyEditor />\n  )\n}\n\nexport default MyPage\n```\n\n### Using optional plugins\nSome plugins like `excalidraw` and `equation` are optional, and need to be manually activated:\n\n```tsx\n// ...\nimport {excalidrawExt} from '@drcpythonmfe/lexical-playground/ext/excalidraw';\nimport '@drcpythonmfe/lexical-playground/ext/excalidraw.css';\nimport {equationExt} from '@drcpythonmfe/lexical-playground/ext/equation';\nimport '@drcpythonmfe/lexical-playground/ext/equation.css';\n\nfunction MyEditor(): JSX.Element {\n  return (\n    <Editor isRichText />\n  );\n}\n\nconst extensions = [equationExt, excalidrawExt];\n\nexport default function PlaygroundApp(): JSX.Element {\n  return (\n    <EditorComposer extensions={extensions}>\n      <MyEditor />\n    </EditorComposer>\n  );\n}\n```\n","readmeFilename":"README.md"}