diff --git a/packages/lexical-clipboard/README.md b/packages/lexical-clipboard/README.md index 224e11da3..9cc7fdc23 100644 --- a/packages/lexical-clipboard/README.md +++ b/packages/lexical-clipboard/README.md @@ -1,3 +1,5 @@ # `@lexical/clipboard` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_clipboard) + This package contains the functionality for the clipboard feature of Lexical. diff --git a/packages/lexical-code/README.md b/packages/lexical-code/README.md index c97edd283..b5478c28d 100644 --- a/packages/lexical-code/README.md +++ b/packages/lexical-code/README.md @@ -1,3 +1,5 @@ # `@lexical/code` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_code) + This package contains the functionality for the code blocks and code highlighting for Lexical. diff --git a/packages/lexical-dragon/README.md b/packages/lexical-dragon/README.md index a62200712..d54cf1199 100644 --- a/packages/lexical-dragon/README.md +++ b/packages/lexical-dragon/README.md @@ -1,5 +1,7 @@ # `@lexical/dragon` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_dragon) + This package contains compatibility with Dragon NaturallySpeaking accessibility tools. More documentation coming soon. diff --git a/packages/lexical-file/README.md b/packages/lexical-file/README.md index c59e03ffd..f57810aca 100644 --- a/packages/lexical-file/README.md +++ b/packages/lexical-file/README.md @@ -1,3 +1,5 @@ # `@lexical/file` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_file) + This package contains the functionality for the file import/export feature of Lexical. diff --git a/packages/lexical-hashtag/README.md b/packages/lexical-hashtag/README.md index e7c511209..7031725cf 100644 --- a/packages/lexical-hashtag/README.md +++ b/packages/lexical-hashtag/README.md @@ -1,5 +1,7 @@ # `@lexical/hashtag` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_hashtag) + This package contains the functionality for Lexical hashtags. More documentation coming soon. diff --git a/packages/lexical-headless/README.md b/packages/lexical-headless/README.md index f99c04cdc..082351a51 100644 --- a/packages/lexical-headless/README.md +++ b/packages/lexical-headless/README.md @@ -1,5 +1,7 @@ # `@lexical/headless` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_headless) + This package allows you to interact with Lexical in a headless environment (one that does not rely on DOM, e.g. for Node.js environment), and use its main features like editor.update(), editor.registerNodeTransform(), editor.registerUpdateListener() to create, update or traverse state. @@ -40,7 +42,7 @@ app.get('article/:id/markdown', await (req, res) => { }); const articleEditorStateJSON = await loadArticleBody(req.query.id); - editor.setEditorState(editor.parseEditorState(articleEditorStateJSON)); + editor.setEditorState(editor.parseEditorState(articleEditorStateJSON)); editor.update(() => { const markdown = $convertToMarkdownString(TRANSFORMERS); diff --git a/packages/lexical-history/README.md b/packages/lexical-history/README.md index 14f7dd4c1..2397ea1ba 100644 --- a/packages/lexical-history/README.md +++ b/packages/lexical-history/README.md @@ -1,5 +1,7 @@ # `@lexical/history` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_history) + This package contains history helpers for Lexical. ### Methods diff --git a/packages/lexical-html/README.md b/packages/lexical-html/README.md index 298791ad4..c950b5cac 100644 --- a/packages/lexical-html/README.md +++ b/packages/lexical-html/README.md @@ -1,5 +1,7 @@ # `@lexical/html` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_html) + # HTML This package exports utility functions for converting `Lexical` -> `HTML` and `HTML` -> `Lexical`. These same functions are also used in the `lexical-clipboard` package for copy and paste. @@ -38,4 +40,4 @@ const editor = createEditor({ ...config, nodes }); // Or insert them at a selection. $insertNodes(nodes); -``` \ No newline at end of file +``` diff --git a/packages/lexical-link/README.md b/packages/lexical-link/README.md index d33283a88..131bfb73d 100644 --- a/packages/lexical-link/README.md +++ b/packages/lexical-link/README.md @@ -1,5 +1,7 @@ # `@lexical/link` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_link) + This package contains the functionality for Lexical links. More documentation coming soon. diff --git a/packages/lexical-list/README.md b/packages/lexical-list/README.md index e89168c66..2324c66de 100644 --- a/packages/lexical-list/README.md +++ b/packages/lexical-list/README.md @@ -1,5 +1,7 @@ `@lexical/list` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_list) + This package exposes the primitives for implementing lists in Lexical. If you're trying to implement conventional lists with React, take a look at the ListPlugin exposed by [@lexical/react](https://lexical.dev/docs/packages/lexical-react), which wraps these primitives into a neat component that you can drop into any LexicalComposer. diff --git a/packages/lexical-mark/README.md b/packages/lexical-mark/README.md index 1c781a7db..fa86efdd8 100644 --- a/packages/lexical-mark/README.md +++ b/packages/lexical-mark/README.md @@ -1,3 +1,5 @@ # `@lexical/mark` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_mark) + This package contains helpers and nodes for wrapping content in marks for Lexical. diff --git a/packages/lexical-markdown/README.md b/packages/lexical-markdown/README.md index 188215c1c..00f24ffd7 100644 --- a/packages/lexical-markdown/README.md +++ b/packages/lexical-markdown/README.md @@ -1,5 +1,7 @@ # `@lexical/markdown` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_markdown) + This package contains markdown helpers for Lexical: import, export and shortcuts. ## Import and export diff --git a/packages/lexical-offset/README.md b/packages/lexical-offset/README.md index c814bbc26..dc151f8a2 100644 --- a/packages/lexical-offset/README.md +++ b/packages/lexical-offset/README.md @@ -1,3 +1,5 @@ # `@lexical/offset` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_offset) + This package contains selection offset helpers for Lexical. diff --git a/packages/lexical-overflow/README.md b/packages/lexical-overflow/README.md index 29964af71..5a33c3dd6 100644 --- a/packages/lexical-overflow/README.md +++ b/packages/lexical-overflow/README.md @@ -1,3 +1,5 @@ # `@lexical/overflow` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_overflow) + This package contains selection overflow helpers and nodes for Lexical. diff --git a/packages/lexical-selection/README.md b/packages/lexical-selection/README.md index 224e7604f..9595fcbb7 100644 --- a/packages/lexical-selection/README.md +++ b/packages/lexical-selection/README.md @@ -1,112 +1,5 @@ # `@lexical/selection` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_selection) + This package contains selection helpers for Lexical. - -### Methods - -#### `getStyleObjectFromCSS` - -Given a CSS string, returns an object from the style cache. - -```ts -export function getStyleObjectFromCSS(css: string): { - [key: string]: string; -} | null; -``` - -#### `$patchStyleText` - -Applies the provided styles to the TextNodes in the provided Selection. Key names in the patch argument should be -the valid CSS properties (i.e., kebab-case). - -```ts -export function $patchStyleText( - selection: BaseSelection, - patch: { - [key: string]: string; - }, -): void; -``` - -#### `$getSelectionStyleValueForProperty` - -Given a selection and a valid CSS property name, returns the current value of that property for TextNodes in the Selection, if set. If not set, it returns the defaultValue. If all TextNodes do not have the same value, it returns an empty string. - -```ts -export function $getSelectionStyleValueForProperty( - selection: RangeSelection, - styleProperty: string, - defaultValue: string, -): string; -``` - -#### `$moveCaretSelection` - -Moves the selection according to the arguments. - -```ts -export function $moveCaretSelection( - selection: RangeSelection, - isHoldingShift: boolean, - isBackward: boolean, - granularity: 'character' | 'word' | 'lineboundary', -): void; -``` - -#### `$isParentElementRTL` - -Returns true if the parent of the Selection anchor node is in Right-To-Left mode, false if not. - -```ts -export function $isParentElementRTL(selection: RangeSelection): boolean; -``` - -#### `$moveCharacter` - -Wraps $moveCaretSelection, using character granularity and accounting for RTL mode. - -```ts -export function $moveCharacter( - selection: RangeSelection, - isHoldingShift: boolean, - isBackward: boolean, -): void; -``` - -#### `$selectAll` - -Expands the current Selection to cover all of the content in the editor. - -```ts -export function $selectAll(selection: RangeSelection): void; -``` - -#### `$setBlocksType` - -Converts all nodes in the selection that are of one block type to another specified by parameter - -```ts -export function $setBlocksType( - selection: RangeSelection, - createElement: () => ElementNode, -): void; -``` - -#### `$isAtNodeEnd` - -Returns true if the provided point offset is in the last possible position. - -```ts -export function $isAtNodeEnd(point: Point): boolean; -``` - -#### `$shouldOverrideDefaultCharacterSelection` - -Returns true if default character selection should be overridden, false if not. Used with DecoratorNodes - -```ts -export function $shouldOverrideDefaultCharacterSelection( - selection: RangeSelection, - isBackward: boolean, -): boolean; -``` diff --git a/packages/lexical-table/README.md b/packages/lexical-table/README.md index af6a29cd2..abefc449c 100644 --- a/packages/lexical-table/README.md +++ b/packages/lexical-table/README.md @@ -1,5 +1,7 @@ # `@lexical/table` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_table) + This package contains the functionality for the Tables feature of Lexical. More documentation coming soon. diff --git a/packages/lexical-text/README.md b/packages/lexical-text/README.md index 17d39a3da..50fbb7ae9 100644 --- a/packages/lexical-text/README.md +++ b/packages/lexical-text/README.md @@ -1,3 +1,5 @@ # `@lexical/text` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_text) + This package contains utilities and helpers for handling Lexical text. diff --git a/packages/lexical-utils/README.md b/packages/lexical-utils/README.md index f18be55a6..a2865ff5c 100644 --- a/packages/lexical-utils/README.md +++ b/packages/lexical-utils/README.md @@ -1,3 +1,5 @@ # `@lexical/utils` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_utils) + This package contains misc utilities for Lexical. diff --git a/packages/lexical-website/docs/packages/lexical-clipboard.md b/packages/lexical-website/docs/packages/lexical-clipboard.md index 3494b595e..21a38a6a4 100644 --- a/packages/lexical-website/docs/packages/lexical-clipboard.md +++ b/packages/lexical-website/docs/packages/lexical-clipboard.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 7 sidebar_label: '@lexical/clipboard' +cache_reset: 1 --- {@import ../../../lexical-clipboard/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-code.md b/packages/lexical-website/docs/packages/lexical-code.md index 46186d939..cb5b0e498 100644 --- a/packages/lexical-website/docs/packages/lexical-code.md +++ b/packages/lexical-website/docs/packages/lexical-code.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 13 sidebar_label: '@lexical/code' +cache_reset: 1 --- {@import ../../../lexical-code/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-dragon.md b/packages/lexical-website/docs/packages/lexical-dragon.md index c920f8f6a..d78fba021 100644 --- a/packages/lexical-website/docs/packages/lexical-dragon.md +++ b/packages/lexical-website/docs/packages/lexical-dragon.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 15 sidebar_label: '@lexical/dragon' +cache_reset: 1 --- {@import ../../../lexical-dragon/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-file.md b/packages/lexical-website/docs/packages/lexical-file.md index 687180e2d..b1e64f465 100644 --- a/packages/lexical-website/docs/packages/lexical-file.md +++ b/packages/lexical-website/docs/packages/lexical-file.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 15 sidebar_label: '@lexical/file' +cache_reset: 1 --- {@import ../../../lexical-file/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-hashtag.md b/packages/lexical-website/docs/packages/lexical-hashtag.md index 6766f1795..d54860358 100644 --- a/packages/lexical-website/docs/packages/lexical-hashtag.md +++ b/packages/lexical-website/docs/packages/lexical-hashtag.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 14 sidebar_label: '@lexical/hashtag' +cache_reset: 1 --- {@import ../../../lexical-hashtag/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-headless.md b/packages/lexical-website/docs/packages/lexical-headless.md index 177cb182d..460dafe21 100644 --- a/packages/lexical-website/docs/packages/lexical-headless.md +++ b/packages/lexical-website/docs/packages/lexical-headless.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 16 sidebar_label: '@lexical/headless' +cache_reset: 1 --- {@import ../../../lexical-headless/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-history.md b/packages/lexical-website/docs/packages/lexical-history.md index 3bc3924a0..e9d2b831c 100644 --- a/packages/lexical-website/docs/packages/lexical-history.md +++ b/packages/lexical-website/docs/packages/lexical-history.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 8 sidebar_label: '@lexical/history' +cache_reset: 1 --- {@import ../../../lexical-history/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-html.md b/packages/lexical-website/docs/packages/lexical-html.md index 937c62a2a..8741da457 100644 --- a/packages/lexical-website/docs/packages/lexical-html.md +++ b/packages/lexical-website/docs/packages/lexical-html.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 4 sidebar_label: '@lexical/html' +cache_reset: 1 --- {@import ../../../lexical-html/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-link.md b/packages/lexical-website/docs/packages/lexical-link.md index a27ed8b61..844f2ac20 100644 --- a/packages/lexical-website/docs/packages/lexical-link.md +++ b/packages/lexical-website/docs/packages/lexical-link.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 15 sidebar_label: '@lexical/link' +cache_reset: 1 --- {@import ../../../lexical-link/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-list.md b/packages/lexical-website/docs/packages/lexical-list.md index f8d86464b..eaa519e8a 100644 --- a/packages/lexical-website/docs/packages/lexical-list.md +++ b/packages/lexical-website/docs/packages/lexical-list.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 9 sidebar_label: '@lexical/list' +cache_reset: 1 --- {@import ../../../lexical-list/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-mark.md b/packages/lexical-website/docs/packages/lexical-mark.md index 931d09f30..ddc785b5c 100644 --- a/packages/lexical-website/docs/packages/lexical-mark.md +++ b/packages/lexical-website/docs/packages/lexical-mark.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 4 sidebar_label: '@lexical/mark' +cache_reset: 1 --- {@import ../../../lexical-mark/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-markdown.md b/packages/lexical-website/docs/packages/lexical-markdown.md index eea3fe2cc..1aedfb451 100644 --- a/packages/lexical-website/docs/packages/lexical-markdown.md +++ b/packages/lexical-website/docs/packages/lexical-markdown.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 11 sidebar_label: '@lexical/markdown' +cache_reset: 1 --- {@import ../../../lexical-markdown/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-offset.md b/packages/lexical-website/docs/packages/lexical-offset.md index 5f1be521c..65fc87477 100644 --- a/packages/lexical-website/docs/packages/lexical-offset.md +++ b/packages/lexical-website/docs/packages/lexical-offset.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 12 sidebar_label: '@lexical/offset' +cache_reset: 1 --- {@import ../../../lexical-offset/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-overflow.md b/packages/lexical-website/docs/packages/lexical-overflow.md index 368a966eb..95cb471d3 100644 --- a/packages/lexical-website/docs/packages/lexical-overflow.md +++ b/packages/lexical-website/docs/packages/lexical-overflow.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 4 sidebar_label: '@lexical/overflow' +cache_reset: 1 --- {@import ../../../lexical-overflow/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-selection.md b/packages/lexical-website/docs/packages/lexical-selection.md index 8d77e1560..ca2990878 100644 --- a/packages/lexical-website/docs/packages/lexical-selection.md +++ b/packages/lexical-website/docs/packages/lexical-selection.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 4 sidebar_label: '@lexical/selection' +cache_reset: 1 --- {@import ../../../lexical-selection/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-table.md b/packages/lexical-website/docs/packages/lexical-table.md index d4f352d4b..17d70f496 100644 --- a/packages/lexical-website/docs/packages/lexical-table.md +++ b/packages/lexical-website/docs/packages/lexical-table.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 10 sidebar_label: '@lexical/table' +cache_reset: 1 --- {@import ../../../lexical-table/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-text.md b/packages/lexical-website/docs/packages/lexical-text.md index 2ec1ff04a..5917c934b 100644 --- a/packages/lexical-website/docs/packages/lexical-text.md +++ b/packages/lexical-website/docs/packages/lexical-text.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 5 sidebar_label: '@lexical/text' +cache_reset: 1 --- {@import ../../../lexical-text/README.md} diff --git a/packages/lexical-website/docs/packages/lexical-utils.md b/packages/lexical-website/docs/packages/lexical-utils.md index a845f2f13..d62ba5467 100644 --- a/packages/lexical-website/docs/packages/lexical-utils.md +++ b/packages/lexical-website/docs/packages/lexical-utils.md @@ -2,6 +2,7 @@ title: '' sidebar_position: 6 sidebar_label: '@lexical/utils' +cache_reset: 1 --- {@import ../../../lexical-utils/README.md} diff --git a/packages/lexical-website/static/img/see-api-documentation.svg b/packages/lexical-website/static/img/see-api-documentation.svg new file mode 100644 index 000000000..beebc8949 --- /dev/null +++ b/packages/lexical-website/static/img/see-api-documentation.svg @@ -0,0 +1 @@ +SEE API DOCUMENTATIONSEE API DOCUMENTATION \ No newline at end of file diff --git a/packages/lexical-yjs/README.md b/packages/lexical-yjs/README.md index af7d907b6..7541d26a4 100644 --- a/packages/lexical-yjs/README.md +++ b/packages/lexical-yjs/README.md @@ -1,3 +1,5 @@ # `@lexical/yjs` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_yjs) + This package provides a set of bindings for Y.js that allow for collaborative editing with Lexical. diff --git a/packages/lexical/README.md b/packages/lexical/README.md index 711546dc4..57efd413f 100644 --- a/packages/lexical/README.md +++ b/packages/lexical/README.md @@ -1,5 +1,7 @@ # `lexical` +[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical) + Lexical is an extensible JavaScript web text-editor framework with an emphasis on reliability, accessibility, and performance. Lexical aims to provide a best-in-class developer experience, so you can easily prototype and build features with confidence. Combined with a highly extensible architecture, Lexical allows developers to create unique text editing experiences that scale in size and functionality. The core of Lexical is a dependency-free text editor engine that allows for powerful, simple and complex,