Releases: facebook/lexical
v0.27.0
v0.27.0 ad-hoc release to address v0.26.0 regressions.
Breaking Changes
Core:
- #7270 - To handle platform differences and avoid piercing shadow roots, arrow key navigation for RangeSelection is now handled by lexical in more scenarios when crossing the boundaries of elements. This should only affect "exotic" custom element nodes such as TableNode. All code in @lexical/table has been updated accordingly, but if you have something like a custom table implementation then it may require additional updates (probably in the direction of removing workarounds rather than adding them).
Highlights
Core:
Playground:
- ✅ #7273 Apply correct column headers when column contains vertically merged cells
- 🆕 #7279 Add HR theme config for selected state
Utils:
- ✅ #7275 Don't include parent's siblings when starting $dfs at last child
Collab/Table:
- ✅ #7277 TableCellNode vertical align not syncing
What's Changed
- v0.26.0 by @etrepum in #7265
- [lexical] Bug Fix: invalid import from self by @AlessioGr in #7271
- [Breaking Changes][lexical] Bug Fix: Address deleteLine regression in #7248 by @etrepum in #7270
- [*] Chore: Refactor shared/invariant for easier dev debugging by @etrepum in #7269
- [lexical-playground] Bug Fix: apply correct column headers when column contains vertically merged cells by @rilrom in #7273
- [ci] Chore: Remove unused GITHUB_TOKEN secrets from workflows by @etrepum in #7209
- chore: add no-imports-from-self eslint rule to monorepo by @AlessioGr in #7272
- [lexical-utils] Bug Fix: don't include parent's siblings when starting $dfs at last child by @james-atticus in #7275
- [lexical-table] Bug Fix: TableCellNode vertical align not syncing by @anhle1476 in #7277
- [lexical-playground][lexical-react] Feature: add HR theme config for selected state by @RobHannay in #7279
New Contributors
- @anhle1476 made their first contribution in #7277
Full Changelog: v0.26.0...v0.27.0
v0.26.0
v0.26.0 is a monthly release packed with bug fixes and a major new experimental feature, the NodeState API (#7117).
Breaking Changes
Core:
-
#7248 As a follow-up to #7180 the collapseAtStart logic now continues through both inline and non-inline nodes so long as there are no previous siblings, roots, or shadow roots encountered. This is because nodes such as CollapsibleTitleNode had a collapseAtStart that returns true but contain nodes that are not inline and have a collapseAtStart that returns false (e.g. ParagraphNode).
In order to fix an inconsistency for how nested !isInline elements behave, CollapsibleContainerNode is now a shadowRoot. The CollapsibleContentNode was already a shadowRoot. This is now similar to the situation for tables where both TableNode and TableCellNode are both shadowRoot. The fix here also moved collapseAtStart from CollapsibleTitleNode to CollapsibleContainerNode which makes a bit more sense since the whole container gets collapsed, not just the title. The title is still the only location that you can initiate this collapse from, since it is always the first child.
React:
- #7219 Exports from
@lexical/react
that had been deprecated since v0.16.0 (June 2024) have been removed:- All default exports were removed, each module has a named export
- The inconsistently named
@lexical/react/LexicalTableOfContents
was moved to@lexical/react/LexicalTableOfContentsPlugin
Highlights
Core:
- 🆕 #7117 Experimental Node State: Add a generic state property to all nodes. More documentation and examples to come in the next few weeks. New APIs:
- 🆕 #7135 Refactor RangeSelection.getNodes() to use NodeCaret APIs. Introduces new APIs with a total ordering for PointCaret and getting common ancestors.
- ✅ #7225 deleteCharacter through ListNode->ListItemNode (applies to nested !isInline elements in general)
- ✅ #7256 Point.isBefore could return incorrect result due to normalization
- ✅ #7239 Fix selection shifting when deleting paragraphs on Android Chrome
- ✅ #7226 Added isInline implementations to TextNode and LineBreakNode
Collab:
- ✅ #7217 Normalize multiple adjacent merge conflicts in one block
List:
- ✅ #7225 Retain selection styling when exiting nested list
- 🆕 #7024 Bullet item style matches text style
Mark:
- ✅ #7255 Identify
<mark>
as an inline element
Playground:
- ✅ #7233 Image component rerenders on every editor update
- ✅ #7229 Table action menu dropdown positioning
- 🆕 #7208 Playground dev/prod vite configs have been unified and example vite configurations have been refactored to allow for
npm run monorepo:dev
command which runs the examples with the version of lexical in the repository (useful for developing examples based on unreleased features, or debugging situations that are difficult to create in the playground)
Table:
- ✅ #7213 Prevent adjacent cell selection on triple-click
React:
- ✅ #7237 Ensure attributes are set immediately on menu
- ✅ #7264 Menu element not cleaned up on unmount
- ✂️ #7219 Remove deprecated default exports
What's Changed
- 2024 recap shortcut by @zurfyx in #7223
- v0.25.0 by @etrepum in #7221
- [Breaking Change][lexical/react] Chore: Remove deprecated default exports by @kirandash in #7219
- [lexical-yjs] Bug Fix: Normalize multiple adjacent merge conflicts in one block by @james-atticus in #7217
- [lexical-table] Docs: Fix @lexical/table README.md by @etrepum in #7224
- [@lexical/list] Feature: export
ListNodeTagType
by @DaniGuardiola in #7228 - [lexical-list] Bug Fix: retain selection styling when exiting nested list by @mrdivyansh in #7225
- [lexical-playground] fix: hard coded theme classes for table hover actions by @umaranis in #7182
- [*] Feature: Add linter to check that flow types are consistent with typescript types by @etrepum in #7230
- [lexical-playground] Refactor: Image component rerenders on every editor update by @jvithlani in #7233
- [lexical][lexical-code] Refactor: Use NodeCaret to implement RangeSelection.getNodes() by @etrepum in #7135
- [lexical-list] Bullet item color matches text color by @ivailop7 in #7024
- [lexical-table] Bug Fix: Prevent adjacent cell selection on triple-click by @kirandash in #7213
- [lexical-react] fix: ensure attributes are set immediately on menu by @sodenn in #7237
- [Update] Upgrade docusaurus version by @lilshady in #7244
- [Breaking Changes][lexical][lexical-list][lexical-playground] Bug Fix: deleteCharacter through ListNode->ListItemNode by @etrepum in #7248
- [lexical] fix typo in Caret error msg by @potatowagon in #7249
- [fix] Add missing flow types for node event plugin by @fantactuka in #7252
- [lexical-playground] Bug Fix Table Action Menu dropdown positioning by @umaranis in #7229
- [lexical][lexical-utils] Chore: Add some missing flow types for NodeCaret and table related functionality by @etrepum in #7253
- [lexical-playground][examples/*] Refactor: Unify vite dev/prod/example configurations by @etrepum in #7208
- [lexical][lexical-mark] Bug Fix: Identify as inline element by @PeterDekkers in #7255
- [lexical] Feature: add a generic state property to all nodes by @GermanJablo in #7117
- [lexical] Bug Fix: Point.isBefore could return incorrect result due to normalization by @etrepum in #7256
- [@lexical/react] Bug Fix: anchor element not cleanup when component unmount by @yuanyan in #7264
- Fix selection shifting when deleting paragraphs on android by @waynetee in #7239
- [lexical] Chore: Added missing
isInline
function to TextNode by @mrdivyansh in #7226
New Contributors
- @DaniGuardiola made their first contribution in #7228
- @jvithlani made their first contribution in #7233
- @sodenn made their first contribution in #7237
- @lilshady made their first contribution in #7244
- @PeterDekkers made their first contribution in #7255
- @yuanyan made their first contribution in #7264
Full Changelog: v0.25.0...v0.26.0
v0.25.0
v0.25.0 is an ad-hoc release targeted at addressing an input regression with Android Chrome (#7218) , but includes many other fixes (particularly around deleteCharacter) and several new features (such as the NodeCaret API).
Breaking Changes
Core:
-
#7180
ElementNode.collapseAtStart(range)
would previously only be called on the direct parent of the anchor's node, so the presence of anything like aLinkNode
would prevent aListItemNode
from collapsing. Now it will also be called on parents under certain conditions. -
#7155 #7204 The heuristic used in RangeSelection.deleteCharacter to handle merging blocks and deleting decorators from a collapsed selection has been refactored for consistency. It now traverses the node tree directly instead of attempting to use browser selection APIs.
Tables:
- #7192 It's no longer possible to create nested tables with normal UI actions. It's likely that this will change in the future when nested tables work correctly with the rest of the table infrastructure.
Highlights
Core:
- 🆕 #7046 New NodeCaret API for traversal of the document tree
- ✅ #7180 Collapse through inline elements in deleteCharacter
- ✅ #7186 Highlight formatting now supported by TextNode importDOM (plus toolbar support in the playground)
- ✅ #7175 Workaround for delete character with emoji grapheme customers that do not include non-BMP code points
- ✅ #7155 Improve character deletion around shadow roots and decorators
- ✅ #7218 Remove Android Chrome workaround
Tables:
- 🆕 #7077 TableCell support for verticalAlign
- 🆕 #7134 #7190 TableNode support for freezing the first column and row
- ✅ #7161 Ensure rectangular table cell merge behavior
- ✅ #7192 Nested tables are disabled
- 🆕 #7205 TableNode support for style attribute
Code:
- ✅ #7187 Fix selection boundaries in code block
React:
- ✅ #7185 Typeahead menu now respects read-only mode
Playground:
- ✅ #7194 Optimize table cell resizer event listeners
- ✅ #7215 Remove redundant Suspense from node decorators
What's Changed
- v0.24.0 by @etrepum in #7147
- [lexical][lexical-utils][lexical-selection][lexical-table] Feature: NodeCaret abstraction for traversals and ranges by @etrepum in #7046
- [lexical-table] Feature: TableCellNode add verticalAlign attribute by @liuweiGL in #7077
- [lexical] Bug fix: Fixes infinite loop in sibling traversal by @iSuslov in #7157
- [lexical-website] Documentation Update: CaretType has sibling and child. by @hastebrot in #7159
- fix: Replace Twitter with X by @AaronDewes in #7118
- [lexical] Chore: Add more tests for RangeSelection.getNodes() by @etrepum in #7152
- [scripts] add @noEnforceES3 to build script by @potatowagon in #7162
- Update WWW build flag by @zurfyx in #7169
- [lexical-table] Support first column freeze by @ivailop7 in #7134
- [fix] $dfs traversal from the middle of the tree leaves by @fantactuka in #7174
- [lexical-table] Bug Fix: Ensure rectangular table cell merge behavior (#7161) by @kirandash in #7170
- [lexical-react] positionMenu on rendering typeahead mentions menu by @potatowagon in #7164
- No forward slash in template by @zurfyx in #7178
- [fix] DFS depths when starting from inline node by @fantactuka in #7179
- [Breaking Change][lexical][lexical-link] Bug Fix: Collapse through inline elements in deleteCharacter by @etrepum in #7180
- [lexical] Bug Fix: add missing flow type for getNearestEditorFromDOMNode by @kirandash in #7183
- [lexical][lexical-devtools-core][lexical-playground] Bug Fix: fix TextNode importDom highlight formatting by @kirandash in #7186
- [lexical-react] Bug Fix: Make typeahead menu respect read-only mode by @kirandash in #7185
- [lexical-code][lexical-playground] Bug Fix: Fix selection boundaries in code block by @kirandash in #7187
- Position menu immediately by @zurfyx in #7181
- Documentation Update: move
placeholder
examples toContentEditable
by @RobHannay in #7193 - [lexical-table] Freeze top row using pure CSS by @ivailop7 in #7190
- [Breaking Change][lexical-table] Bug Fix: Prevent nested tables by @kirandash in #7192
- Replace substr with substring by @ivailop7 in #7188
- [lexical] Bug Fix: catch setTimeout wrapped setBaseAndExtent call by @StormVanDerPol in #7202
- [lexical] Bug Fix: Workaround for delete character with emoji grapheme customers that do not include non-BMP code points by @etrepum in #7175
- [Breaking Change][lexical][lexical-playground] Bug Fix: Improve character deletion around shadow roots and decorators by @etrepum in #7155
- [ci] Chore: Upgrade astro to fix mysterious integration test failure by @etrepum in #7196
- [lexical-table] Feature: Support TableNode.__style in createDOM and updateDOM by @etrepum in #7205
- [Breaking Change][lexical-playground]: Refactor: Remove special case for collapsible forward deletion by @etrepum in #7204
- [lexical-playground] Chore: Remove insertNodes workaround in ToolbarPlugin by @etrepum in #7206
- [lexical-playground] Bug Fix: Optimize table cell resizer event listeners by @kirandash in #7194
- [lexical-playground] Refactor: Remove redundant Suspense from node decorators by @kirandash in #7215
- Remove Android Chrome workaround from #7122 by @etrepum in #7218
New Contributors
- @iSuslov made their first contribution in #7157
- @hastebrot made their first contribution in #7159
- @AaronDewes made their first contribution in #7118
- @RobHannay made their first contribution in #7193
- @StormVanDerPol made their first contribution in #7202
Full Changelog: v0.24.0...v0.25.0
v0.24.0
Breaking Changes
Build:
- 🆕 #7047 All commonjs prod builds are now optimized with terser instead of the unmaintained closure compiler
Core editor:
- ✅ #7037
editor.focus()
now happens synchronously when called from inside of an update, as if it was implemented with a command dispatch. Previously it would defer which is confusing behavior because the expected side-effect is to change the selection which you really do want to happen synchronously.
Lexical List:
- 🆕 #7037
insertList
andremoveList
are now deprecated, use$insertList
and$removeList
instead - ✅ #7037
INSERT_CHECK_LIST_COMMAND
,INSERT_ORDERED_LIST_COMMAND
,INSERT_UNORDERED_LIST_COMMAND
andREMOVE_LIST_COMMAND
now update synchronously when dispatched from inside an update, rather than deferring a nested update (this is the expected behavior for commands)
Highlights
Core editor:
- ✅ Fix: Infinite loop when splitting invalid ListItemNode #7037
- ✅ Fix: Handle MutationObserver/input event re-ordering when using contentEditable inside of an iframe #7045
- ✅ Fix: Normalize selection after applyDOMRange to account for Firefox differences #7050
- ✅ Fix: triple click around inline elements (links) #7055
- ✅ Fix: iOS Autocorrect strips formatting by reporting wrong dataType #5789
- ✅ Fix: In the Safari browser, during the compositing event process, the delete key exhibits unexpected behavior #7061
- ✅ Fix: Chrome on android deletion bugs #7122
Collab:
- 🆕 Feature: Allow passing in custom
syncCursorPositions
function to collab hook #7053 - ✅ Fix: handle text node being split by Yjs redo #7098
List:
- ✅ Fix: Prevent error when calling formatList when selection is at root by #6994
- ✅ Fix: ListItemNode serialization throws #7116
Mark:
- 🆕 Feature: include inline decorator nodes in marks #7086
- ✅ Fix: $wrapSelectionInMarkNode with element points #7132
Markdown:
- ✅ Fix: support link and inline code text formats #7004
Playground:
- ✅ Fix: Columns Layout Item Overflow #7066
- 🆕 Feature: TableOfContents Scroll smooth behaviour #7069
- ✅ Fix: prevent growing whitespaces in markdown table toggle #7041
- ✅ Fix: Ensure Delete Node handles all node types #7096
React:
- ✅ Fix: Import
JSX
type from React to prevent "Cannot find namespace 'JSX'"-error when type-checking with React 19 #7080
Table:
Utils:
Build:
- 🆕 All commonjs prod builds are now optimized with terser instead of the unmaintained closure compiler #7047
- ✅ Change fork modules to use production only when NODE_ENV explicitly set to production #7065
What's Changed
- v0.23.1 by @etrepum in #7035
- [Breaking Change][lexical][lexical-selection][lexical-list] Bug Fix: Fix infinite loop when splitting invalid ListItemNode by @etrepum in #7037
- Clean up nested editor update by @ivailop7 in #7039
- [lexical] Bug Fix: Handle MutationObserver/input event re-ordering when using contentEditable inside of an iframe by @etrepum in #7045
- [Breaking Change][*] Chore: Use terser for optimizing cjs prod build by @etrepum in #7047
- [*] Bug Fix: Use GITHUB_OUTPUT instead of GITHUB_ENV for size-limit action by @etrepum in #7051
- [lexical] Bug Fix: Normalize selection after applyDOMRange to account for Firefox differences by @etrepum in #7050
- Revert [Breaking Change][lexical] Bug Fix: Commit updates on editorSetRootElement(null) (#7023) by @potatowagon in #7052
- [lexical-table] Support table alignment by @ivailop7 in #7044
- fix: triple click around inline elements (links) by @fantactuka in #7055
- [lexical-yjs] Feature: Allow passing in custom
syncCursorPositions
function to collab hook by @amanharwara in #7053 - fix: iOS Autocorrect strips formatting by reporting wrong dataType by @redstar504 in #5789
- [lexical-list] Bug Fix: Prevent error when calling formatList when selection is at root by @amanharwara in #6994
- [lexical-table] Bug Fix: Prevent error if pasted table has empty row by @amanharwara in #7057
- docs: Change "here" link to more descriptive text by @6TELOIV in #7058
- [lexical] Bug Fix: In the Safari browser, during the compositing event process, the delete key exhibits unexpected behavior. by @EruditionTu in #7061
- Change fork modules to use production only when NODE_ENV explicitly set to production by @etrepum in #7065
- [lexical-playground] Fix Columns Layout Item Overflow by @ivailop7 in #7066
- [lexical-playground] plugins TableOfContent Scroll smooth behaviour A… by @mshaheerz in #7069
- Unrevert [Breaking Change][lexical] Bug Fix: Commit updates on editor.setRootElement(null) #7023 by @potatowagon in #7068
- [playground] Bug fix: prevent growing whitespaces in markdown table toggle by @potatowagon in #7041
- Fix: Use already defined RegisteredNodes type by @hellovuki in #7085
- [lexical] Chore: Rename variable and add comments for Safari compositing workaround by @EruditionTu in #7092
- [lexical-react] Bug Fix: Import
JSX
type from React to prevent "Cannot find namespace 'JSX'"-error when type-checking with React 19 by @Svish in #7080 - [lexical-yjs] Bug Fix: handle text node being split by Yjs redo by @james-atticus in #7098
- Lexical Docs: 2 updates to spelling README.md by @DocAdam in #7102
- Selection | Lexical: 1 Spelling Update Update selection.md by @DocAdam in #7103
- Creating a React Plugin: 1 Grammar Update - Update create_plugin.md by @DocAdam in #7104
- Working with DOM Events: 2 Spelling and Grammar Updates Update dom-ev… by @DocAdam in #7105
- Listeners Lexical: 3 updates to spelling and grammar - Update listeners.md by @DocAdam in #7100
- [lexical-playground] Bug Fix: Ensure Delete Node handles all node types by @mshaheerz in #7096
- [lexical-utils] Feature: add reverse dfs iterator by @nigelgutzmann in #7107
- [lexical-utils] Fix: Modify $reverseDfs to be a right-to-left variant of $dfs by @etrepum in #7112
- [lexical-mark] Feature: include inline decorator nodes in marks by @james-atticus in #7086
- Fix ListItemNode serialization throws by @zurfyx in #7116
- [workflow] disable size-limit job by @potatowagon in #7125
- [workflow] Delete size limit report by @potatowagon in #7128
- cleanup size-limit by @potatowagon in #7129
- [lexical-playground] Fix: Replace icon with Twitter with X by @awjae in #7127
- [lexical][lexical-mark] Bug Fix: $wrapSelectionInMarkNode with element points by @etrepum in #7132
- [lexical-react] Refactor: Replace
React$Context
withReact.Context
by @SamChou19815 in #7137 - [lexical-markdown] Bug Fix: support link and inline code text formats by @AlessioGr in #7004
- [lexical] Bug Fix: Fix Chrome on android deletion bugs by @waynetee in #7122
- [bugfix] Fix flow typedef for links plugin to include attributes by @fantactuka in #7145
- [ci] Chore: Remove SSH_KEY secret by @etrepum in #7143
- [ci] Bug Fix: Force tag update so create release branch can be run multiple times by @etrepum in #7146
New Contributors
- @redstar504 made their first contribution in #5789
- @6TELOIV made their first contribution in #7058
- @EruditionTu made their first contribution in #7061
- @mshaheerz made their first contribution in #7069
- @hellovuki made their first contribution in #7085
- @Svish made their first contribution in #7080
- @nigelgutzmann made their first contribution in #7107
- @awjae made their first contribution in #7127
- @waynetee made their first contribution in #7122
Full Changelog: v0.23.1...v0.24.0
v0.23.1
Breaking Changes
The only breaking change in this release is minor (#7023) and should not affect any correct code. However, if you are counting the number of times your update listener is called during editor.setRootElement(null)
then you will have to change that expectation.
Highlights
Highlights since v0.23.0
Core Editor:
- ✅ Fix: Updates are committed on
editor.setRootElement(null)
#7023 - ✅ Fix: TabNode deserialization regression from v0.23.0 #7031
Mark:
- ✅ Fix: MarkNode.addID regression #7020
React:
- 🆕 Feature: Merge TabIndentionPlugin and ListMaxIndentLevelPlugin plugins, previously the ListMaxIndentLevelPlugin functionality was only in the playground #7018
What's Changed
- v0.23.0 by @etrepum in #7017
- [lexical-mark] Bug Fix: reverse ternary in MarkNode.addID by @james-atticus in #7020
- [lexical-react] Feature: Merge TabIndentionPlugin and ListMaxIndentLevelPlugin plugins by @fantactuka in #7018
- [lexical] Fix TabNode deserialization regression by @etrepum in #7031
- [Breaking Change][lexical] Bug Fix: Commit updates on editor.setRootElement(null) by @etrepum in #7023
New Contributors
- @james-atticus made their first contribution in #7020
Full Changelog: v0.23.0...v0.23.1
v0.23.0
Breaking Changes
-
🆕 Feature: Add updateFromJSON and move more textFormat/textStyle to ElementNode
This change adds optional textFormat and textStyle properties to SerializedElementNode. If you have existing classes with those properties it could create a namespace clash that you will have to resolve one way or another.TextNode and ElementNode subclasses should be updated to call the updateFromJSON(serializedNode) method from their static importJSON methods. If they don't, they won't support this new functionality, and will have to continue copy and pasting the super implementation of importJSON for correct behavior if the base class ever changes in the future.
You should consider dropping usage of the version field.
Highlights
Highlights since v0.22.0
Core Editor:
- 🆕 Feature: Add updateFromJSON and move more textFormat/textStyle to ElementNode #6970
- ✅ Fix: getNodes over-selection #7006
- ✅ Fix: registerNodeTransform regression #7016
Playground:
- ✅ Fix: table hover actions button position #7011
Yjs:
- 🆕 Feature: Expose function to get anchor and focus nodes for given user awareness state #6942
What's Changed
- v0.22.0 by @potatowagon in #6993
- [lexical] Bug Fix: Flow is missing some variables and functions by @lytion in #6977
- [tests] npm upgrade next by @potatowagon in #6996
- Documentation: Fix typo "nest nest"->"nest" in README.md by @christianhg in #7000
- [test] npm upgrade astro by @potatowagon in #7001
- [lexical] Bug Fix: Fix getNodes over-selection by @etrepum in #7006
- [Breaking Change][lexical] Feature: Add updateFromJSON and move more textFormat/textStyle to ElementNode by @etrepum in #6970
- [lexical-playground] Refactor: switch headings test file names by @christianhg in #7008
- [lexical] Bug Fix: Fix registerNodeTransform regression introduced in #6894 by @etrepum in #7016
- [lexical-playground] Fix table hover actions button position by @ivailop7 in #7011
- [lexical-yjs] Feature: Expose function to get anchor and focus nodes for given user awareness state by @amanharwara in #6942
New Contributors
- @christianhg made their first contribution in #7000
Full Changelog: v0.22.0...v0.23.0
v0.22.0
Breaking Changes
-
🆕 Feature: Support capitalization format
#6897
^ You may need to update callsites that enumerate all cases of TextFormatType eg. switch statements -
🆕 Feature: New update tag: skip-dom-selection, $onUpdate now always called
#6894
Highlights
Highlights since v0.21.0
Link:
- ✅ Fix: Preserve the start/end of the selection for non-text points when creating a LinkNode
#6883
List:
- ✅ Fix: Ensure new paragraph node retains selection styling when exiting list
#6917
Text:
- 🆕 Feature: Support capitalization format
#6897
Markdown:
- ✅ Fix: preserve the order of markdown tags for markdown combinations, and close the tags when the outmost tag is closed by
#5758
Table:
-
🆕 Support google docs colgroup import (via deprecated col width attribute)
#6971 -
✅ fix: check is current selection in target table node
#6979 -
✅ Fix: Allow TableSelection to be preserved during contextmenu events
#6964 -
✅ Fix: Insertion of multiple rows
#6963 -
✅ Fix: Delete table row in merge cells
#6922 -
✅ Fix: Enforce table integrity with transforms and move non-React plugin code to @lexical/table
#6914
Selection:
-
🆕 feature: expose forEachSelectedTextNode
https://github.com/facebook/lexical/pull/6981/files -
🆕 Feature: Unify $selectAll Implementations
#6902
Core editor:
-
✅ Fix: Refactor markSelection for getDOMSlot and not using updateDOM
#6961 -
✅ Refactor: exportJSON, nodes dont need to redeclare exportJSON
#6983 -
🆕 Feature: New update tag: skip-dom-selection, $onUpdate now always called
#6894 -
🆕 Feature: Warn about "display: flex" container for the editor
#6901
React:
-
✅ Replace React$MixedElement and React$Node with React.MixedElement and React.Node in flow API
#6984 -
✅ Fix: the location of draggable-block-menu cannot be calculated
#6966
What's Changed
- [Documentation Update] Add release protocol to maintainers-guide.md by @potatowagon in #6895
- v0.21.0 by @potatowagon in #6896
- [lexical-link] Bug Fix: Preserve the start/end of the selection for non-text points when creating a LinkNode by @etrepum in #6883
- [lexical-website][lexical-react] Documentation Update: documentation for LexicalTreeView plugin by @Kingscliq in #6898
- Warn about "display: flex" container for the editor by @fantactuka in #6901
- [lexical-website] Fix: /docs/react/ "next" button links to itself by @vantage-ola in #6911
- [lexical-table][lexical-utils][lexical-react]: Bug Fix: Enforce table integrity with transforms and move non-React plugin code to @lexical/table by @etrepum in #6914
- [lexical][@lexical/selection] Feature: Unify $selectAll Implementations by @elgh0ul in #6902
- [lexical-playground]: Fix empty layout item causes 100% CPU usage by @basile-savouret in #6906
- [lexical-playground] Chore: Update Prettier to v3 by @daichan132 in #6920
- Doc nits by @zurfyx in #6927
- Update core-tests workflow triggers by @zurfyx in #6928
- [*] Bug Fix: add merge_group to the tests workflow by @etrepum in #6932
- [Breaking Change][lexical-list] Fix: Preserve original format after indenting list item by @citruscai in #6912
- [lexical-playground] Fix: tabs do not show strikethrough/underline by @vantage-ola in #6811
- [lexical-playground] Refactor: editor styles should in PlaygroundEditorTheme.css by @umaranis in #6934
- [lexical-react]Bug Fix: the location of draggable-block-menu cannot be calculated #6818 by @lin-mt in #6915
- [lexical-list] Bug Fix: Ensure new paragraph node retains selection styling when exiting list by @aleksandr-lapushkin in #6917
- [lexical-table] Fix: Delete table row in merge cells by @iamvinayvk in #6922
- [scripts-integration-fixtures] Address GitHub detected a vulnerability in the @sveltejs/kit dependency by @Fetz in #6943
- [lexical-list] Revert PR 6912 by @potatowagon in #6944
- [lexical-onboarding] testing sev mitigation by @nyogi in #6952
- Test comment for pr testing by @bailey-meta in #6953
- Create a test PR by @Tranquiliz00 in #6955
- Revert "[lexical-onboarding] testing sev mitigation (#6952)" by @nyogi in #6956
- Revert "Test comment for pr testing (#6953)" by @bailey-meta in #6957
- Test234 by @Tranquiliz00 in #6958
- [Breaking Change][lexical] Feature: New update tag: skip-dom-selection, $onUpdate now always called by @etrepum in #6894
- [lexical-table][lexical-playground] Fix: Insertion of multiple rows by @iamvinayvk in #6963
- [lexical-playground] Bug Fix: Allow scrolling if the table cell content overflows by @Parasaran-Python in #6966
- [lexical][Breaking Change][lexical-rich-text][lexical-playground] Feature: Support capitalization format by @bedre7 in #6897
- [lexical-website] Add Discord to the community section of the footer by @etrepum in #6967
- [lexical][lexical-table] Bug Fix: Allow TableSelection to be preserved during contextmenu events by @etrepum in #6964
- [lexical-utils] Bug Fix: Refactor markSelection for getDOMSlot and not using updateDOM by @etrepum in #6961
- [lexical-markdown] Bug Fix: preserve the order of markdown tags for markdown combinations, and close the tags when the outmost tag is closed by @yhw5 in #5758
- [lexical-table] Feature: Support google docs colgroup import (via deprecated col width attribute) by @etrepum in #6971
- [Documentation][lexical-website]: Documentation for useLexical node selection hook by @Kingscliq in #6976
- [lexical][lexical-table] Bug fix: TablePlugin: - check is current selection in target table node by @Ulop in #6979
- feature: expose forEachSelectedTextNode by @GermanJablo in #6981
- Refactor: exportJSON by @GermanJablo in #6983
- [lexical] Fix flow error: change this to any by @potatowagon in #6992
- [lexical-react] Refactor: Replace
React$MixedElement
andReact$Node
withReact.MixedElement
andReact.Node
by @SamChou19815 in #6984
New Contributors
- @elgh0ul made their first contribution in #6902
- @basile-savouret made their first contribution in #6906
- @daichan132 made their first contribution in #6920
- @lin-mt made their first contribution in #6915
- @nyogi made their first contribution in #6952
- @bailey-meta made their first contribution in #6953
- @Tranquiliz00 made their first contribution in #6955
- @Parasaran-Python made their first contribution in #6966
- @yhw5 made their first contribution in #5758
- @Ulop made their first contribution in #6979
- @SamChou19815 made their first contribution in #6984
Full Changelog: v0.21.0...v0.22.0
v0.21.0
Breaking Changes
-
🆕 Deprecate $nodesOfType function
#6855 -
🆕 Feature: Scrollable tables with experimental getDOMSlot API
#6759 -
✅ Fix get table-cell background selection color from a class
#6658
Example change would be #6892
Highlights
Highlights since v0.20.0
Core editor:
-
🆕 skipInitialization defaults to false for registerMutationListener
#6857 -
🆕 Deprecate $nodesOfType function
#6855 -
✅ Fix backspace bug when deleting nodes with canInsertTextAfter set to false
#6268 -
🆕 Add missing flow types for utils
#6841 -
✅ Fix: Add feature detection to calculateZoomLevel
#6864 -
✅ Fix: Allow setEditorState to work correctly inside of an update (Fixes Autocomplete plugin)
#6876
React:
-
✅ Fix: Prevent initial value fn to be called on rerender
#6835 -
🆕 ContentEditable Props type rename to ContentEditableProps
#6837
Link:
- 🆕 Add missing flow types
#6833
Table:
- 🆕 Feature: Scrollable tables with experimental getDOMSlot API
#6759 - ✅ Fix down arrow key handling in TableObserver
#6839 - ✅ Fix Resolve table selection issue when the mouse crosses over a portal
#6834 - ✅ Fix get table-cell background selection color from a class
#6658 - ✅ Fix left arrow key handling for table selection
#6875 - ✅ Fix table tab navigation
#6880 - ✅ Fix scrollable table exportDOM
#6884
i8n:
- ✅ Fix: workaround for Korean IME issue on iOS
#6819
A11y:
- ✅ Fix: Aria attributes for ContentEditable are ignored
#6814
Mention:
- 🆕 Mention nodes are no longer spellchecked
#6788
List:
- ✅ Fix: Handle appending inline element nodes in ListNode.append
#6791
Mark:
- ✅ Fix: Don’t deep copy mark node ids in clone to prevent redundant change detection in syncPropertiesFromYjs
#6810
Selection:
-
🆕 New plugin to retain selection: SelectionAlwaysOnDisplay plugin
#6872 -
✅ Fix: positionNodeOnRange fixes
#6873
What's Changed
- v0.20.0 by @etrepum in #6809
- [lexical-mark] Bug Fix: Stop MarkNode __ids array deep copy in clone by @ebads67 in #6810
- [lexical-list] Bug Fix: Handle appending inline element nodes in ListNode.append by @amanharwara in #6791
- Mention nodes shouldn't be spellcheck'd :) by @sevki in #6788
- Fix: Aria attributes for ContentEditable are ignored by @vantage-ola in #6814
- [lexical-rich-text][lexical-plain-text] workaround for Korean IME issue on iOS by @2wheeh in #6819
- [lexical][lexical-table] Feature: Scrollable tables with experimental getDOMSlot API by @etrepum in #6759
- [lexical-examples] Chore: Add DOMExportOutputMap type to the exportMap by @Kingscliq in #6827
- Link flow types by @zurfyx in #6833
- Prevent initial value fn to be called on rerender by @fantactuka in #6835
- [lexical-table] Bug Fix: Fix down arrow key handling in TableObserver by @etrepum in #6839
- [lexical-link] Test: Removing link from node(children) by @vantage-ola in #6817
- [lexical-react] Fix(lexical-react): ContentEditable props type rename by @ivaaaaann in #6837
- [lexical-utils] Bug Fix: Add missing Flow type declarations by @hadiham in #6841
- Table Action Menu - fix UI issue with Merge Cells item by @umaranis in #6830
- [*] Chore: npm upgrade cross-spawn by @potatowagon in #6848
- [lexical-link] Test: Appending inline element nodes to ListNode by @Shopiley in #6826
- [Lexical] Bug Fix: backspace bug when deleting nodes with
canInsertTextAfter
set to false by @dani-lp in #6268 - Feature: Deprecate $nodesOfType function by @Sachin-Mahato in #6855
- [tests] npm upgrade cross-spawn by @potatowagon in #6856
- [Lexical] Chore: Update default skipInitialization to false for registerMutationListener by @Shopiley in #6857
- [lexical-table] Bug Fix: Resolve table selection issue when the mouse crosses over a portal by @etrepum in #6834
- [lexical-table] Bug Fix: get table-cell background selection color from a class by @hamza221 in #6658
- [lexical-selection] Bug Fix: Wrong selection type in $setBlocksType by @lytion in #6867
- Add Documentation for RootNode's semantic and use case by @citruscai in #6869
- [lexical-utils] Bug Fix: Add feature detection to calculateZoomLevel by @etrepum in #6864
- [lexical-playground] Bug Fix: autocomplete format before and after insertion by @bedre7 in #6845
- [lexical-playground] Bug Fix: Preserve the selection using the link editor from a table by @etrepum in #6865
- Allow passing params to run-all by @zurfyx in #6874
- Add SelectionAlwaysOnDisplay plugin by @zurfyx in #6872
- positionNodeOnRange fixes by @zurfyx in #6873
- [lexical-table] Bug Fix: Fix left arrow key handling for table selection by @etrepum in #6875
- [lexical-playground] Fix: Hidden comment button on narrow screens or vertical monitors by @vantage-ola in #6871
- [lexical-playground] Feature: Highlight special strings with format by @citruscai in #6860
- [lexical-table] Bug Fix: Fix table tab navigation by @etrepum in #6880
- [lexical-table] Bug Fix: Fix scrollable table exportDOM by @etrepum in #6884
- v0.20.1 by @potatowagon in #6887
- [lexical-playground] Fix CSS property by @ivailop7 in #6886
- [lexical][lexical-playground] Bug Fix: Allow setEditorState to work correctly inside of an update by @etrepum in #6876
- [lexical-website] Feature: Document the withKlass option for node replacement by @Shopiley in #6890
- v0.20.2 by @potatowagon in #6891
- Fix selected table colors by @zurfyx in #6892
- [lexical-table] Bug Fix: TableNode exportDOM fixes for partial table selection by @etrepum in #6889
New Contributors
- @sevki made their first contribution in #6788
- @ivaaaaann made their first contribution in #6837
- @hadiham made their first contribution in #6841
- @dani-lp made their first contribution in #6268
- @Sachin-Mahato made their first contribution in #6855
- @hamza221 made their first contribution in #6658
- @lytion made their first contribution in #6867
Full Changelog: v0.20.0...v0.21.0
v0.20.2
Highlights
Highlights since v0.20.0
Core editor:
-
🆕 skipInitialization defaults to false for registerMutationListener
#6857 -
🆕 Deprecate $nodesOfType function
#6855 -
✅ Fix backspace bug when deleting nodes with canInsertTextAfter set to false
#6268 -
🆕 Add missing flow types for utils
#6841 -
✅ Fix: Add feature detection to calculateZoomLevel
#6864 -
✅ Fix: Allow setEditorState to work correctly inside of an update (Fixes Autocomplete plugin)
#6876
React:
-
✅ Fix: Prevent initial value fn to be called on rerender
#6835 -
🆕 ContentEditable Props type rename to ContentEditableProps
#6837
Link:
- 🆕 Add missing flow types
#6833
Table:
- 🆕 Feature: Scrollable tables with experimental getDOMSlot API
#6759 - ✅ Fix down arrow key handling in TableObserver
#6839 - ✅ Fix Resolve table selection issue when the mouse crosses over a portal
#6834 - ✅ Fix get table-cell background selection color from a class
#6658 - ✅ Fix left arrow key handling for table selection
#6875 - ✅ Fix table tab navigation
#6880 - ✅ Fix scrollable table exportDOM
#6884
i8n:
- ✅ Fix: workaround for Korean IME issue on iOS
#6819
A11y:
- ✅ Fix: Aria attributes for ContentEditable are ignored
#6814
Mention:
- 🆕 Mention nodes are no longer spellchecked
#6788
List:
- ✅ Fix: Handle appending inline element nodes in ListNode.append
#6791
Mark:
- ✅ Fix: Don’t deep copy mark node ids in clone to prevent redundant change detection in syncPropertiesFromYjs
#6810
Selection:
-
🆕 New plugin to retain selection: SelectionAlwaysOnDisplay plugin
#6872 -
✅ Fix: positionNodeOnRange fixes
#6873
What's Changed
- v0.20.0 by @etrepum in #6809
- [lexical-mark] Bug Fix: Stop MarkNode __ids array deep copy in clone by @ebads67 in #6810
- [lexical-list] Bug Fix: Handle appending inline element nodes in ListNode.append by @amanharwara in #6791
- Mention nodes shouldn't be spellcheck'd :) by @sevki in #6788
- Fix: Aria attributes for ContentEditable are ignored by @vantage-ola in #6814
- [lexical-rich-text][lexical-plain-text] workaround for Korean IME issue on iOS by @2wheeh in #6819
- [lexical][lexical-table] Feature: Scrollable tables with experimental getDOMSlot API by @etrepum in #6759
- [lexical-examples] Chore: Add DOMExportOutputMap type to the exportMap by @Kingscliq in #6827
- Link flow types by @zurfyx in #6833
- Prevent initial value fn to be called on rerender by @fantactuka in #6835
- [lexical-table] Bug Fix: Fix down arrow key handling in TableObserver by @etrepum in #6839
- [lexical-link] Test: Removing link from node(children) by @vantage-ola in #6817
- [lexical-react] Fix(lexical-react): ContentEditable props type rename by @ivaaaaann in #6837
- [lexical-utils] Bug Fix: Add missing Flow type declarations by @hadiham in #6841
- Table Action Menu - fix UI issue with Merge Cells item by @umaranis in #6830
- [*] Chore: npm upgrade cross-spawn by @potatowagon in #6848
- [lexical-link] Test: Appending inline element nodes to ListNode by @Shopiley in #6826
- [Lexical] Bug Fix: backspace bug when deleting nodes with
canInsertTextAfter
set to false by @dani-lp in #6268 - Feature: Deprecate $nodesOfType function by @Sachin-Mahato in #6855
- [tests] npm upgrade cross-spawn by @potatowagon in #6856
- [Lexical] Chore: Update default skipInitialization to false for registerMutationListener by @Shopiley in #6857
- [lexical-table] Bug Fix: Resolve table selection issue when the mouse crosses over a portal by @etrepum in #6834
- [lexical-table] Bug Fix: get table-cell background selection color from a class by @hamza221 in #6658
- [lexical-selection] Bug Fix: Wrong selection type in $setBlocksType by @lytion in #6867
- Add Documentation for RootNode's semantic and use case by @citruscai in #6869
- [lexical-utils] Bug Fix: Add feature detection to calculateZoomLevel by @etrepum in #6864
- [lexical-playground] Bug Fix: autocomplete format before and after insertion by @bedre7 in #6845
- [lexical-playground] Bug Fix: Preserve the selection using the link editor from a table by @etrepum in #6865
- Allow passing params to run-all by @zurfyx in #6874
- Add SelectionAlwaysOnDisplay plugin by @zurfyx in #6872
- positionNodeOnRange fixes by @zurfyx in #6873
- [lexical-table] Bug Fix: Fix left arrow key handling for table selection by @etrepum in #6875
- [lexical-playground] Fix: Hidden comment button on narrow screens or vertical monitors by @vantage-ola in #6871
- [lexical-playground] Feature: Highlight special strings with format by @citruscai in #6860
- [lexical-table] Bug Fix: Fix table tab navigation by @etrepum in #6880
- [lexical-table] Bug Fix: Fix scrollable table exportDOM by @etrepum in #6884
- v0.20.1 by @potatowagon in #6887
- [lexical-playground] Fix CSS property by @ivailop7 in #6886
- [lexical][lexical-playground] Bug Fix: Allow setEditorState to work correctly inside of an update by @etrepum in #6876
- [lexical-website] Feature: Document the withKlass option for node replacement by @Shopiley in #6890
New Contributors
- @sevki made their first contribution in #6788
- @ivaaaaann made their first contribution in #6837
- @hadiham made their first contribution in #6841
- @dani-lp made their first contribution in #6268
- @Sachin-Mahato made their first contribution in #6855
- @hamza221 made their first contribution in #6658
- @lytion made their first contribution in #6867
Full Changelog: v0.20.0...v0.20.2
v0.20.0
Highlights
Highlights since v0.19.0
Lexical Core:
- 🆕
$onUpdate
to add an "onUpdate" callback while processing aneditor.update
#6773
Markdown:
- 🆕 Add ability to control finding the end of a node matched by TextMatchTransformer
#6681 - ✅ Avoid infinite markdown shortcut matchers
#6778
Collab / Yjs:
- ✅ Clean up dangling text after undo in collaboration
#6670
Playground & Docs:
- 🆕 Demonstrate how to preserve more styles when pasting HTML
#6780
#6770 - 🆕 Add more keyboard shortcuts
#6754
What's Changed
- [lexical] Feature: Add onUpdate function during update with $onUpdate (correct baselline) by @landisdesign in #6773
- #6768 fix to avoid infinite markdown shortcut matchers run by @fantactuka in #6778
- [lexical-playground] Fix: the placement of the fontSize button in the ToolbarPlugin and hide the vertical scroll (Bug Fix) by @vantage-ola in #6786
- Bug Fix: ContextMenu Paste option not preserving style by @citruscai in #6780
- [lexical-website] Chore: upgrade to Docusaurus v3.6 - Docusaurus Faster by @slorber in #6761
- [lexical-react] Bug Fix: LexicalTypeaheadMenuPlugin SSR error: ReferenceError: document is not defined by @bedre7 in #6794
- [lexical-markdown] Feature: add ability to control finding the end of a node matched by TextMatchTransformer by @AlessioGr in #6681
- [Lexical-website] BugFix: Change button text colour to improve visibility by @Shopiley in #6796
- [lexical-yjs] Bug Fix: clean up dangling text after undo in collaboration by @mike-atticus in #6670
- [lexical-website] Documentation Update: Add Documentation for html Property in Lexical Editor Configuration by @Kingscliq in #6770
- [lexical-playground] Feature: Add more keyboard shortcuts by @bedre7 in #6754
- Fix importDOM for Layout plugin by @ivailop7 in #6799
- Add optional selection argument to $getHtmlContent flow type by @rajivanisetti in #6803
- [lexical] Chore: Add export of DOMExportOutputMap from lexical by @Kingscliq in #6805
New Contributors
- @landisdesign made their first contribution in #6773
- @vantage-ola made their first contribution in #6786
- @citruscai made their first contribution in #6780
- @slorber made their first contribution in #6761
- @Shopiley made their first contribution in #6796
- @mike-atticus made their first contribution in #6670
- @Kingscliq made their first contribution in #6770
Full Changelog: v0.19.0...v0.20.0