├── .husky ├── .gitignore └── pre-commit ├── .watchmanconfig ├── packages ├── lexical-website │ ├── static │ │ ├── .nojekyll │ │ └── img │ │ │ ├── favicon.ico │ │ │ ├── docusaurus.png │ │ │ ├── docs │ │ │ ├── devtools-demo.png │ │ │ └── state-formatting-lexical.png │ │ │ ├── tutorial │ │ │ ├── localeDropdown.png │ │ │ └── docsVersionDropdown.png │ │ │ ├── stack-overflow.svg │ │ │ └── see-api-documentation.svg │ ├── docs │ │ ├── react │ │ │ ├── _category_.json │ │ │ └── index.md │ │ ├── concepts │ │ │ └── _category_.json │ │ ├── collaboration │ │ │ └── _category_.json │ │ ├── getting-started │ │ │ ├── _category_.json │ │ │ └── supported-browsers.md │ │ └── error.md │ ├── fb │ │ └── sdoc-cache.json │ ├── src │ │ ├── pages │ │ │ ├── markdown-page.md │ │ │ └── gallery.md │ │ ├── css │ │ │ └── tailwind.css │ │ └── components │ │ │ ├── Gallery │ │ │ └── GalleryPage.tsx │ │ │ └── ImageSwitcher │ │ │ └── index.js │ ├── blog │ │ ├── 2021-08-26-welcome │ │ │ └── docusaurus-plushie-banner.jpeg │ │ ├── 2019-05-28-first-blog-post.md │ │ ├── authors.yml │ │ └── 2021-08-01-mdx-blog-post.mdx │ ├── .gitignore │ ├── i18n │ │ └── en │ │ │ └── docusaurus-plugin-content-blog │ │ │ └── options.json │ └── tailwind.config.js ├── lexical-devtools │ ├── .browser-profiles │ │ └── chromium │ │ │ └── .gitignore │ ├── src │ │ ├── public │ │ │ ├── icon │ │ │ │ ├── 128.png │ │ │ │ ├── 16.png │ │ │ │ ├── 32.png │ │ │ │ ├── 48.png │ │ │ │ ├── 16-restricted.png │ │ │ │ ├── 32-restricted.png │ │ │ │ ├── 48-restricted.png │ │ │ │ ├── logo_square.png │ │ │ │ └── 128-restricted.png │ │ │ └── inspect.svg │ │ ├── entrypoints │ │ │ ├── devtools │ │ │ │ ├── index.html │ │ │ │ └── main.ts │ │ │ ├── popup │ │ │ │ ├── App.css │ │ │ │ └── index.html │ │ │ ├── devtools-panel │ │ │ │ └── index.html │ │ │ ├── injected │ │ │ │ └── utils │ │ │ │ │ └── queryLexicalNodes.ts │ │ │ └── content │ │ │ │ └── injectScript.ts │ │ ├── constants.ts │ │ ├── element-picker │ │ │ └── index.ts │ │ └── utils │ │ │ └── isLexicalNode.ts │ ├── docs │ │ └── architecture-diagram.png │ ├── safari-xcode │ │ ├── Lexical Developer Tools │ │ │ ├── Lexical Developer Tools │ │ │ │ ├── Assets.xcassets │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── AccentColor.colorset │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ │ ├── mac-icon-128@1x.png │ │ │ │ │ │ ├── mac-icon-128@2x.png │ │ │ │ │ │ ├── mac-icon-16@1x.png │ │ │ │ │ │ ├── mac-icon-16@2x.png │ │ │ │ │ │ ├── mac-icon-256@1x.png │ │ │ │ │ │ ├── mac-icon-256@2x.png │ │ │ │ │ │ ├── mac-icon-32@1x.png │ │ │ │ │ │ ├── mac-icon-32@2x.png │ │ │ │ │ │ ├── mac-icon-512@1x.png │ │ │ │ │ │ └── mac-icon-512@2x.png │ │ │ │ │ └── LargeIcon.imageset │ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Resources │ │ │ │ │ └── Icon.png │ │ │ │ ├── Info.plist │ │ │ │ ├── Lexical_Developer_Tools.entitlements │ │ │ │ └── Lexical Developer Tools.entitlements │ │ │ ├── Config.xcconfig │ │ │ └── Lexical Developer Tools Extension │ │ │ │ ├── Lexical_Developer_Tools_Extension.entitlements │ │ │ │ └── Info.plist │ │ └── .gitignore │ ├── SOURCE_CODE_REVIEW.md │ └── .gitignore ├── lexical-playground │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── src │ │ ├── images │ │ │ ├── cat-typing.gif │ │ │ ├── emoji │ │ │ │ ├── 1F600.png │ │ │ │ ├── 1F641.png │ │ │ │ ├── 1F642.png │ │ │ │ ├── 2764.png │ │ │ │ └── LICENSE.md │ │ │ ├── landscape.jpg │ │ │ ├── yellow-flower.jpg │ │ │ ├── yellow-flower-small.jpg │ │ │ ├── icons │ │ │ │ ├── LICENSE.md │ │ │ │ ├── add-sign.svg │ │ │ │ ├── minus-sign.svg │ │ │ │ ├── plus.svg │ │ │ │ ├── font-color.svg │ │ │ │ ├── lock-fill.svg │ │ │ │ ├── caret-right-fill.svg │ │ │ │ ├── success-alt.svg │ │ │ │ ├── success.svg │ │ │ │ ├── type-h1.svg │ │ │ │ ├── chevron-down.svg │ │ │ │ ├── type-h4.svg │ │ │ │ ├── lock.svg │ │ │ │ ├── type-underline.svg │ │ │ │ ├── chat-right.svg │ │ │ │ ├── type-italic.svg │ │ │ │ ├── arrow-clockwise.svg │ │ │ │ ├── code.svg │ │ │ │ ├── font-family.svg │ │ │ │ ├── arrow-counterclockwise.svg │ │ │ │ ├── table.svg │ │ │ │ ├── type-capitalize.svg │ │ │ │ ├── draggable-block-menu.svg │ │ │ │ ├── horizontal-rule.svg │ │ │ │ ├── send.svg │ │ │ │ ├── file-image.svg │ │ │ │ ├── plus-slash-minus.svg │ │ │ │ ├── link.svg │ │ │ │ ├── mic.svg │ │ │ │ ├── justify.svg │ │ │ │ ├── text-left.svg │ │ │ │ ├── text-center.svg │ │ │ │ ├── text-right.svg │ │ │ │ ├── upload.svg │ │ │ │ ├── 3-columns.svg │ │ │ │ ├── download.svg │ │ │ │ ├── text-paragraph.svg │ │ │ │ ├── copy.svg │ │ │ │ ├── sticky.svg │ │ │ │ ├── list-ul.svg │ │ │ │ ├── square-check.svg │ │ │ │ ├── chat-right-dots.svg │ │ │ │ ├── type-bold.svg │ │ │ │ ├── type-h2.svg │ │ │ │ ├── clipboard.svg │ │ │ │ ├── outdent.svg │ │ │ │ ├── scissors.svg │ │ │ │ ├── indent.svg │ │ │ │ ├── file-earmark-text.svg │ │ │ │ ├── chat-left-text.svg │ │ │ │ ├── chat-right-text.svg │ │ │ │ ├── user.svg │ │ │ │ ├── trash.svg │ │ │ │ ├── type-strikethrough.svg │ │ │ │ ├── pencil-fill.svg │ │ │ │ ├── plug-fill.svg │ │ │ │ ├── type-h5.svg │ │ │ │ ├── camera.svg │ │ │ │ ├── close.svg │ │ │ │ ├── tweet.svg │ │ │ │ ├── type-h3.svg │ │ │ │ ├── bg-color.svg │ │ │ │ ├── markdown.svg │ │ │ │ ├── plug.svg │ │ │ │ └── comments.svg │ │ │ ├── image │ │ │ │ └── LICENSE.md │ │ │ └── image-broken.svg │ │ ├── utils │ │ │ ├── isMobileWidth.ts │ │ │ └── joinClasses.ts │ │ ├── plugins │ │ │ ├── TableCellResizer │ │ │ │ └── index.css │ │ │ ├── CodeActionMenuPlugin │ │ │ │ └── components │ │ │ │ │ └── PrettierButton │ │ │ │ │ └── index.css │ │ │ ├── CollapsiblePlugin │ │ │ │ └── CollapsibleUtils.ts │ │ │ ├── DocsPlugin │ │ │ │ └── index.tsx │ │ │ └── MarkdownShortcutPlugin │ │ │ │ └── index.tsx │ │ ├── themes │ │ │ ├── CommentEditorTheme.css │ │ │ ├── StickyEditorTheme.css │ │ │ ├── StickyEditorTheme.ts │ │ │ └── CommentEditorTheme.ts │ │ ├── hooks │ │ │ └── useFlashMessage.tsx │ │ └── ui │ │ │ └── Dialog.css │ ├── __tests__ │ │ └── unit │ │ │ └── jsdom-with-compression-environment.js │ └── esm │ │ └── styles.css ├── lexical-utils │ ├── README.md │ ├── src │ │ └── px.ts │ └── LexicalUtils.js ├── lexical-offset │ ├── README.md │ └── LexicalOffset.js ├── lexical-selection │ ├── README.md │ ├── src │ │ └── constants.ts │ └── LexicalSelection.js ├── lexical-text │ ├── README.md │ ├── LexicalText.js │ └── src │ │ └── rootTextContent.ts ├── lexical-mark │ ├── README.md │ └── LexicalMark.js ├── lexical-file │ ├── README.md │ ├── LexicalFile.js │ ├── src │ │ └── index.ts │ └── flow │ │ └── LexicalFile.js.flow ├── lexical-overflow │ ├── README.md │ └── LexicalOverflow.js ├── lexical-clipboard │ ├── README.md │ ├── LexicalClipboard.js │ └── src │ │ └── index.ts ├── lexical-code │ ├── README.md │ └── LexicalCode.js ├── lexical-devtools-core │ ├── README.md │ ├── LexicalDevtoolsCore.js │ └── src │ │ └── index.ts ├── lexical-yjs │ ├── README.md │ ├── index.ts │ └── LexicalYjs.js ├── lexical-link │ ├── README.md │ └── LexicalLink.js ├── lexical-hashtag │ ├── README.md │ ├── LexicalHashtag.js │ └── src │ │ └── index.ts ├── lexical-table │ ├── README.md │ ├── LexicalTable.js │ └── src │ │ └── constants.ts ├── lexical-dragon │ ├── README.md │ ├── LexicalDragon.js │ └── flow │ │ └── LexicalDragon.js.flow ├── lexical │ └── Lexical.js ├── lexical-html │ └── LexicalHtml.js ├── lexical-list │ └── LexicalList.js ├── lexical-history │ └── LexicalHistory.js ├── lexical-react │ ├── flow │ │ ├── LexicalListPlugin.js.flow │ │ ├── LexicalContextMenuPlugin.js.flow │ │ ├── LexicalNodeEventPlugin.js.flow │ │ ├── LexicalCheckListPlugin.js.flow │ │ ├── LexicalHashtagPlugin.js.flow │ │ ├── LexicalHorizontalRulePlugin.js.flow │ │ ├── LexicalCharacterLimitPlugin.js.flow │ │ ├── LexicalSelectionAlwaysOnDisplay.js.flow │ │ ├── LexicalClearEditorPlugin.js.flow │ │ ├── LexicalLinkPlugin.js.flow │ │ ├── LexicalClickableLinkPlugin.js.flow │ │ ├── LexicalAutoFocusPlugin.js.flow │ │ ├── useLexicalNodeSelection.js.flow │ │ ├── useLexicalIsTextContentEmpty.js.flow │ │ ├── LexicalTablePlugin.js.flow │ │ ├── LexicalTabIndentationPlugin.js.flow │ │ ├── LexicalTableOfContents.js.flow │ │ ├── useLexicalEditable.js.flow │ │ ├── LexicalMarkdownShortcutPlugin.js.flow │ │ ├── LexicalOnChangePlugin.js.flow │ │ ├── useLexicalTextEntity.js.flow │ │ ├── LexicalEditorRefPlugin.js.flow │ │ ├── LexicalTableOfContentsPlugin.js.flow │ │ ├── LexicalErrorBoundary.js.flow │ │ ├── LexicalCollaborationContext.js.flow │ │ └── LexicalNestedComposer.js.flow │ └── src │ │ ├── shared │ │ └── useList.ts │ │ └── LexicalSelectionAlwaysOnDisplay.tsx ├── lexical-eslint-plugin │ ├── flow │ │ └── LexicalEslintPlugin.js.flow │ ├── LexicalEslintPlugin.js │ └── src │ │ └── index.ts ├── lexical-headless │ └── LexicalHeadless.js ├── lexical-markdown │ └── LexicalMarkdown.js ├── lexical-rich-text │ ├── LexicalRichText.js │ └── README.md ├── lexical-plain-text │ ├── LexicalPlainText.js │ ├── flow │ │ └── LexicalPlainText.js.flow │ └── README.md └── shared │ ├── src │ ├── canUseDOM.ts │ ├── warnOnlyOnce.ts │ ├── react-test-utils.ts │ ├── normalizeClassNames.ts │ └── useLayoutEffect.ts │ └── package.json ├── examples ├── react-rich-collab │ ├── .gitignore │ ├── src │ │ ├── vite-env.d.ts │ │ └── main.tsx │ ├── public │ │ └── icons │ │ │ ├── LICENSE.md │ │ │ ├── type-underline.svg │ │ │ ├── type-italic.svg │ │ │ ├── arrow-clockwise.svg │ │ │ ├── arrow-counterclockwise.svg │ │ │ ├── justify.svg │ │ │ ├── text-left.svg │ │ │ ├── text-right.svg │ │ │ ├── text-center.svg │ │ │ ├── text-paragraph.svg │ │ │ ├── type-bold.svg │ │ │ └── type-strikethrough.svg │ ├── tsconfig.node.json │ ├── app.html │ ├── README.md │ └── vite.config.ts ├── react-rich │ ├── src │ │ ├── vite-env.d.ts │ │ └── main.tsx │ ├── public │ │ └── icons │ │ │ ├── LICENSE.md │ │ │ ├── type-underline.svg │ │ │ ├── type-italic.svg │ │ │ ├── arrow-clockwise.svg │ │ │ ├── arrow-counterclockwise.svg │ │ │ ├── justify.svg │ │ │ ├── text-left.svg │ │ │ ├── text-center.svg │ │ │ ├── text-right.svg │ │ │ ├── text-paragraph.svg │ │ │ ├── type-bold.svg │ │ │ └── type-strikethrough.svg │ ├── tsconfig.node.json │ ├── index.html │ ├── vite.config.ts │ ├── README.md │ └── package.json ├── react-table │ ├── src │ │ ├── vite-env.d.ts │ │ └── main.tsx │ ├── public │ │ └── icons │ │ │ ├── LICENSE.md │ │ │ ├── type-underline.svg │ │ │ ├── type-italic.svg │ │ │ ├── arrow-clockwise.svg │ │ │ ├── arrow-counterclockwise.svg │ │ │ ├── justify.svg │ │ │ ├── text-left.svg │ │ │ ├── text-center.svg │ │ │ ├── text-right.svg │ │ │ ├── text-paragraph.svg │ │ │ ├── type-bold.svg │ │ │ └── type-strikethrough.svg │ ├── tsconfig.node.json │ ├── index.html │ ├── vite.config.ts │ ├── README.md │ └── package.json ├── vanilla-js │ ├── src │ │ ├── vite-env.d.ts │ │ └── styles.css │ ├── index.html │ ├── README.md │ ├── package.json │ └── tsconfig.json ├── vanilla-js-plugin │ ├── src │ │ └── vite-env.d.ts │ ├── index.html │ ├── README.md │ ├── vite.config.ts │ ├── package.json │ └── tsconfig.json └── react-plain-text │ ├── icons │ ├── LICENSE.md │ ├── arrow-clockwise.svg │ └── arrow-counterclockwise.svg │ ├── tsconfig.node.json │ ├── src │ ├── ExampleTheme.ts │ └── main.tsx │ ├── index.html │ ├── vite.config.ts │ ├── README.md │ └── package.json ├── .npmrc ├── .github ├── CODEOWNERS └── workflows │ ├── pre-release.yml │ ├── size-limit.yml │ ├── tests.yml │ ├── close-stale-pr.yml │ ├── call-integration-tests.yml │ └── call-e2e-canary-tests.yml ├── scripts ├── __tests__ │ └── integration │ │ └── fixtures │ │ ├── lexical-esm-sveltekit-vanilla-js │ │ ├── .npmrc │ │ ├── static │ │ │ └── favicon.png │ │ ├── .gitignore │ │ ├── vite.config.ts │ │ ├── src │ │ │ ├── app.html │ │ │ └── app.d.ts │ │ ├── playwright.config.ts │ │ └── tsconfig.json │ │ ├── lexical-esm-astro-react │ │ ├── src │ │ │ ├── env.d.ts │ │ │ ├── pages │ │ │ │ └── index.astro │ │ │ └── components │ │ │ │ └── main.tsx │ │ ├── public │ │ │ └── icons │ │ │ │ ├── LICENSE.md │ │ │ │ ├── type-underline.svg │ │ │ │ ├── type-italic.svg │ │ │ │ ├── arrow-clockwise.svg │ │ │ │ ├── arrow-counterclockwise.svg │ │ │ │ ├── justify.svg │ │ │ │ ├── text-left.svg │ │ │ │ ├── text-right.svg │ │ │ │ ├── text-center.svg │ │ │ │ ├── text-paragraph.svg │ │ │ │ ├── type-bold.svg │ │ │ │ └── type-strikethrough.svg │ │ ├── tsconfig.json │ │ ├── .gitignore │ │ ├── astro.config.mjs │ │ ├── playwright.config.ts │ │ └── tests │ │ │ └── test.ts │ │ └── lexical-esm-nextjs │ │ ├── app │ │ ├── favicon.ico │ │ └── page.tsx │ │ ├── public │ │ └── icons │ │ │ ├── LICENSE.md │ │ │ ├── type-underline.svg │ │ │ ├── type-italic.svg │ │ │ ├── arrow-clockwise.svg │ │ │ ├── arrow-counterclockwise.svg │ │ │ ├── justify.svg │ │ │ ├── text-left.svg │ │ │ ├── text-right.svg │ │ │ ├── text-center.svg │ │ │ ├── text-paragraph.svg │ │ │ ├── type-bold.svg │ │ │ └── type-strikethrough.svg │ │ ├── postcss.config.js │ │ ├── next.config.mjs │ │ ├── playwright.config.ts │ │ ├── .gitignore │ │ └── tests │ │ └── test.ts ├── www │ └── headerTemplate.js ├── shared │ └── readMonorepoPackageJson.js └── clean.js ├── .hintrc ├── .lintstagedrc.js ├── .vscode ├── extensions.json └── settings.json ├── libdefs ├── globals.d.ts ├── react.js └── dom.js ├── eslint-plugin ├── package.json └── src │ ├── rules │ └── index.js │ └── index.js ├── .eslintignore ├── tsconfig.test.json ├── .prettierrc.js ├── .prettierignore ├── babel.config.js └── .gitignore /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /packages/lexical-website/static/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/react-rich-collab/.gitignore: -------------------------------------------------------------------------------- 1 | /yjs-wss-db 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | legacy-peer-deps=true 2 | init-module=./scripts/npm/npm-init.js 3 | -------------------------------------------------------------------------------- /examples/react-rich/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/react-table/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/vanilla-js/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/react-rich-collab/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/vanilla-js-plugin/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/lexical-devtools/.browser-profiles/chromium/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @zurfyx @fantactuka @acywatson @Fetz @ivailop7 @Sahejkm @potatowagon 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-sveltekit-vanilla-js/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /packages/lexical-website/docs/react/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "React", 3 | "position": 5 4 | } 5 | -------------------------------------------------------------------------------- /packages/lexical-website/fb/sdoc-cache.json: -------------------------------------------------------------------------------- 1 | { 2 | "snippets": {}, 3 | "description": "@generated" 4 | } -------------------------------------------------------------------------------- /packages/lexical-website/docs/concepts/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Concepts", 3 | "position": 3 4 | } 5 | -------------------------------------------------------------------------------- /.hintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "development" 4 | ], 5 | "hints": { 6 | "meta-viewport": "off" 7 | } 8 | } -------------------------------------------------------------------------------- /packages/lexical-website/docs/collaboration/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Collaboration", 3 | "position": 6 4 | } 5 | -------------------------------------------------------------------------------- /packages/lexical-playground/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/favicon.ico -------------------------------------------------------------------------------- /packages/lexical-website/docs/getting-started/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Getting Started", 3 | "position": 2 4 | } 5 | -------------------------------------------------------------------------------- /packages/lexical-playground/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/favicon-16x16.png -------------------------------------------------------------------------------- /packages/lexical-playground/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/favicon-32x32.png -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/128.png -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/16.png -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/32.png -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/48.png -------------------------------------------------------------------------------- /packages/lexical-playground/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/apple-touch-icon.png -------------------------------------------------------------------------------- /packages/lexical-website/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-website/static/img/favicon.ico -------------------------------------------------------------------------------- /packages/lexical-website/static/img/docusaurus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-website/static/img/docusaurus.png -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/cat-typing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/src/images/cat-typing.gif -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/emoji/1F600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/src/images/emoji/1F600.png -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/emoji/1F641.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/src/images/emoji/1F641.png -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/emoji/1F642.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/src/images/emoji/1F642.png -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/emoji/2764.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/src/images/emoji/2764.png -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/landscape.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/src/images/landscape.jpg -------------------------------------------------------------------------------- /packages/lexical-devtools/docs/architecture-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/docs/architecture-diagram.png -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/yellow-flower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/src/images/yellow-flower.jpg -------------------------------------------------------------------------------- /.lintstagedrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | '*.(js|mjs|jsx|css|html|d.ts|ts|tsx|yml)': 'prettier --write', 3 | '*.(js|mjs|jsx|ts|tsx)': ['eslint --fix'], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/16-restricted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/16-restricted.png -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/32-restricted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/32-restricted.png -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/48-restricted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/48-restricted.png -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/logo_square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/logo_square.png -------------------------------------------------------------------------------- /packages/lexical-website/static/img/docs/devtools-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-website/static/img/docs/devtools-demo.png -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/icon/128-restricted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/src/public/icon/128-restricted.png -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/yellow-flower-small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-playground/src/images/yellow-flower-small.jpg -------------------------------------------------------------------------------- /packages/lexical-website/static/img/tutorial/localeDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-website/static/img/tutorial/localeDropdown.png -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "dbaeumer.vscode-eslint", 4 | "esbenp.prettier-vscode", 5 | "NuclleaR.vscode-extension-auto-import" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /examples/react-plain-text/icons/LICENSE.md: -------------------------------------------------------------------------------- 1 | Bootstrap Icons 2 | https://icons.getbootstrap.com 3 | 4 | Licensed under MIT license 5 | https://github.com/twbs/icons/blob/main/LICENSE.md 6 | -------------------------------------------------------------------------------- /packages/lexical-website/static/img/docs/state-formatting-lexical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-website/static/img/docs/state-formatting-lexical.png -------------------------------------------------------------------------------- /packages/lexical-website/static/img/tutorial/docsVersionDropdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-website/static/img/tutorial/docsVersionDropdown.png -------------------------------------------------------------------------------- /examples/react-rich/public/icons/LICENSE.md: -------------------------------------------------------------------------------- 1 | Bootstrap Icons 2 | https://icons.getbootstrap.com 3 | 4 | Licensed under MIT license 5 | https://github.com/twbs/icons/blob/main/LICENSE.md 6 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/LICENSE.md: -------------------------------------------------------------------------------- 1 | Bootstrap Icons 2 | https://icons.getbootstrap.com 3 | 4 | Licensed under MIT license 5 | https://github.com/twbs/icons/blob/main/LICENSE.md 6 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/LICENSE.md: -------------------------------------------------------------------------------- 1 | Bootstrap Icons 2 | https://icons.getbootstrap.com 3 | 4 | Licensed under MIT license 5 | https://github.com/twbs/icons/blob/main/LICENSE.md 6 | -------------------------------------------------------------------------------- /packages/lexical-website/src/pages/markdown-page.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown page example 3 | --- 4 | 5 | # Markdown page example 6 | 7 | You don't need React to write simple standalone pages. 8 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/scripts/__tests__/integration/fixtures/lexical-esm-nextjs/app/favicon.ico -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "author": "xcode", 4 | "version": 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/LICENSE.md: -------------------------------------------------------------------------------- 1 | Bootstrap Icons 2 | https://icons.getbootstrap.com 3 | 4 | Licensed under MIT license 5 | https://github.com/twbs/icons/blob/main/LICENSE.md 6 | -------------------------------------------------------------------------------- /packages/lexical-website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/emoji/LICENSE.md: -------------------------------------------------------------------------------- 1 | OpenMoji 2 | https://openmoji.org 3 | 4 | Licensed under Attribution-ShareAlike 4.0 International 5 | https://creativecommons.org/licenses/by-sa/4.0/ 6 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/add-sign.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/image/LICENSE.md: -------------------------------------------------------------------------------- 1 | yellow-flower.jpg by Andrew Haimerl 2 | https://unsplash.com/photos/oxQHb8Yqt14 3 | 4 | Licensed under Unsplash License 5 | https://unsplash.com/license 6 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/minus-sign.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/LICENSE.md: -------------------------------------------------------------------------------- 1 | Bootstrap Icons 2 | https://icons.getbootstrap.com 3 | 4 | Licensed under MIT license 5 | https://github.com/twbs/icons/blob/main/LICENSE.md 6 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/LICENSE.md: -------------------------------------------------------------------------------- 1 | Bootstrap Icons 2 | https://icons.getbootstrap.com 3 | 4 | Licensed under MIT license 5 | https://github.com/twbs/icons/blob/main/LICENSE.md 6 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-sveltekit-vanilla-js/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/scripts/__tests__/integration/fixtures/lexical-esm-sveltekit-vanilla-js/static/favicon.png -------------------------------------------------------------------------------- /libdefs/globals.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.jpg'; 2 | declare module '*.jpeg'; 3 | declare module '*.gif'; 4 | declare module '*.png'; 5 | declare module '*.svg'; 6 | declare module 'prismjs/components/prism-*'; 7 | 8 | declare var __DEV__: boolean; 9 | -------------------------------------------------------------------------------- /packages/lexical-utils/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/utils` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_utils) 4 | 5 | This package contains misc utilities for Lexical. 6 | -------------------------------------------------------------------------------- /scripts/www/headerTemplate.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/.gitignore: -------------------------------------------------------------------------------- 1 | xcuserdata/ 2 | *.xcworkspace 3 | build/ 4 | fastlane/report.xml 5 | fastlane/Preview.html 6 | fastlane/screenshots/**/*.png 7 | fastlane/test_output 8 | Lexical\ Developer\ Tools/VersioningConfig.xcconfig -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Resources/Icon.png -------------------------------------------------------------------------------- /eslint-plugin/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-plugin-lexical", 3 | "version": "1.0.0", 4 | "description": "ESLint plugin for lexical", 5 | "main": "src/index.js", 6 | "peerDependencies": { 7 | "eslint": "^7.31.0 || ^8.0.0" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/lexical-offset/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/offset` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_offset) 4 | 5 | This package contains selection offset helpers for Lexical. 6 | -------------------------------------------------------------------------------- /packages/lexical-selection/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/selection` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_selection) 4 | 5 | This package contains selection helpers for Lexical. 6 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-sveltekit-vanilla-js/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | -------------------------------------------------------------------------------- /packages/lexical-text/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/text` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_text) 4 | 5 | This package contains utilities and helpers for handling Lexical text. 6 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/utils/isMobileWidth.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict", 3 | "compilerOptions": { 4 | "jsx": "react-jsx", 5 | "jsxImportSource": "react" 6 | }, 7 | "exclude": ["vendored_node_modules", "dist"] 8 | } -------------------------------------------------------------------------------- /packages/lexical-mark/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/mark` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_mark) 4 | 5 | This package contains helpers and nodes for wrapping content in marks for Lexical. 6 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/font-color.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-file/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/file` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_file) 4 | 5 | This package contains the functionality for the file import/export feature of Lexical. 6 | -------------------------------------------------------------------------------- /packages/lexical-overflow/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/overflow` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_overflow) 4 | 5 | This package contains selection overflow helpers and nodes for Lexical. 6 | -------------------------------------------------------------------------------- /packages/lexical-clipboard/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/clipboard` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_clipboard) 4 | 5 | This package contains the functionality for the clipboard feature of Lexical. 6 | -------------------------------------------------------------------------------- /packages/lexical-code/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/code` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_code) 4 | 5 | This package contains the functionality for the code blocks and code highlighting for Lexical. 6 | -------------------------------------------------------------------------------- /packages/lexical-devtools-core/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/devtools-core` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_devtools_core) 4 | 5 | This package contains tools necessary to debug and develop Lexical. 6 | -------------------------------------------------------------------------------- /packages/lexical-website/src/pages/gallery.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: gallery 3 | title: Gallery 4 | --- 5 | import { FBInternOnly } from 'docusaurus-plugin-internaldocs-fb/internal'; 6 | import GalleryPage from '@site/src/components/Gallery/GalleryPage'; 7 | 8 | # Gallery 9 | 10 | -------------------------------------------------------------------------------- /packages/lexical-yjs/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/yjs` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_yjs) 4 | 5 | This package provides a set of bindings for Y.js that allow for collaborative editing with Lexical. 6 | -------------------------------------------------------------------------------- /packages/lexical-link/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/link` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_link) 4 | 5 | This package contains the functionality for Lexical links. 6 | 7 | More documentation coming soon. 8 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/lock-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors": [ 3 | { 4 | "idiom": "universal" 5 | } 6 | ], 7 | "info": { 8 | "author": "xcode", 9 | "version": 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/entrypoints/devtools/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/lexical-hashtag/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/hashtag` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_hashtag) 4 | 5 | This package contains the functionality for Lexical hashtags. 6 | 7 | More documentation coming soon. 8 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/caret-right-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/success-alt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/success.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-website/docs/error.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: error 3 | title: Error Code 4 | --- 5 | import { OssOnly } from 'docusaurus-plugin-internaldocs-fb/internal'; 6 | import ErrorCodePage from '@site/src/components/ErrorCodePage'; 7 | 8 | # Error Code 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/type-h1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-table/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/table` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_table) 4 | 5 | This package contains the functionality for the Tables feature of Lexical. 6 | 7 | More documentation coming soon. 8 | -------------------------------------------------------------------------------- /packages/lexical-yjs/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | module.exports = require('./dist/LexicalYjs.js'); 10 | -------------------------------------------------------------------------------- /examples/react-rich/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /examples/react-table/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/chevron-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/pre-release.yml: -------------------------------------------------------------------------------- 1 | name: Publish to NPM 2 | on: workflow_dispatch 3 | 4 | jobs: 5 | release: 6 | uses: ./.github/workflows/call-npm-publish.yml 7 | with: 8 | ref: main 9 | dry-run: false 10 | channel: latest 11 | secrets: 12 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 13 | -------------------------------------------------------------------------------- /examples/react-plain-text/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Gaerwn/lexical/HEAD/packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png -------------------------------------------------------------------------------- /packages/lexical-devtools/src/constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export const EXTENSION_NAME = 'lexical-devtools'; 10 | -------------------------------------------------------------------------------- /examples/react-rich-collab/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /packages/lexical-dragon/README.md: -------------------------------------------------------------------------------- 1 | # `@lexical/dragon` 2 | 3 | [![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_dragon) 4 | 5 | This package contains compatibility with Dragon NaturallySpeaking accessibility tools. 6 | 7 | More documentation coming soon. 8 | -------------------------------------------------------------------------------- /packages/lexical/Lexical.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/Lexical.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-devtools/SOURCE_CODE_REVIEW.md: -------------------------------------------------------------------------------- 1 | # Lexical Developer Tools review instructions: 2 | 3 | 1. Install latest LTS version of Node.js & Chrome 4 | 2. Use local copy of the source code or obtain one from https://github.com/facebook/lexical 5 | 3. Run `npm i` 6 | 4. Navigate to `/packages/lexical-devtools` 7 | 5. Run `npm run dev` 8 | -------------------------------------------------------------------------------- /packages/lexical-selection/src/constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | export const CSS_TO_STYLES: Map> = new Map(); 9 | -------------------------------------------------------------------------------- /packages/lexical-code/LexicalCode.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalCode.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-file/LexicalFile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalFile.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-html/LexicalHtml.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalHtml.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-link/LexicalLink.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalLink.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-list/LexicalList.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalList.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-mark/LexicalMark.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalMark.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-text/LexicalText.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalText.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-utils/src/px.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export default function px(value: number) { 10 | return `${value}px`; 11 | } 12 | -------------------------------------------------------------------------------- /packages/lexical-yjs/LexicalYjs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalYjs.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-table/LexicalTable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalTable.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-utils/LexicalUtils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalUtils.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-dragon/LexicalDragon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalDragon.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-hashtag/LexicalHashtag.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalHashtag.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-history/LexicalHistory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalHistory.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-offset/LexicalOffset.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalOffset.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/type-h4.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalListPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | declare export function ListPlugin(): null; 11 | -------------------------------------------------------------------------------- /packages/lexical-clipboard/LexicalClipboard.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalClipboard.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-eslint-plugin/flow/LexicalEslintPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | /** 11 | * LexicalEslintPlugin 12 | */ 13 | -------------------------------------------------------------------------------- /packages/lexical-headless/LexicalHeadless.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalHeadless.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-markdown/LexicalMarkdown.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalMarkdown.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-overflow/LexicalOverflow.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalOverflow.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/lock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalContextMenuPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | /** 11 | * LexicalContextMenuPlugin 12 | */ 13 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalNodeEventPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | /** 11 | * LexicalNodeEventPlugin 12 | */ 13 | -------------------------------------------------------------------------------- /packages/lexical-rich-text/LexicalRichText.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalRichText.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-selection/LexicalSelection.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalSelection.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-plain-text/LexicalPlainText.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalPlainText.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/type-underline.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalCheckListPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | declare export function CheckListPlugin(): null; 11 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalHashtagPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | declare export function HashtagPlugin(): React.Node; 11 | -------------------------------------------------------------------------------- /packages/lexical-devtools-core/LexicalDevtoolsCore.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | module.exports = require('./dist/LexicalDevtoolsCore.js'); 12 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/element-picker/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import ElementPicker from './element-picker'; 10 | 11 | export {ElementPicker}; 12 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/plugins/TableCellResizer/index.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * 8 | */ 9 | 10 | .TableCellResizer__resizer { 11 | position: absolute; 12 | } 13 | -------------------------------------------------------------------------------- /examples/react-plain-text/src/ExampleTheme.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | export default { 9 | ltr: 'ltr', 10 | paragraph: 'editor-paragraph', 11 | rtl: 'rtl', 12 | }; 13 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/chat-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/entrypoints/popup/App.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | min-width: 286px; 4 | min-height: 33px; 5 | } 6 | 7 | body { 8 | display: flex; 9 | place-items: flex-start; 10 | } 11 | 12 | #root { 13 | display: flex; 14 | flex-direction: column; 15 | flex-grow: 1; 16 | max-width: 740px; 17 | margin: 0 auto; 18 | padding: 1rem; 19 | } 20 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/type-italic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/type-underline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/arrow-clockwise.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/font-family.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/type-underline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-devtools-core/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export * from './generateContent'; 10 | export * from './TreeView'; 11 | export * from './useLexicalCommandsLog'; 12 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/themes/CommentEditorTheme.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * 8 | */ 9 | 10 | .CommentEditorTheme__paragraph { 11 | margin: 0; 12 | position: 'relative'; 13 | } 14 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/themes/StickyEditorTheme.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * 8 | */ 9 | 10 | .StickyEditorTheme__paragraph { 11 | margin: 0; 12 | position: 'relative'; 13 | } 14 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/type-underline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Lexical React Example 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/vanilla-js/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Lexical Basic - Vanilla JS 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/arrow-counterclockwise.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/table.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/type-capitalize.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | # NOTE: In general this should be kept in sync with .prettierignore 2 | 3 | **/dist/** 4 | **/build/** 5 | **/npm/** 6 | **/__tests__/integration/fixtures/** 7 | !scripts/npm/** 8 | **/*.js.flow 9 | **/*.d.ts 10 | **/playwright*/** 11 | **/vite.config.js 12 | **/vite.prod.config.js 13 | **/node_modules 14 | .ts-temp 15 | **/.docusaurus 16 | /playwright-report 17 | test-results 18 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.defaultFormatter": "esbenp.prettier-vscode", 3 | "javascript.validate.enable": false, 4 | "[javascript][typescript]": { 5 | "editor.codeActionsOnSave": [ 6 | // Run ESLint fixers _before_ prettier to ensure the user doesn't need to do multiple saves 7 | "source.fixAll.eslint", 8 | "source.fixAll.format" 9 | ] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/type-italic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/type-italic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/vanilla-js-plugin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vanilla JS Lexical Plugin 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.github/workflows/size-limit.yml: -------------------------------------------------------------------------------- 1 | name: 'Bundles' 2 | on: 3 | pull_request_target: 4 | branches: 5 | - main 6 | jobs: 7 | size-limit: 8 | runs-on: ubuntu-latest 9 | env: 10 | CI_JOB_NUMBER: 1 11 | steps: 12 | - uses: actions/checkout@v4 13 | - uses: andresz1/size-limit-action@v1 14 | with: 15 | github_token: ${{ secrets.GITHUB_TOKEN }} 16 | -------------------------------------------------------------------------------- /examples/react-plain-text/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Lexical Plain Text Example 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/react-table/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Lexical React TablePlugin Example 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/draggable-block-menu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/horizontal-rule.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/send.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/react-plain-text/icons/arrow-clockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/type-italic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/arrow-clockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/arrow-clockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/entrypoints/devtools-panel/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Loading Lexical DevTools UI...
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tsconfig.test.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "esModuleInterop": true, 5 | "strict": false 6 | }, 7 | "include": ["./libdefs", "./packages"], 8 | "exclude": [ 9 | "./libdefs/*.js", 10 | "**/dist/**", 11 | "**/npm/**", 12 | "**/node_modules/**", 13 | "./packages/lexical-devtools/**" 14 | ], 15 | "extends": "./tsconfig.json" 16 | } 17 | -------------------------------------------------------------------------------- /examples/react-rich-collab/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | React.js Collaborative Lexical Example 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/arrow-clockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/lexical-website/docs/getting-started/supported-browsers.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | --- 4 | 5 | # Supported Browsers 6 | 7 | > Note: Lexical does not support Internet Explorer or legacy versions of Edge. 8 | 9 | - Firefox 52+ 10 | - Chrome 49+ 11 | - Edge 79+ (when Edge switched to Chromium) 12 | - Safari 11+ 13 | - iOS 11+ (Safari) 14 | - iPad OS 13+ (Safari) 15 | - Android Chrome 72+ 16 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/file-image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/plus-slash-minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | 3 | # build output 4 | dist/ 5 | 6 | # generated types 7 | .astro/ 8 | 9 | # dependencies 10 | node_modules/ 11 | 12 | # logs 13 | npm-debug.log* 14 | yarn-debug.log* 15 | yarn-error.log* 16 | pnpm-debug.log* 17 | 18 | # environment variables 19 | .env 20 | .env.production 21 | 22 | # macOS-specific files 23 | .DS_Store 24 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/postcss.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | module.exports = { 10 | plugins: { 11 | tailwindcss: {}, 12 | autoprefixer: {}, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /examples/react-plain-text/icons/arrow-counterclockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/arrow-counterclockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/arrow-counterclockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/link.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/mic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalHorizontalRulePlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | type Props = $ReadOnly<{}>; 11 | 12 | declare export function HorizontalRulePlugin(props: Props): null; 13 | -------------------------------------------------------------------------------- /packages/lexical-website/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /build 6 | 7 | # Generated files 8 | .docusaurus 9 | .cache-loader 10 | /docs/api 11 | /docs/packages 12 | 13 | # Misc 14 | .DS_Store 15 | .env.local 16 | .env.development.local 17 | .env.test.local 18 | .env.production.local 19 | 20 | npm-debug.log* 21 | yarn-debug.log* 22 | yarn-error.log* 23 | /fb/sdoc-cache.json 24 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/type-underline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/arrow-counterclockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalCharacterLimitPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | declare export function CharacterLimitPlugin(props: { 11 | charset: 'UTF-8' | 'UTF-16', 12 | }): React.Node; 13 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/type-underline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-sveltekit-vanilla-js/vite.config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import { sveltekit } from '@sveltejs/kit/vite'; 10 | 11 | export default { 12 | plugins: [sveltekit()], 13 | }; 14 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/justify.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/text-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/plugins/CodeActionMenuPlugin/components/PrettierButton/index.css: -------------------------------------------------------------------------------- 1 | .code-action-menu-container .prettier-wrapper { 2 | position: relative; 3 | } 4 | 5 | .code-action-menu-container .prettier-wrapper .code-error-tips { 6 | padding: 5px; 7 | border-radius: 4px; 8 | color: #fff; 9 | background: #222; 10 | margin-top: 4px; 11 | position: absolute; 12 | top: 26px; 13 | right: 0; 14 | } 15 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalSelectionAlwaysOnDisplay.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | /** 11 | * LexicalSelectionAlwaysOnDisplay 12 | */ 13 | declare export function SelectionAlwaysOnDisplay(): null; 14 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/type-italic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /eslint-plugin/src/rules/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | const noOptionalChaining = require('./no-optional-chaining'); 12 | 13 | module.exports = { 14 | 'no-optional-chaining': noOptionalChaining, 15 | }; 16 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/text-center.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/text-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/upload.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/utils/joinClasses.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export default function joinClasses( 10 | ...args: Array 11 | ) { 12 | return args.filter(Boolean).join(' '); 13 | } 14 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/type-italic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/3-columns.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/download.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/text-paragraph.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalClearEditorPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | type Props = $ReadOnly<{ 11 | onClear?: () => void, 12 | }>; 13 | 14 | declare export function ClearEditorPlugin(Props): React.Node; 15 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/arrow-clockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/react-rich/vite.config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | import react from '@vitejs/plugin-react'; 9 | import {defineConfig} from 'vite'; 10 | 11 | // https://vitejs.dev/config/ 12 | export default defineConfig({ 13 | plugins: [react()], 14 | }); 15 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ITSAppUsesNonExemptEncryption 6 | 7 | SFSafariWebExtensionConverterVersion 8 | 15.3 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/lexical-hashtag/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import { 10 | $createHashtagNode, 11 | $isHashtagNode, 12 | HashtagNode, 13 | } from './LexicalHashtagNode'; 14 | 15 | export {$createHashtagNode, $isHashtagNode, HashtagNode}; 16 | -------------------------------------------------------------------------------- /packages/lexical-plain-text/flow/LexicalPlainText.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | import type {EditorState, LexicalEditor} from 'lexical'; 10 | 11 | declare export function registerPlainText(editor: LexicalEditor): () => void; 12 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalLinkPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | type Props = $ReadOnly<{ 11 | validateUrl?: (url: string) => boolean, 12 | }>; 13 | 14 | declare export function LinkPlugin(props: Props): null; 15 | -------------------------------------------------------------------------------- /packages/shared/src/canUseDOM.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export const CAN_USE_DOM: boolean = 10 | typeof window !== 'undefined' && 11 | typeof window.document !== 'undefined' && 12 | typeof window.document.createElement !== 'undefined'; 13 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/arrow-clockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/justify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/text-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/justify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/text-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/vite.config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | import react from '@vitejs/plugin-react'; 9 | import {defineConfig} from 'vite'; 10 | 11 | // https://vitejs.dev/config/ 12 | export default defineConfig({ 13 | plugins: [react()], 14 | }); 15 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/copy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/sticky.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-website/i18n/en/docusaurus-plugin-content-blog/options.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": { 3 | "message": "Blog", 4 | "description": "The title for the blog used in SEO" 5 | }, 6 | "description": { 7 | "message": "Blog", 8 | "description": "The description for the blog used in SEO" 9 | }, 10 | "sidebar.title": { 11 | "message": "Recent posts", 12 | "description": "The label for the left sidebar" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/arrow-counterclockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/react-plain-text/vite.config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | import react from '@vitejs/plugin-react'; 9 | import {defineConfig} from 'vite'; 10 | 11 | // https://vitejs.dev/config/ 12 | export default defineConfig({ 13 | plugins: [react()], 14 | }); 15 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/justify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/text-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/text-center.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/text-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/text-center.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/text-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-devtools/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .output 12 | stats.html 13 | stats-*.json 14 | .wxt 15 | web-ext.config.ts 16 | .env.secrets 17 | 18 | # Editor directories and files 19 | .vscode/* 20 | !.vscode/extensions.json 21 | .idea 22 | .DS_Store 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /packages/lexical-file/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export { 10 | editorStateFromSerializedDocument, 11 | exportFile, 12 | importFile, 13 | type SerializedDocument, 14 | serializedDocumentFromEditorState, 15 | } from './fileImportExport'; 16 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalClickableLinkPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | declare export function ClickableLinkPlugin({ 11 | newTab?: boolean, 12 | }): null; 13 | 14 | declare export default typeof ClickableLinkPlugin; 15 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/arrow-counterclockwise.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | /** @type {import('next').NextConfig} */ 10 | const nextConfig = { 11 | eslint: {ignoreDuringBuilds: true}, 12 | }; 13 | 14 | export default nextConfig; 15 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/text-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/text-paragraph.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/text-paragraph.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Config.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // Config.xcconfig 3 | // Lexical Developer Tools 4 | // 5 | // Created by Vladlen Fedosov on 5/21/24. 6 | // 7 | 8 | // Configuration settings file format documentation can be found at: 9 | // https://help.apple.com/xcode/#/dev745c5c974 10 | 11 | VERSION=0.0.0 12 | 13 | // This file is generated during npm run safari:archive 14 | #include? "VersioningConfig.xcconfig" 15 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalAutoFocusPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | type Props = $ReadOnly<{ 11 | defaultSelection?: 'rootStart' | 'rootEnd', 12 | }>; 13 | 14 | declare export function AutoFocusPlugin(props: Props): null; 15 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | bracketSameLine: true, 7 | printWidth: 80, 8 | trailingComma: 'all', 9 | htmlWhitespaceSensitivity: 'ignore', 10 | attributeGroups: ['^class$', '^(id|name)$', '$DEFAULT', '^aria-', '^data-'], 11 | attributeSort: 'ASC', 12 | plugins: [ 13 | 'prettier-plugin-tailwindcss', 14 | 'prettier-plugin-organize-attributes', 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/text-center.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/text-paragraph.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/entrypoints/devtools/main.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | // Create the panel which appears within the browser devtools 10 | browser.devtools.panels.create( 11 | 'Lexical', 12 | '/icon/logo.svg', 13 | 'devtools-panel.html', 14 | ); 15 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/entrypoints/popup/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Lexical DevTools 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/list-ul.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/react-rich-collab/README.md: -------------------------------------------------------------------------------- 1 | # Basic Vanilla JS example 2 | 3 | Here we have simplest Lexical collaboration mode setup. Use it as a starting point for your own projects as well as platform for bug reporting! 4 | 5 | **Run it locally:** `npm i && npm run dev:local` 6 | 7 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/fix/collab_example/examples/react-rich-collab?file=src/main.ts) 8 | -------------------------------------------------------------------------------- /examples/react-rich/README.md: -------------------------------------------------------------------------------- 1 | # React Rich Text example 2 | 3 | Here we have simplest Lexical setup in rich text configuration (`@lexical/rich-text`) with history (`@lexical/history`) and accessibility (`@lexical/dragon`) features enabled. 4 | 5 | **Run it locally:** `npm i && npm run dev` 6 | 7 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-rich?file=src/main.tsx) 8 | -------------------------------------------------------------------------------- /examples/vanilla-js/README.md: -------------------------------------------------------------------------------- 1 | # Basic Vanilla JS example 2 | 3 | Here we have simplest Lexical setup in rich text configuration (`@lexical/rich-text`) with history (`@lexical/history`) and accessibility (`@lexical/dragon`) features enabled. 4 | 5 | **Run it locally:** `npm i && npm run dev` 6 | 7 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/main/examples/vanilla-js?file=src/main.ts) 8 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Lexical_Developer_Tools.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/image-broken.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/useLexicalNodeSelection.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | import type {NodeKey} from 'lexical'; 11 | 12 | declare export function useLexicalNodeSelection( 13 | key: NodeKey, 14 | ): [boolean, (boolean) => void, () => void]; 15 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-sveltekit-vanilla-js/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Assets.xcassets/LargeIcon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "idiom": "universal", 5 | "scale": "1x" 6 | }, 7 | { 8 | "idiom": "universal", 9 | "scale": "2x" 10 | }, 11 | { 12 | "idiom": "universal", 13 | "scale": "3x" 14 | } 15 | ], 16 | "info": { 17 | "author": "xcode", 18 | "version": 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/square-check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/shared/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shared", 3 | "private": "true", 4 | "keywords": [ 5 | "react", 6 | "lexical", 7 | "editor", 8 | "rich-text" 9 | ], 10 | "license": "MIT", 11 | "version": "0.22.0", 12 | "dependencies": { 13 | "lexical": "0.22.0" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/facebook/lexical", 18 | "directory": "packages/shared" 19 | }, 20 | "sideEffects": false 21 | } 22 | -------------------------------------------------------------------------------- /examples/react-plain-text/README.md: -------------------------------------------------------------------------------- 1 | # React Plain Text Lexical example 2 | 3 | Here we have simplest Lexical setup in plaintext configuration (`@lexical/plain-text`) with history (`@lexical/history`) and accessibility (`@lexical/dragon`) features enabled. 4 | 5 | **Run it locally:** `npm i && npm run dev` 6 | 7 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?file=src/main.tsx) 8 | -------------------------------------------------------------------------------- /examples/react-table/README.md: -------------------------------------------------------------------------------- 1 | # React Table Plugin example 2 | 3 | Here we have simplest Lexical Table Plugin setup in rich text configuration (`@lexical/rich-text`) with history (`@lexical/history`) and accessibility (`@lexical/dragon`) features enabled. 4 | 5 | **Run it locally:** `npm i && npm run dev` 6 | 7 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-table?file=src/main.tsx) 8 | -------------------------------------------------------------------------------- /libdefs/react.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | // Flow comes with a pretty good library definitions for React, and it 10 | // includes a type for useRef but no definition for the ref object itself. 11 | 12 | // eslint-disable-next-line strict 13 | declare type RefObject = {current: null | T}; 14 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/chat-right-dots.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/type-bold.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/useLexicalIsTextContentEmpty.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | import type {LexicalEditor} from 'lexical'; 11 | 12 | declare export function useLexicalIsTextContentEmpty( 13 | editor: LexicalEditor, 14 | trim?: boolean, 15 | ): boolean; 16 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/justify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/text-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/text-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-table/src/constants.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export const PIXEL_VALUE_REG_EXP = /^(\d+(?:\.\d+)?)px$/; 10 | 11 | // .PlaygroundEditorTheme__tableCell width value from 12 | // packages/lexical-playground/src/themes/PlaygroundEditorTheme.css 13 | export const COLUMN_WIDTH = 75; 14 | -------------------------------------------------------------------------------- /packages/lexical-website/blog/2019-05-28-first-blog-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | slug: first-blog-post 3 | title: First Blog Post 4 | authors: 5 | name: Gao Wei 6 | title: Docusaurus Core Team 7 | url: https://github.com/wgao19 8 | image_url: https://github.com/wgao19.png 9 | tags: [hola, docusaurus] 10 | --- 11 | 12 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet 13 | -------------------------------------------------------------------------------- /packages/lexical-website/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | /* eslint-disable strict */ 10 | 11 | /** @type {import('tailwindcss').Config} */ 12 | module.exports = { 13 | content: ['src/**/*.{js,jsx,ts,tsx}'], 14 | plugins: [], 15 | theme: { 16 | extend: {}, 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/justify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/text-left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/text-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/text-center.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools Extension/Lexical_Developer_Tools_Extension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/public/inspect.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/type-h2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalTablePlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | type Props = $ReadOnly<{ 11 | hasCellMerge?: boolean, 12 | hasCellBackgroundColor?: boolean, 13 | hasTabHandler?: boolean, 14 | }>; 15 | declare export function TablePlugin(props: Props): null; 16 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/text-center.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/text-paragraph.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-eslint-plugin/LexicalEslintPlugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | // This file is here for bootstrapping reasons so we can use it without 11 | // building anything and still comply with the monorepo conventions 12 | module.exports = require('./src/LexicalEslintPlugin.js'); 13 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/text-paragraph.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/type-bold.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/type-bold.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-dragon/flow/LexicalDragon.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | import type {LexicalEditor} from 'lexical'; 10 | import {$getSelection, $isRangeSelection, $isTextNode} from 'lexical'; 11 | declare export function registerDragonSupport( 12 | editor: LexicalEditor, 13 | ): () => void; 14 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/clipboard.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/react-rich-collab/public/icons/type-bold.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-website/static/img/stack-overflow.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/shared/src/warnOnlyOnce.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export default function warnOnlyOnce(message: string) { 10 | if (!__DEV__) { 11 | return; 12 | } 13 | let run = false; 14 | return () => { 15 | if (!run) { 16 | console.warn(message); 17 | } 18 | run = true; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/astro.config.mjs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import { defineConfig } from "astro/config"; 10 | 11 | import react from "@astrojs/react"; 12 | 13 | // https://astro.build/config 14 | export default defineConfig({ 15 | integrations: [react()], 16 | }); 17 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/hooks/useFlashMessage.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import { 10 | type ShowFlashMessage, 11 | useFlashMessageContext, 12 | } from '../context/FlashMessageContext'; 13 | 14 | export default function useFlashMessage(): ShowFlashMessage { 15 | return useFlashMessageContext(); 16 | } 17 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/outdent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/scissors.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalTabIndentationPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | import type {LexicalEditor} from 'lexical'; 11 | 12 | declare export function registerTabIndentation( 13 | editor: LexicalEditor, 14 | ): () => void; 15 | 16 | declare export function TabIndentationPlugin(): null; 17 | -------------------------------------------------------------------------------- /scripts/shared/readMonorepoPackageJson.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | // @ts-check 9 | 'use strict'; 10 | 11 | const fs = require('fs-extra'); 12 | const path = require('node:path'); 13 | 14 | module.exports = function readMonorepoPackageJson() { 15 | return fs.readJsonSync(path.resolve(__dirname, '../../package.json')); 16 | }; 17 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/indent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-devtools/safari-xcode/Lexical Developer Tools/Lexical Developer Tools/Lexical Developer Tools.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalTableOfContents.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | import {TableOfContentsPlugin} from '@lexical/react/LexicalTableOfContentsPlugin'; 11 | 12 | /** @deprecated use the named export {@link LexicalTableOfContentsPlugin} */ 13 | declare export default typeof TableOfContentsPlugin; 14 | -------------------------------------------------------------------------------- /packages/lexical-text/src/rootTextContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | import {$getRoot} from 'lexical'; 9 | 10 | /** 11 | * Returns the root's text content. 12 | * @returns The root's text content. 13 | */ 14 | export function $rootTextContent(): string { 15 | const root = $getRoot(); 16 | 17 | return root.getTextContent(); 18 | } 19 | -------------------------------------------------------------------------------- /packages/lexical-website/src/css/tailwind.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | /* TODO: This base reset is commented out because it unstyles many elements on 9 | * the home and docs pages. When the full website redesign happens, this should 10 | * be reapplied. 11 | */ 12 | /* @tailwind base; */ 13 | @tailwind components; 14 | @tailwind utilities; 15 | -------------------------------------------------------------------------------- /packages/lexical-website/src/components/Gallery/GalleryPage.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import React from 'react'; 10 | 11 | import GalleryCards from './GalleryCards'; 12 | 13 | export default function GalleryPage() { 14 | return ( 15 |
16 | 17 |
18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/file-earmark-text.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/useLexicalEditable.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | import type {LexicalEditor} from 'lexical'; 11 | 12 | declare export function useLexicalEditable(): boolean; 13 | 14 | /** @deprecated use the named export {@link useLexicalEditable} */ 15 | declare export default typeof useLexicalEditable; 16 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/public/icons/type-bold.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/public/icons/type-bold.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/lexical-website/blog/authors.yml: -------------------------------------------------------------------------------- 1 | endi: 2 | name: Endilie Yacop Sucipto 3 | title: Maintainer of Docusaurus 4 | url: https://github.com/endiliey 5 | image_url: https://github.com/endiliey.png 6 | 7 | yangshun: 8 | name: Yangshun Tay 9 | title: Front End Engineer @ Facebook 10 | url: https://github.com/yangshun 11 | image_url: https://github.com/yangshun.png 12 | 13 | slorber: 14 | name: Sébastien Lorber 15 | title: Docusaurus maintainer 16 | url: https://sebastienlorber.com 17 | image_url: https://github.com/slorber.png 18 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalMarkdownShortcutPlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | import type {Transformer} from '@lexical/markdown'; 11 | 12 | declare export var DEFAULT_TRANSFORMERS: Array; 13 | 14 | declare export function MarkdownShortcutPlugin({ 15 | transformers?: Array, 16 | }): React.Node; 17 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/chat-left-text.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/src/shared/useList.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import type {LexicalEditor} from 'lexical'; 10 | 11 | import {registerList} from '@lexical/list'; 12 | import {useEffect} from 'react'; 13 | 14 | export function useList(editor: LexicalEditor): void { 15 | useEffect(() => { 16 | return registerList(editor); 17 | }, [editor]); 18 | } 19 | -------------------------------------------------------------------------------- /packages/lexical-website/src/components/ImageSwitcher/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import {useColorMode} from '@docusaurus/theme-common'; 10 | 11 | export default function ImageSwitcher({light, dark}) { 12 | const Light = light; 13 | const Dark = dark; 14 | const {isDarkTheme} = useColorMode(); 15 | return isDarkTheme ? : ; 16 | } 17 | -------------------------------------------------------------------------------- /packages/lexical-file/flow/LexicalFile.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | * 9 | */ 10 | 11 | import type {LexicalEditor} from 'lexical'; 12 | 13 | declare export function importFile(editor: LexicalEditor): void; 14 | declare export function exportFile( 15 | editor: LexicalEditor, 16 | config?: $ReadOnly<{fileName?: string, source?: string}>, 17 | ): void; 18 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/chat-right-text.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/utils/isLexicalNode.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import {getEditorPropertyFromDOMNode} from 'lexical'; 10 | 11 | import {LexicalHTMLElement} from '../types'; 12 | 13 | export function isLexicalNode( 14 | node: LexicalHTMLElement | Element, 15 | ): node is LexicalHTMLElement { 16 | return getEditorPropertyFromDOMNode(node) !== undefined; 17 | } 18 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-website/blog/2021-08-01-mdx-blog-post.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | slug: mdx-blog-post 3 | title: MDX Blog Post 4 | authors: [slorber] 5 | tags: [docusaurus] 6 | --- 7 | 8 | Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/). 9 | 10 | :::tip 11 | 12 | Use the power of React to create interactive blog posts. 13 | 14 | ```js 15 | 16 | ``` 17 | 18 | 19 | 20 | ::: 21 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/trash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/app/page.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import EditorUseClient from "./EditorUseClient"; 10 | 11 | export const dynamic = 'force-dynamic'; 12 | 13 | export default function Home() { 14 | return ( 15 |
16 |

Next.js Rich Text Lexical Example

17 | 18 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/themes/StickyEditorTheme.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import type {EditorThemeClasses} from 'lexical'; 10 | 11 | import './StickyEditorTheme.css'; 12 | 13 | import baseTheme from './PlaygroundEditorTheme'; 14 | 15 | const theme: EditorThemeClasses = { 16 | ...baseTheme, 17 | paragraph: 'StickyEditorTheme__paragraph', 18 | }; 19 | 20 | export default theme; 21 | -------------------------------------------------------------------------------- /examples/vanilla-js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@lexical/vanilla-js-example", 3 | "private": true, 4 | "version": "0.22.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "@lexical/dragon": "0.22.0", 13 | "@lexical/history": "0.22.0", 14 | "@lexical/rich-text": "0.22.0", 15 | "@lexical/utils": "0.22.0", 16 | "lexical": "0.22.0" 17 | }, 18 | "devDependencies": { 19 | "typescript": "^5.2.2", 20 | "vite": "^5.2.11" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/plugins/CollapsiblePlugin/CollapsibleUtils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | export function setDomHiddenUntilFound(dom: HTMLElement): void { 10 | // @ts-expect-error 11 | dom.hidden = 'until-found'; 12 | } 13 | 14 | export function domOnBeforeMatch(dom: HTMLElement, callback: () => void): void { 15 | // @ts-expect-error 16 | dom.onbeforematch = callback; 17 | } 18 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/themes/CommentEditorTheme.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import type {EditorThemeClasses} from 'lexical'; 10 | 11 | import './CommentEditorTheme.css'; 12 | 13 | import baseTheme from './PlaygroundEditorTheme'; 14 | 15 | const theme: EditorThemeClasses = { 16 | ...baseTheme, 17 | paragraph: 'CommentEditorTheme__paragraph', 18 | }; 19 | 20 | export default theme; 21 | -------------------------------------------------------------------------------- /packages/lexical-website/static/img/see-api-documentation.svg: -------------------------------------------------------------------------------- 1 | SEE API DOCUMENTATIONSEE API DOCUMENTATION -------------------------------------------------------------------------------- /examples/react-rich-collab/src/main.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | import './styles.css'; 9 | 10 | import React from 'react'; 11 | import ReactDOM from 'react-dom/client'; 12 | 13 | import App from './App.tsx'; 14 | 15 | ReactDOM.createRoot(document.getElementById('root')!).render( 16 | 17 |
18 | 19 |
20 |
, 21 | ); 22 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/type-strikethrough.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/playwright.config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import type { PlaywrightTestConfig } from '@playwright/test'; 10 | 11 | const config: PlaywrightTestConfig = { 12 | webServer: { 13 | command: 'npm run start', 14 | port: 3000 15 | }, 16 | testDir: 'tests', 17 | testMatch: /(.+\.)?(test|spec)\.[jt]s/ 18 | }; 19 | 20 | export default config; 21 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/images/icons/pencil-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/LexicalOnChangePlugin.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | import type {EditorState, LexicalEditor} from 'lexical'; 11 | 12 | declare export function OnChangePlugin({ 13 | ignoreHistoryMergeTagChange?: boolean, 14 | ignoreSelectionChange?: boolean, 15 | onChange: (editorState: EditorState, editor: LexicalEditor, tags: Set) => void, 16 | }): null; 17 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-astro-react/playwright.config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import type { PlaywrightTestConfig } from '@playwright/test'; 10 | 11 | const config: PlaywrightTestConfig = { 12 | webServer: { 13 | command: 'npm run preview', 14 | port: 4321 15 | }, 16 | testDir: 'tests', 17 | testMatch: /(.+\.)?(test|spec)\.[jt]s/ 18 | }; 19 | 20 | export default config; 21 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Lexical Tests 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths-ignore: 8 | - 'examples/**' 9 | - 'packages/lexical-website/**' 10 | pull_request: 11 | types: [opened, synchronize, reopened] 12 | merge_group: 13 | 14 | concurrency: 15 | group: ${{ github.workflow }}-${{ github.ref }} 16 | cancel-in-progress: true 17 | 18 | jobs: 19 | core-tests: 20 | uses: ./.github/workflows/call-core-tests.yml 21 | 22 | e2e-tests: 23 | if: github.repository_owner == 'facebook' 24 | uses: ./.github/workflows/call-e2e-canary-tests.yml 25 | -------------------------------------------------------------------------------- /packages/lexical-devtools/src/entrypoints/injected/utils/queryLexicalNodes.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | import {LexicalHTMLElement} from '../../../types'; 9 | import {isLexicalNode} from '../../../utils/isLexicalNode'; 10 | 11 | export default function queryLexicalNodes(): LexicalHTMLElement[] { 12 | return Array.from( 13 | document.querySelectorAll('div[data-lexical-editor]'), 14 | ).filter(isLexicalNode); 15 | } 16 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/ui/Dialog.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | .DialogActions { 10 | display: flex; 11 | flex-direction: row; 12 | justify-content: right; 13 | margin-top: 20px; 14 | } 15 | 16 | .DialogButtonsList { 17 | display: flex; 18 | flex-direction: column; 19 | justify-content: right; 20 | margin-top: 20px; 21 | } 22 | 23 | .DialogButtonsList button { 24 | margin-bottom: 20px; 25 | } 26 | -------------------------------------------------------------------------------- /packages/lexical-react/flow/useLexicalTextEntity.js.flow: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | * @flow strict 8 | */ 9 | 10 | import type {TextNode} from 'lexical'; 11 | 12 | export type EntityMatch = {end: number, start: number}; 13 | 14 | declare export function useLexicalTextEntity( 15 | getMatch: (text: string) => null | EntityMatch, 16 | targetNode: Class, 17 | createNode: (textNode: TextNode) => N, 18 | ): void; 19 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-sveltekit-vanilla-js/playwright.config.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | import type { PlaywrightTestConfig } from '@playwright/test'; 10 | 11 | const config: PlaywrightTestConfig = { 12 | webServer: { 13 | command: 'npm run preview', 14 | port: 4173 15 | }, 16 | testDir: 'tests', 17 | testMatch: /(.+\.)?(test|spec)\.[jt]s/ 18 | }; 19 | 20 | export default config; 21 | -------------------------------------------------------------------------------- /examples/react-rich/public/icons/type-strikethrough.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/react-table/public/icons/type-strikethrough.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /examples/vanilla-js-plugin/README.md: -------------------------------------------------------------------------------- 1 | # Basic Vanilla JS Plugin example 2 | 3 | Plugin that replaces smiles (`:)`, `:P`, etc...) with actual emojis (using [Node Transforms](https://lexical.dev/docs/concepts/transforms)) and uses own graphics for emojis rendering by creating our own custom node that extends [TextNode](https://lexical.dev/docs/concepts/nodes#textnode). 4 | 5 | **Run it locally:** `npm i && npm run dev` 6 | 7 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/main/examples/vanilla-js-plugin?file=src/emoji-plugin/EmojiPlugin.ts) 8 | -------------------------------------------------------------------------------- /packages/lexical-eslint-plugin/src/index.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | /** 10 | * For bootstrapping reasons, this module is written in CJS JavaScript so no 11 | * compilation is necessary 12 | */ 13 | 14 | import * as plugin from './LexicalEslintPlugin.js'; 15 | 16 | export type {RulesOfLexicalOptions} from './rules/rules-of-lexical.js'; 17 | // eslint-disable-next-line no-restricted-exports 18 | export default plugin; 19 | -------------------------------------------------------------------------------- /scripts/__tests__/integration/fixtures/lexical-esm-nextjs/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /eslint-plugin/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | 9 | 'use strict'; 10 | 11 | const rules = require('./rules'); 12 | 13 | module.exports = { 14 | configs: { 15 | all: { 16 | rules: { 17 | 'lexical/no-optional-chaining': 'error', 18 | }, 19 | }, 20 | recommended: { 21 | rules: { 22 | 'lexical/no-optional-chaining': 'error', 23 | }, 24 | }, 25 | }, 26 | rules, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/lexical-playground/src/plugins/DocsPlugin/index.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | * 7 | */ 8 | import * as React from 'react'; 9 | 10 | export default function DocsPlugin(): JSX.Element { 11 | return ( 12 | 13 |