v0.13.0 (2024-01-24)
This version wraps up a major tables refactor, and includes some more bugfixes!
TableSelection
This version gets rid of GridSelection
and Grid{Cell/Row/Table}Node
, you should now (exclusively) use the Table equivalents.
Upgrade instructions (rename these in your codebase):
- All table files now live in
@lexical/table
as opposed to a mix betweenlexical
and@lexical/table
. GridSelection
->TableSelection
$isGridSelection
->$isTableSelection
LexicalTableSelection
->LexicalTableObserver
Cell
(type) ->TableDOMCell
Cells
(type) ->TableDOMRows
Grid
(type) ->TableDOMTable
LexicalTableSelection.grid
(the property) ->LexicalTableSelection.table
- (helper function that contained
grid
in their name no longer do)
Why?
When we started GridSelection, we wanted GridSelection to cater a variety of use cases rather than remain specific to the Tables implementation. Fast forward, 1+ years we still haven't found any additional use case that fits GridSelection (internally or within the community). Hence, we took this opportunity to trim down the Core bundle size by ~1KB by making GridSelection specific to Tables.
Custom selection
But it's not just a cleanup! We leveraged this opportunity to revise the basics of selection to enable anyone create their own custom selection (just like we did for tables). You can now build on top of BaseSelection and construct a selection of any type (i.e. a px based selection).
What's Changed (since 0.12.2)
- 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
- v0.12.3 by @acywatson in #5244
- Fix @lexical/utils import by @zurfyx in #5245
- v0.12.4 by @zurfyx in #5246
- packagelock by @zurfyx in #5247
- Fix: Apply background color to multiple selected cells by @paigekim29 in #5258
- Bug: The number in numbered list reset and duplicated after change fr… by @trinhvinhtruong96 in #5253
- Fix: Resolve "Cannot read properties of undefined (reading 'trim')" issue in $getSelectionStyleValueForProperty by @yeion7 in #5271
- Move to new Excalidraw APIs for 0.17 update by @ivailop7 in #5277
- Fix: Autolink plugin URL recognition failures by @disalechinmay in #5275
- Revert "Fix: Autolink plugin URL recognition failures (#5275)" by @acywatson in #5295
- Support HTML export overrides from config for nested editors. by @acywatson in #5267
- Fixing nested collapsible section chevron by @ebads67 in #5300
- docs: improve DecoratorNode docs by @petrovmiroslav in #5284
- fix: backspace in Android not deleting first character by @kirandash in #5282
- URL sanitization ClickableLinkPlugin by @yeion7 in #5302
- Add 2 missing flow exports by @zurfyx in #5314
- Export CommandListener Flow by @zurfyx in #5315
- Improvements in insertNodes by @GermanJablo in #5201
- Make insertRangeAfter private by @zurfyx in #5323
- selectEnd/start as a method of LexicalNode instead of ElementNode by @GermanJablo in #5205
- [PR 1] Swap instance selection for BaseSelection in most cases by @icrosil in #5280
- Fix insertNodes bugs by @GermanJablo in #5325
- keep selection style when clicking empty editor by @youngkyo0504 in #5292
- [PR 2] 5276 PointSelection instead of Grid/RangeSelections by @icrosil in #5281
- Make subscript and superscript text formats mutually exclusive by @geryogam in #5317
- Delete experimental table from playground by @Fetz in #5237
- Fix path alias typo by @2wheeh in #5340
- v0.12.5 by @acywatson in #5343
- docs: added exportJSON function to the ExtendedTextNode plugin code by @ninawangyimei in #5338
- Support other formats in Collapsible Title by @ivailop7 in #5328
- Improve TypeScript types by removing
[k: string]: any
from LexicalNode by @etrepum in #5223 - Automatic release on merge by @acywatson in #5347
- refactor(playground): kill ts-ignore by @agriffis in #5342
- Clear link using key shortcut bug by @umaranis in #5354
- [PR 3] Removed edge-cases of GridSelection by @icrosil in #5291
- [PR 4] remove GridSelection from lexical core by @icrosil in #5293
- Fixed: for #5162, The beginning of a TextNode with canInsertTextBefore false in … by @matsuyama-k1 in #5363
- Flow fix RangeSelection extends by @zurfyx in #5377
- Feature/excalidraw resize by @lSelectral in #5383
- fix: logical error in description of insertBefore parameter by @spirobel in #5400
- fix: typo Contaner -> Container by @preynal in #5410
- Fix typo on test title by @2wheeh in #5399
- Fix bug on window.event conflict by @hboisgibault in #5391
- Fix $convertFromMarkdownString breakdown due to no parent by @2wheeh in #5393
- dropdown text visibility problem fixed for medium and smaller screens by @lSelectral in #5382
- Fixed the error when CollapsibleTitleNode type enter key by @frankdiw in #5416
- docs: correct custom node examples by @inaseem in #5407
- Refactored findNearestListItemNode using $findMatchingParent by @mrAJAY1 in #5419
- Fix insert image to new inserted table row in playground report error by @frankdiw in #5417
- canInsertTextAfter exception for composition by @zurfyx in #5378
- Add link to state update blog by @acywatson in #5423
- Fix insertNodes when inserting into inline elements by @birtles in #5394
- Fixed a small typo by @frankdiw in #5427
- fix: adding missing argument for $sliceSelectedTextContent by @nadine-nguyen in #5380
- Inserting hyperlink through toolbar doesn't open floating editor in edit mode by @umaranis in #5372
- Remove duplicated test codes by @2wheeh in #5429
- Bug Fix: added a fix for discarding multiple color picker entries on drag by @bhavyakaria in #5335
- fix: Reset compositionKey when backspacing a selection on Android where anchor and focus keys are different by @amanharwara in #5389
- Bug: Editing a link and changing selection shows wrong link value by @umaranis in #5352
- docs: fix outdated importDOM types in docs by @thorn0 in #5431
- Fix TextNode#createDOM types: allow editor parameter in subclasses by @thorn0 in #5425
- Revert "Inserting hyperlink through toolbar doesn't open floating editor in edit mode" by @acywatson in #5456
- Fix floating link editor on inline image caption by @2wheeh in #5460
- Fix typechecking issues in unit tests by @thorn0 in #5462
- v0.12.6 by @acywatson in #5463
- Minor fix for release script by @acywatson in #5464
- Minor refactoring in LexicalLineBreakNode by @thorn0 in #5455
- Update Flow version by @thegreatercurve in #5471
- Remove depecated usage of
%checks
from Flow types by @thegreatercurve in #5477 - Fix multiline conversion to codeblock by @Shubhankerism in #5472
- Fix small issue with DecoratorNode type guards by @thegreatercurve in #5478
- Fix columns layout update command by @ivailop7 in #5484
- Fix escape down for collapsible section when collapsed by @ivailop7 in #5485
- Adding ability to mount LexicalMenus to arbitrary divs by @ebads67 in #5481
- Replace font size dropdown with font size entry component by @Shubhankerism in #5451
- Fix
DecoratorNode
s being treated as block elements by @9larsons in #5371 - Use correct prop type for children in LexicalComposer by @pvdstel in #5503
- Fix exportTextFormat to keep dollar sign by @2wheeh in #5379
- docs(serialization): add node helpers to ExtendedTextNode example by @CanRau in #5442
- Fix inserting link open editor in edit mode by @2wheeh in #5458
- Fix CI - font-size e2e by @zurfyx in #5511
- [PR-5] Remove references of PointSelection by @icrosil in #5334
- fix: set button type=button in TableActionMenuPlugin by @58bits in #5510
- Allow setting className for checklist in theme by @amanharwara in #5445
- Fix AutoLinkPlugin triggers endless transforms by @2wheeh in #5404
- Bump Node to 18.18.0 by @ivailop7 in #5513
- Fix inserting redundant paragraph on enter in MarkNode by @strdr4605 in #5418
- Fixed the toolbar style activation state is incorrect in certain cases by @WarrenLee19 in #5126
- Clean up the never implemented Table menu in Toolbar by @ivailop7 in #5523
- Combined selection format to ignore empty text nodes by @zurfyx in #5521
- Fix and extend README.md documentation links by @Hahlh in #5526
- Move Grid to @lexical/table by @zurfyx in #5528
- Remove Grid Nodes by @zurfyx in #5531
- Move Grid to @lexical/table by @zurfyx in #5532
- Rename LexicalTableSelection to LexicalTableObserver by @zurfyx in #5533
- Rename GridSelection to TableSelection by @zurfyx in #5534
New Contributors (since 0.12.2)
- @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
- @paigekim29 made their first contribution in #5258
- @yeion7 made their first contribution in #5271
- @disalechinmay made their first contribution in #5275
- @petrovmiroslav made their first contribution in #5284
- @kirandash made their first contribution in #5282
- @youngkyo0504 made their first contribution in #5292
- @geryogam made their first contribution in #5317
- @2wheeh made their first contribution in #5340
- @ninawangyimei made their first contribution in #5338
- @matsuyama-k1 made their first contribution in #5363
- @lSelectral made their first contribution in #5383
- @spirobel made their first contribution in #5400
- @preynal made their first contribution in #5410
- @hboisgibault made their first contribution in #5391
- @frankdiw made their first contribution in #5416
- @inaseem made their first contribution in #5407
- @mrAJAY1 made their first contribution in #5419
- @bhavyakaria made their first contribution in #5335
- @amanharwara made their first contribution in #5389
- @pvdstel made their first contribution in #5503
- @Hahlh made their first contribution in #5526
Full Changelog: v.0.12.2...v0.13.0
Thank you to the new and old contributors for helping us improve Lexical's reliability!