v0.12.3 (2023-11-17)
This minor release is not so minor! New stuff and a scroll of bugfixes.
Overriding HTML serialization from the editor config (#4254)
Some months ago we introduced Node Overrides as a way to fully customize your Node. While this feature gives you the most flexibility, we realized (based on Discord's feedback) that most overrides are fairly simple and move around HTML. For this reason, we're bringing this closer to you and without the need to introduce new Nodes.
html: {
export: new Map([[TextNode, () => ({ element: document.createElement('figure') })]]),
import: { 'figure': () => ({ conversion: () => ({ node: $createTextNode('yolo') }), priority: 4 }) }
},
$insertNodes rewrite (#5002)
$insertNodes
is arguably the most complex function in the Lexical codebase. Or at least it was until @GermanJablo succesfully rewrote it from scratch!
For those of you who haven't had a chance to play with $insertNodes
yet, it places one or multiple Nodes at your selection, and is responsible for intelligently determining the end hiearchy (i.e. merged together or moved up to tree).
@GermanJablo's rewrite not only resolves some immediate issues but also the reduced complexity now enables us to perfect this function (and indirectly the clipboard paste behavior), previously blocked by its complexity.
Tables reliability
We closed more than 70% of the open tables issues since the last release. Kudos to @icrosil for being the main driver behind this effort!
What's Changed
- fix(lexical/html): missing @lexical/utils dependency by @liuweiGL in #4984
- Fix comment plugin selection rect top position by @vonsa in #4988
- Remove capital letter mentions by @acywatson in #4991
- Add nodes replacement support for nested composer by @fantactuka in #4992
- Add highlight to format types by @zurfyx in #5001
- Fix getTableSelectionFromTableElement flow by @zurfyx in #5005
- Fix TextNode override in 'Serialization & Deserialization' doc by @giacomoran in #5006
- Allow overriding HTML serialization behavior from the editor config. by @acywatson in #4254
- fix: LinkNode.importDOM should support all node content by @k-rajat19 in #5010
- Fix event handler removal in useDynamicPositioning, remove dupe code by @thorn0 in #5024
- Fix: pasting text that ends with an empty paragraph is ignored when the MaxLengthPlugin is enabled by @khsily in #5020
- Update setFloatingElemPosition.ts by @dirheimerb in #5027
- Update setFloatingElemPositionForLinkEditor.ts by @dirheimerb in #5028
- chore: fix typo in lexical-utils docs by @bbonamin in #5022
- fix(Playground): CMD +K improvements by @k-rajat19 in #5013
- feat: LexicalClickableLinkPlugin should support ctrl click mode #4565 by @sathishsridhar in #4839
- Nit: Floating toolbar by @zurfyx in #5038
- Transpile optional catch binding by @zurfyx in #5048
- Playground: refactor component picker plugin by @thorn0 in #4836
- Port List e2e test to unit tests by @acywatson in #5030
- Playground: embed twitter support x.com by @suhaotian in #5060
- MaxLength handle empty ElementNode by @zurfyx in #5029
- Allow LexicalTypeaheadMenuPlugin to work when inside an iframe by @lestertay in #5044
- fix : Add column shortcut gets hidden when mouse leave the table #4857 by @sathishsridhar in #5058
- Fix/floating formatter #5021 by @shubham168 in #5041
- Fix: ToolbarPlugin paste error with start, end format by @khsily in #5019
- fix(playground-text-format-toolbar): don't hide toolbar if current node is a paragraph by @mathieumetral in #4850
- Fix integrity by @zurfyx in #5068
- chore: fix typo by @AlessioGr in #5074
- Set up GA4 for website by @zpao in #5078
- Fix getting style via $getSelectionStyleValueForProperty when selection is collapsed by @Piliuta in #5082
- Fix tab replacement composition crash by @zurfyx in #5066
- chore: add typedefs for collab nodes and remove unused members by @zignis in #5071
- Revert Fix $transferStartingElementPointToTextPoint() #4756 by @thegreatercurve in #5094
- Fix insertNodes insert position at start of inline ElementNode by @zurfyx in #5110
- docs: fix typo in decorators.md by @CanRau in #5113
- fix(lexical-rich-text): correct comment typo by @jason89521 in #5116
- fix: fix android backspace bug by @cristopher-iov in #5077
- Fix: right click select images by @bencarletonn in #5056
- Consolidate docs across the repo by @ivailop7 in #5121
- chore(deps): bump @excalidraw/excalidraw from 0.14.2 to 0.15.3 by @dependabot in #5135
- Update anchor selection if split by patching style by @Piliuta in #5087
- Updated cell calculation based on cellspans by @icrosil in #5141
- Add Columns Layout to Typeahead menu by @ivailop7 in #5136
- Updated $insertTableColumn with batching by @icrosil in #5145
- chore(deps): bump @babel/traverse from 7.18.6 to 7.23.2 by @dependabot in #5155
- Add
commandPriority
option toLexicalMenu
and dependent components by @huw in #5123 - Update index.tsx by @dirheimerb in #5165
- Fix formatting selected table cells by @tahir606 in #5168
- Updated package-lock.json versions with 'npm audit fix'. by @Sparky338 in #5125
- Table resize fix by @AlexanderReznik in #5169
- Add Optional Chaining to
isNodePre
Method by @nickjmoss in #5157 - Fix
insertNodes
andinsertParagraph
by @GermanJablo in #5002 - Range utils by @zurfyx in #5153
- Fix insertNodes after selection swap by @zurfyx in #5175
- Add playwright-report to gitignore by @GermanJablo in #5173
- Fix insertNodes when anchor point is blank TextNode by @zurfyx in #5179
- Fix at() transpilation by @zurfyx in #5180
- fixed issue 5181 where link address is not shown if comment is set in… by @btezzxxt in #5188
- Improved LexicalMenu positioning relative to text by @9larsons in #5187
- Link title is correctly applied through the command by @petyosi in #5191
- fix Heading.insertNewAfter by @GermanJablo in #5198
- Update Modal.tsx by @dirheimerb in #5203
- Add conditional format setting, if the node is link fetch the parent paragraph node by @tahir606 in #5209
- Fix lexical-link typo s/_rel/__rel/ by @etrepum in #5221
- Fix "touple" typo to make it correctly "tuple" by @Jufrench in #5229
- fix: Make autolinks working for formatted text by @Constantiner in #5214
- refactor(playground): dry settings by @agriffis in #5225
- Fix iconRTL for center alignment by @ivailop7 in #5227
- Bug: Align list item do not change the export DOM by @trinhvinhtruong96 in #5160
- Fixes grid selection to be aware of nested tables by @icrosil in #5166
- chore(deps-dev): bump vite from 2.9.13 to 2.9.16 by @dependabot in #5133
- chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 by @dependabot in #5129
- chore(deps): bump postcss from 8.4.27 to 8.4.31 by @dependabot in #5130
- chore(deps-dev): bump semver from 5.7.1 to 5.7.2 by @dependabot in #5131
- chore(deps): bump @sideway/formula from 3.0.0 to 3.0.1 by @dependabot in #5132
- chore(deps-dev): bump tough-cookie from 4.1.2 to 4.1.3 by @dependabot in #5134
- Remove unnecessary link from README.md by @thegreatercurve in #5232
- Select original cell if empty by @icrosil in #5231
- Fixed delete removing link node text when on linebreak by @9larsons in #5146
- Remove codeowners to prevent unnecessary pings by @thegreatercurve in #5236
- Fixed column header on merged cells by @icrosil in #5230
- It's a journey by @acywatson in #5242
- keep on keeping on by @acywatson in #5243
New Contributors
- @liuweiGL made their first contribution in #4984
- @vonsa made their first contribution in #4988
- @dirheimerb made their first contribution in #5027
- @bbonamin made their first contribution in #5022
- @sathishsridhar made their first contribution in #4839
- @suhaotian made their first contribution in #5060
- @lestertay made their first contribution in #5044
- @shubham168 made their first contribution in #5041
- @zpao made their first contribution in #5078
- @CanRau made their first contribution in #5113
- @jason89521 made their first contribution in #5116
- @cristopher-iov made their first contribution in #5077
- @icrosil made their first contribution in #5141
- @huw made their first contribution in #5123
- @Sparky338 made their first contribution in #5125
- @AlexanderReznik made their first contribution in #5169
- @nickjmoss made their first contribution in #5157
- @petyosi made their first contribution in #5191
- @etrepum made their first contribution in #5221
- @Jufrench made their first contribution in #5229
- @Constantiner made their first contribution in #5214
- @agriffis made their first contribution in #5225
- @trinhvinhtruong96 made their first contribution in #5160
Full Changelog: v.0.12.2...v0.12.3