Skip to content

Commit a90a719

Browse files
committed
Squashed commit of the following:
commit a62a1a6 Author: James Fitzsimmons <[email protected]> Date: Thu Jan 30 19:13:35 2025 +1100 [lexical-mark] Feature: include inline decorator nodes in marks (facebook#7086) commit 881c7fe Author: Bob Ippolito <[email protected]> Date: Thu Jan 30 00:13:00 2025 -0800 [lexical-utils] Fix: Modify $reverseDfs to be a right-to-left variant of $dfs (facebook#7112) commit ce2bb45 Author: Nigel Gutzmann <[email protected]> Date: Wed Jan 29 14:41:12 2025 -0800 [lexical-utils] Feature: add reverse dfs iterator (facebook#7107) commit 3a140d2 Author: mohammed shaheer kp <[email protected]> Date: Tue Jan 28 06:19:45 2025 +0530 [lexical-playground] Bug Fix: Ensure Delete Node handles all node types (facebook#7096) Co-authored-by: shaheerkpzaigo <[email protected]> commit 8e2ede2 Author: Adam Pugh <[email protected]> Date: Mon Jan 27 18:49:38 2025 -0600 Listeners Lexical: 3 updates to spelling and grammar - Update listeners.md (facebook#7100) commit 9fcc494 Author: Adam Pugh <[email protected]> Date: Mon Jan 27 18:49:34 2025 -0600 Lexical Docs: 2 updates to spelling README.md (facebook#7102) commit 946a6df Author: Adam Pugh <[email protected]> Date: Mon Jan 27 18:49:29 2025 -0600 Selection | Lexical: 1 Spelling Update Update selection.md (facebook#7103) commit ce93ea6 Author: Adam Pugh <[email protected]> Date: Mon Jan 27 18:49:25 2025 -0600 Creating a React Plugin: 1 Grammar Update - Update create_plugin.md (facebook#7104) commit ed29d89 Author: Adam Pugh <[email protected]> Date: Mon Jan 27 18:49:21 2025 -0600 Working with DOM Events: 2 Spelling and Grammar Updates Update dom-ev… (facebook#7105) commit 212b70f Author: James Fitzsimmons <[email protected]> Date: Mon Jan 27 08:48:09 2025 +1100 [lexical-yjs] Bug Fix: handle text node being split by Yjs redo (facebook#7098) commit 6a98a47 Author: Torleif Berger <[email protected]> Date: Fri Jan 24 21:46:45 2025 +0100 [lexical-react] Bug Fix: Import `JSX` type from React to prevent "Cannot find namespace 'JSX'"-error when type-checking with React 19 (facebook#7080) commit f8e5968 Author: Tetsuya <[email protected]> Date: Sat Jan 25 04:06:57 2025 +0800 [lexical] Chore: Rename variable and add comments for Safari compositing workaround (facebook#7092) commit 81c9ab6 Author: Mateo Vuković <[email protected]> Date: Fri Jan 24 18:44:05 2025 +0100 Fix: Use already defined RegisteredNodes type (facebook#7085) commit 63958a2 Author: Sherry <[email protected]> Date: Tue Jan 21 18:15:21 2025 +0800 [playground] Bug fix: prevent growing whitespaces in markdown table toggle (facebook#7041) Co-authored-by: Bob Ippolito <[email protected]> commit d9f9924 Author: Sherry <[email protected]> Date: Tue Jan 21 14:58:08 2025 +0800 Unrevert [Breaking Change][lexical] Bug Fix: Commit updates on editor.setRootElement(null) facebook#7023 (facebook#7068) commit 92fa0a3 Author: mohammed shaheer kp <[email protected]> Date: Tue Jan 21 06:23:24 2025 +0530 [lexical-playground] plugins TableOfContent Scroll smooth behaviour A… (facebook#7069) commit 2e4a63e Author: Ivaylo Pavlov <[email protected]> Date: Mon Jan 20 02:37:34 2025 +0000 [lexical-playground] Fix Columns Layout Item Overflow (facebook#7066) commit d319b07 Author: Bob Ippolito <[email protected]> Date: Sun Jan 19 14:45:41 2025 -0800 Change fork modules to use production only when NODE_ENV explicitly set to production (facebook#7065) commit 46c9c2f Author: CityHunter <[email protected]> Date: Sat Jan 18 13:00:38 2025 +0800 [lexical] Bug Fix: In the Safari browser, during the compositing event process, the delete key exhibits unexpected behavior. (facebook#7061) Co-authored-by: 涂博闻 <[email protected]> commit 92a1cd7 Author: Violet Rosenzweig <[email protected]> Date: Thu Jan 16 18:44:11 2025 -0500 docs: Change "here" link to more descriptive text (facebook#7058) commit f6377a3 Author: Aman Harwara <[email protected]> Date: Fri Jan 17 02:08:17 2025 +0530 [lexical-table] Bug Fix: Prevent error if pasted table has empty row (facebook#7057) commit 0835029 Author: Aman Harwara <[email protected]> Date: Fri Jan 17 00:18:08 2025 +0530 [lexical-list] Bug Fix: Prevent error when calling formatList when selection is at root (facebook#6994) commit 940435d Author: Brayden <[email protected]> Date: Wed Jan 15 16:10:01 2025 -0800 fix: iOS Autocorrect strips formatting by reporting wrong dataType (facebook#5789) Co-authored-by: Bob Ippolito <[email protected]> commit 136a565 Author: Aman Harwara <[email protected]> Date: Thu Jan 16 04:48:32 2025 +0530 [lexical-yjs] Feature: Allow passing in custom `syncCursorPositions` function to collab hook (facebook#7053) commit 415c576 Author: Maksim Horbachevsky <[email protected]> Date: Wed Jan 15 18:18:03 2025 -0500 fix: triple click around inline elements (links) (facebook#7055) commit a3ef4f3 Author: Ivaylo Pavlov <[email protected]> Date: Wed Jan 15 23:15:39 2025 +0000 [lexical-table] Support table alignment (facebook#7044) commit 29d733c Author: Sherry <[email protected]> Date: Wed Jan 15 21:50:07 2025 +0800 Revert [Breaking Change][lexical] Bug Fix: Commit updates on editorSetRootElement(null) (facebook#7023) (facebook#7052) commit 65ce66a Author: Bob Ippolito <[email protected]> Date: Tue Jan 14 14:57:54 2025 -0800 [lexical] Bug Fix: Normalize selection after applyDOMRange to account for Firefox differences (facebook#7050) commit bbc07af Author: Bob Ippolito <[email protected]> Date: Tue Jan 14 08:55:46 2025 -0800 [*] Bug Fix: Use GITHUB_OUTPUT instead of GITHUB_ENV for size-limit action (facebook#7051) commit c8f27ed Author: Bob Ippolito <[email protected]> Date: Tue Jan 14 06:36:13 2025 -0800 [Breaking Change][*] Chore: Use terser for optimizing cjs prod build (facebook#7047) commit 8bd22d5 Author: Bob Ippolito <[email protected]> Date: Mon Jan 13 07:09:31 2025 -0800 [lexical] Bug Fix: Handle MutationObserver/input event re-ordering when using contentEditable inside of an iframe (facebook#7045) commit 930629c Author: Ivaylo Pavlov <[email protected]> Date: Sat Jan 11 06:03:30 2025 +0000 Clean up nested editor update (facebook#7039) commit bd874a3 Author: Bob Ippolito <[email protected]> Date: Fri Jan 10 15:23:54 2025 -0800 [Breaking Change][lexical][lexical-selection][lexical-list] Bug Fix: Fix infinite loop when splitting invalid ListItemNode (facebook#7037) commit 541fa43 Author: Bob Ippolito <[email protected]> Date: Thu Jan 9 12:42:23 2025 -0800 v0.23.1 (facebook#7035) Co-authored-by: Lexical GitHub Actions Bot <> commit d7abafd Author: Bob Ippolito <[email protected]> Date: Thu Jan 9 08:33:12 2025 -0800 [Breaking Change][lexical] Bug Fix: Commit updates on editor.setRootElement(null) (facebook#7023) commit 6add515 Author: Bob Ippolito <[email protected]> Date: Wed Jan 8 17:27:15 2025 -0800 [lexical] Fix TabNode deserialization regression (facebook#7031) commit 33e3677 Author: Maksim Horbachevsky <[email protected]> Date: Wed Jan 8 14:59:03 2025 -0500 [lexical-react] Feature: Merge TabIndentionPlugin and ListMaxIndentLevelPlugin plugins (facebook#7018) commit 7de86e4 Author: James Fitzsimmons <[email protected]> Date: Wed Jan 8 09:45:25 2025 +1100 [lexical-mark] Bug Fix: reverse ternary in MarkNode.addID (facebook#7020) commit 7961130 Author: Bob Ippolito <[email protected]> Date: Sun Jan 5 13:55:25 2025 -0800 v0.23.0 (facebook#7017) Co-authored-by: Lexical GitHub Actions Bot <> commit 2b4252d Author: Aman Harwara <[email protected]> Date: Sat Jan 4 11:31:19 2025 +0530 [lexical-yjs] Feature: Expose function to get anchor and focus nodes for given user awareness state (facebook#6942) commit 8100d6d Author: Ivaylo Pavlov <[email protected]> Date: Sat Jan 4 01:12:04 2025 +0000 [lexical-playground] Fix table hover actions button position (facebook#7011) commit bd1ef2a Author: Bob Ippolito <[email protected]> Date: Fri Jan 3 14:25:31 2025 -0800 [lexical] Bug Fix: Fix registerNodeTransform regression introduced in facebook#6894 (facebook#7016) commit 85c08b6 Author: Christian Grøngaard <[email protected]> Date: Thu Jan 2 00:20:20 2025 +0100 [lexical-playground] Refactor: switch headings test file names (facebook#7008) commit 7c21d4f Author: Bob Ippolito <[email protected]> Date: Wed Jan 1 12:48:12 2025 -0800 [Breaking Change][lexical] Feature: Add updateFromJSON and move more textFormat/textStyle to ElementNode (facebook#6970) commit aaa9009 Author: Bob Ippolito <[email protected]> Date: Wed Jan 1 07:50:39 2025 -0800 [lexical] Bug Fix: Fix getNodes over-selection (facebook#7006) commit 803391d Author: Sherry <[email protected]> Date: Tue Dec 31 11:26:17 2024 +0800 [__test__] npm upgrade astro (facebook#7001) commit 684352b Author: Christian Grøngaard <[email protected]> Date: Mon Dec 30 05:12:45 2024 +0100 Documentation: Fix typo "nest nest"->"nest" in README.md (facebook#7000) Co-authored-by: Bob Ippolito <[email protected]> commit 27b75cc Author: Sherry <[email protected]> Date: Fri Dec 27 11:06:29 2024 +0800 [__tests__] npm upgrade next (facebook#6996) commit 05ddbcc Author: Simon <[email protected]> Date: Thu Dec 26 03:37:50 2024 +0100 [lexical] Bug Fix: Flow is missing some variables and functions (facebook#6977) commit e79c946 Author: Sherry <[email protected]> Date: Tue Dec 24 09:54:46 2024 +0800 v0.22.0 (facebook#6993) Co-authored-by: Lexical GitHub Actions Bot <> commit c415f7a Author: Sam Zhou <[email protected]> Date: Mon Dec 23 10:31:36 2024 -0800 [lexical-react] Refactor: Replace `React$MixedElement` and `React$Node` with `React.MixedElement` and `React.Node` (facebook#6984) commit c844a4d Author: Sherry <[email protected]> Date: Tue Dec 24 02:30:52 2024 +0800 [lexical] Fix flow error: change this to any (facebook#6992) commit 6190033 Author: Germán Jabloñski <[email protected]> Date: Mon Dec 23 05:19:27 2024 -0300 Refactor: exportJSON (facebook#6983) commit e0dafb8 Author: Germán Jabloñski <[email protected]> Date: Sat Dec 21 13:59:01 2024 -0300 feature: expose forEachSelectedTextNode (facebook#6981) Co-authored-by: Bob Ippolito <[email protected]> commit 23715f5 Author: Alex <[email protected]> Date: Fri Dec 20 18:23:27 2024 +0300 [lexical][lexical-table] Bug fix: TablePlugin: - check is current selection in target table node (facebook#6979) Co-authored-by: alazarev <[email protected]>
1 parent a6288f9 commit a90a719

File tree

294 files changed

+7683
-5822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+7683
-5822
lines changed

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module.exports = {
8282
// @lexical/yjs
8383
'createBinding',
8484
],
85-
isLexicalProvider: ['updateEditor'],
85+
isLexicalProvider: ['updateEditor', 'updateEditorSync'],
8686
isSafeDollarFunction: '$createRootNode',
8787
}),
8888
],

.github/workflows/size-limit.yml

+68
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,75 @@ jobs:
99
env:
1010
CI_JOB_NUMBER: 1
1111
steps:
12+
# See also:
13+
# https://github.com/facebook/lexical/issues/6852
14+
# https://github.com/NixOS/nixpkgs/blob/c8db8bd9656ee3d373ce9445063c25c47f442118/.github/workflows/check-by-name.yml#L31-L92
15+
# https://github.com/getsentry/sentry/issues/22432
16+
# https://github.com/getsentry/sentry/pull/22344
17+
# This step has to be in this file,
18+
# because it's needed to determine which revision of the repository to fetch,
19+
# and we can only use other files from the repository once it's fetched.
20+
- id: merge-commit
21+
name: Resolving the merge commit
22+
env:
23+
GH_TOKEN: ${{ github.token }}
24+
run: |
25+
# This checks for mergeability of a pull request as recommended in
26+
# https://docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests
27+
28+
# Retry the API query this many times
29+
retryCount=3
30+
# Start with 5 seconds, but double every retry
31+
retryInterval=5
32+
while true; do
33+
echo "Checking whether the pull request can be merged"
34+
prInfo=$(gh api \
35+
-H "Accept: application/vnd.github+json" \
36+
-H "X-GitHub-Api-Version: 2022-11-28" \
37+
/repos/"$GITHUB_REPOSITORY"/pulls/${{ github.event.pull_request.number }})
38+
mergeable=$(jq -r .mergeable <<< "$prInfo")
39+
mergedSha=$(jq -r .merge_commit_sha <<< "$prInfo")
40+
41+
if [[ "$mergeable" == "null" ]]; then
42+
if (( retryCount == 0 )); then
43+
echo "Not retrying anymore, probably GitHub is having internal issues"
44+
exit 1
45+
else
46+
(( retryCount -= 1 )) || true
47+
48+
# null indicates that GitHub is still computing whether it's mergeable
49+
# Wait a couple seconds before trying again
50+
echo "GitHub is still computing whether this PR can be merged, waiting $retryInterval seconds before trying again ($retryCount retries left)"
51+
sleep "$retryInterval"
52+
53+
(( retryInterval *= 2 )) || true
54+
fi
55+
else
56+
break
57+
fi
58+
done
59+
60+
if [[ "$mergeable" == "true" ]]; then
61+
echo "The PR can be merged, checking the merge commit $mergedSha"
62+
else
63+
echo "The PR cannot be merged, it has a merge conflict, cancelling the workflow.."
64+
gh api \
65+
--method POST \
66+
-H "Accept: application/vnd.github+json" \
67+
-H "X-GitHub-Api-Version: 2022-11-28" \
68+
/repos/"$GITHUB_REPOSITORY"/actions/runs/"$GITHUB_RUN_ID"/cancel
69+
sleep 60
70+
# If it's still not canceled after a minute, something probably went wrong, just exit
71+
exit 1
72+
fi
73+
echo "mergedSha=$mergedSha" >> "$GITHUB_OUTPUT"
1274
- uses: actions/checkout@v4
75+
with:
76+
# pull_request_target checks out the base branch by default
77+
ref: ${{ steps.merge-commit.outputs.mergedSha }}
78+
# Fetches the merge commit and its parents
79+
fetch-depth: 2
1380
- uses: andresz1/size-limit-action@v1
1481
with:
1582
github_token: ${{ secrets.GITHUB_TOKEN }}
83+
build_script: build-prod

.size-limit.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,9 @@ const path = require('node:path');
2424
* Looks like:
2525
*
2626
* {
27-
* lexical: 'packages/lexical/dist/index.js',
28-
* '@lexical/rich-text': 'packages/lexical-rich-text/dist/index.js',
27+
* lexical: 'packages/lexical/dist/Lexical.js',
28+
* '@lexical/rich-text': 'packages/lexical-rich-text/dist/LexicalRichText.js',
2929
* }
30-
*
31-
* Currently this alias map points at the cjs version of the build product,
32-
* as that is what was measured previously in #3600.
3330
*/
3431
const {packagesManager} = require('./scripts/shared/packagesManager');
3532
const getAliasType = (type) =>

CHANGELOG.md

+67
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
## v0.23.1 (2025-01-09)
2+
3+
- lexical Fix TabNode deserialization regression (#7031) Bob Ippolito
4+
- lexical-react Feature Merge TabIndentionPlugin and ListMaxIndentLevelPlugin plugins (#7018) Maksim Horbachevsky
5+
- lexical-mark Bug Fix reverse ternary in MarkNode.addID (#7020) James Fitzsimmons
6+
- v0.23.0 (#7017) Bob Ippolito
7+
- v0.23.0 Lexical GitHub Actions Bot
8+
9+
## v0.23.0 (2025-01-04)
10+
11+
- lexical-playground Fix table hover actions button position (#7011) Ivaylo Pavlov
12+
- lexical Bug Fix Fix registerNodeTransform regression introduced in #6894 (#7016) Bob Ippolito
13+
- lexical-playground Refactor switch headings test file names (#7008) Christian Grngaard
14+
- Breaking Changelexical Feature Add updateFromJSON and move more textFormattextStyle to ElementNode (#6970) Bob Ippolito
15+
- lexical Bug Fix Fix getNodes over-selection (#7006) Bob Ippolito
16+
- test npm upgrade astro (#7001) Sherry
17+
- Documentation Fix typo nest nest-nest in README.md (#7000) Christian Grngaard
18+
- tests npm upgrade next (#6996) Sherry
19+
- lexical Bug Fix Flow is missing some variables and functions (#6977) Simon
20+
- v0.22.0 (#6993) Sherry
21+
- v0.22.0 Lexical GitHub Actions Bot
22+
23+
## v0.22.0 (2024-12-23)
24+
25+
- lexical Fix flow error change this to any (#6992) Sherry
26+
- Refactor exportJSON (#6983) Germn Jabloski
27+
- feature expose forEachSelectedTextNode (#6981) Germn Jabloski
28+
- lexicallexical-table Bug fix TablePlugin - check is current selection in target table node (#6979) Alex
29+
- Documentationlexical-website Documentation for useLexical node selection hook (#6976) Ajaezo Kingsley
30+
- lexical-table Feature Support google docs colgroup import (via deprecated col width attribute) (#6971) Bob Ippolito
31+
- lexical-markdown Bug Fix preserve the order of markdown tags for markdown combinations, and close the tags when the outmost tag is closed (#5758) yhw5
32+
- lexical-utils Bug Fix Refactor markSelection for getDOMSlot and not using updateDOM (#6961) Bob Ippolito
33+
- lexicallexical-table Bug Fix Allow TableSelection to be preserved during contextmenu events (#6964) Bob Ippolito
34+
- lexical-website Add Discord to the community section of the footer (#6967) Bob Ippolito
35+
- lexicallexical-rich-textlexical-playground Feature Support capitalization format (#6897) Bedru Umer
36+
- lexical-playground Bug Fix Allow scrolling if the table cell content overflows (#6966) Parasaran
37+
- lexical-tablelexical-playground Fix Insertion of multiple rows (#6963) Vinay Kushwaha
38+
- Breaking Changelexical Feature New update tag skip-dom-selection, onUpdate now always called (#6894) Bob Ippolito
39+
- Test234 (#6958) Tranquiliz00
40+
- Revert Test comment for pr testing (#6953) (#6957) bailey-meta
41+
- Revert lexical-onboarding testing sev mitigation (#6952) (#6956) Niels Y.
42+
- Create a test PR (#6955) Tranquiliz00
43+
- Test comment for pr testing (#6953) bailey-meta
44+
- lexical-onboarding testing sev mitigation (#6952) Niels Y.
45+
- lexical-list Revert PR 6912 (#6944) Sherry
46+
- scripts-integration-fixtures Address GitHub detected a vulnerability in the sveltejskit dependency (#6943) Luis Silva
47+
- lexical-table Fix Delete table row in merge cells (#6922) Vinay Kushwaha
48+
- lexical-list Bug Fix Ensure new paragraph node retains selection styling when exiting list (#6917) Aleksandr Lapukin
49+
- lexical-reactBug Fix the location of draggable-block-menu cannot be calculated #6818 (#6915) lin-mt
50+
- lexical-playground Refactor editor styles should in PlaygroundEditorTheme.css (#6934) Syed Umar Anis
51+
- lexical-playground Fix tabs do not show strikethroughunderline (#6811) Oluwasanya Olaoluwa
52+
- Breaking Changelexical-list Fix Preserve original format after indenting list item (#6912) C.
53+
- Bug Fix add mergegroup to the tests workflow (#6932) Bob Ippolito
54+
- Update core-tests workflow triggers (#6928) Gerard Rovira
55+
- Doc nits (#6927) Gerard Rovira
56+
- lexical-playground Chore Update Prettier to v3 (#6920) daichan132
57+
- lexical-playground Fix empty layout item causes 100 CPU usage (#6906) Basile Savouret
58+
- lexicallexicalselection Feature Unify selectAll Implementations (#6902) Hadi Elghoul
59+
- lexical-tablelexical-utilslexical-react Bug Fix Enforce table integrity with transforms and move non-React plugin code to lexicaltable (#6914) Bob Ippolito
60+
- lexical-website Fix docsreact next button links to itself (#6911) Oluwasanya Olaoluwa
61+
- Warn about display flex container for the editor (#6901) Maksim Horbachevsky
62+
- lexical-websitelexical-react Documentation Update documentation for LexicalTreeView plugin (#6898) Ajaezo Kingsley
63+
- lexical-link Bug Fix Preserve the startend of the selection for non-text points when creating a LinkNode (#6883) Bob Ippolito
64+
- v0.21.0 (#6896) Sherry
65+
- Documentation Update Add release protocol to maintainers-guide.md (#6895) Sherry
66+
- v0.21.0 Lexical GitHub Actions Bot
67+
168
## v0.21.0 (2024-12-01)
269

370
- Fix selected table colors (#6892) Gerard Rovira

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Node Transforms and Command Listeners are called with an implicit `editor.update
172172

173173
It is permitted to do nested updates, or nested reads, but an update should not be nested in a read
174174
or vice versa. For example, `editor.update(() => editor.update(() => {...}))` is allowed. It is permitted
175-
to nest nest an `editor.read` at the end of an `editor.update`, but this will immediately flush the update
175+
to nest an `editor.read` at the end of an `editor.update`, but this will immediately flush the update
176176
and any additional update in that callback will throw an error.
177177

178178
All Lexical Nodes are dependent on the associated Editor State. With few exceptions, you should only call methods

examples/react-plain-text/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@lexical/react-plain-text-example",
33
"private": true,
4-
"version": "0.21.0",
4+
"version": "0.23.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc && vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@lexical/react": "0.21.0",
13-
"lexical": "0.21.0",
12+
"@lexical/react": "0.23.1",
13+
"lexical": "0.23.1",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"
1616
},

examples/react-plain-text/src/plugins/TreeViewPlugin.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*
77
*/
88

9+
import type {JSX} from 'react';
10+
911
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
1012
import {TreeView} from '@lexical/react/LexicalTreeView';
1113

examples/react-rich-collab/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@lexical/react-rich-collab-example",
33
"private": true,
4-
"version": "0.21.0",
4+
"version": "0.23.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -12,9 +12,9 @@
1212
"server:webrtc": "cross-env HOST=localhost PORT=1235 npx y-webrtc"
1313
},
1414
"dependencies": {
15-
"@lexical/react": "0.21.0",
16-
"@lexical/yjs": "0.21.0",
17-
"lexical": "0.21.0",
15+
"@lexical/react": "0.23.1",
16+
"@lexical/yjs": "0.23.1",
17+
"lexical": "0.23.1",
1818
"react": "^18.2.0",
1919
"react-dom": "^18.2.0",
2020
"y-webrtc": "^10.3.0",

examples/react-rich-collab/src/plugins/TreeViewPlugin.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*
77
*/
88

9+
import type {JSX} from 'react';
10+
911
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
1012
import {TreeView} from '@lexical/react/LexicalTreeView';
1113

examples/react-rich/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@lexical/react-rich-example",
33
"private": true,
4-
"version": "0.21.0",
4+
"version": "0.23.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc && vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@lexical/react": "0.21.0",
13-
"lexical": "0.21.0",
12+
"@lexical/react": "0.23.1",
13+
"lexical": "0.23.1",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"
1616
},

examples/react-rich/src/plugins/TreeViewPlugin.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*
77
*/
88

9+
import type {JSX} from 'react';
10+
911
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
1012
import {TreeView} from '@lexical/react/LexicalTreeView';
1113

examples/react-table/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@lexical/react-table-example",
33
"private": true,
4-
"version": "0.21.0",
4+
"version": "0.23.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc && vite build",
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"@lexical/react": "0.21.0",
13-
"lexical": "0.21.0",
12+
"@lexical/react": "0.23.1",
13+
"lexical": "0.23.1",
1414
"react": "^18.2.0",
1515
"react-dom": "^18.2.0"
1616
},

examples/react-table/src/plugins/TreeViewPlugin.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*
77
*/
88

9+
import type {JSX} from 'react';
10+
911
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
1012
import {TreeView} from '@lexical/react/LexicalTreeView';
1113

examples/vanilla-js-iframe/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Vanilla JS example in an iframe
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 using an iframe
4+
for the contentEditable surface.
5+
6+
**Run it locally:** `npm i && npm run dev`
7+
8+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/facebook/lexical/tree/main/examples/vanilla-js-iframe?file=src/main.ts)

examples/vanilla-js-iframe/index.html

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Lexical Basic - Vanilla JS iframe</title>
7+
</head>
8+
<body>
9+
<template id="app-template">
10+
<div>
11+
<h1>Lexical Basic - Vanilla JS iframe</h1>
12+
<div class="editor-wrapper">
13+
<div id="lexical-editor" contenteditable></div>
14+
</div>
15+
<h4>Editor state:</h4>
16+
<textarea id="lexical-state"></textarea>
17+
</div>
18+
</template>
19+
<iframe
20+
id="app-iframe"
21+
height="100%"
22+
style="
23+
border: none;
24+
position: absolute;
25+
left: 0;
26+
top: 0;
27+
right: 0;
28+
bottom: 0;
29+
"
30+
width="100%"></iframe>
31+
<script src="/src/main.ts" type="module"></script>
32+
</body>
33+
</html>

0 commit comments

Comments
 (0)