v0.11.0

facebook/lexicalv0.11.0May 24, 2023by zurfyx

AI Summary

A feature release introducing proper tab support, an experimental context menu, and various fixes for cursor selection and deletion heuristics.

Key Highlights

  • Proper support for tabs
  • Introduced `LexicalContextMenu` (experimental)
  • Fixed NodeSelection clicks on Android
  • Revised triple click heuristics

New Features

  • Added documentation for TabIndentationPlugin
  • Tab support implemented
  • Auto embed fix for YouTube
  • Tamed wild white spaces

Full Release Notes

# v0.11.0

## v0.11.0 (2023-05-23)

Arguably no major new features but this version comes with substantial bugfixes! Most notably:

- Proper support for tabs
- Remove redundant spaces on paste
- Revised triple click heuristics
- Fixed NodeSelection clicks on Android
- Revised deletion heuristics style retention
- Revised `createRectsFromDOMRange` for Mark-like plugins

(you can read more on these on the changelog below)
 
### LexicalContextMenu (experimental)

![Screenshot 2023-05-23 at 6 15 20 PM](https://github.com/facebook/lexical/assets/193447/45e977b7-6f70-4cca-a92f-041a9ffbef4b)

While we strongly advocate for a11y and features that work across devices, there is significant demand for desktop users to have access to tooling via the right click. UX-wise, they're very familiar with it as it's common within other editors such as the well-known Google Docs, Pages and Microsoft Word and it's also the fastest.

LexicalContextMenu is a WIP and not ready for production but the prototype is already live in the Playground under a feature flag (see the gear on the bottom left to enable it `/?shouldUseLexicalContextMenu=true`)

## Changelog

* Change `MarkNode::clone` `node` arg type to `this` by @potomak in https://github.com/facebook/lexical/pull/4363
* Fall back to url if parser fails by @acywatson in https://github.com/facebook/lexical/pull/4364
* Inherit format for text entity node by @fantactuka in https://github.com/facebook/lexical/pull/4382
* Collapsible enhancements by @fantactuka in https://github.com/facebook/lexical/pull/4257
* Improve responsiveness of the floating text format toolbar buttons by @ChronicLynx in https://github.com/facebook/lexical/pull/4298
* Setting initial state of isSmallWidthViewport by @ebads67 in https://github.com/facebook/lexical/pull/4398
* Make DecoratorBlockNode.isInline return false by @EgonBolton in https://github.com/facebook/lexical/pull/4383
* Add docs for list package by @acywatson in https://github.com/facebook/lexical/pull/4393
* Flow table bg color types by @zurfyx in https://github.com/facebook/lexical/pull/4400
* Use provided selection when serializing to HTML by @acywatson in https://github.com/facebook/lexical/pull/4392
* Fix markdown list merging by @acywatson in https://github.com/facebook/lexical/pull/4387
* Fix list merging by @acywatson in https://github.com/facebook/lexical/pull/4386
* Optional colrowSpan serialization by @zurfyx in https://github.com/facebook/lexical/pull/4344
* Split test files and skip flaky tests in linux + collab by @acywatson in https://github.com/facebook/lexical/pull/4394
* Fix HistoryPlugin selection out of sync by @zurfyx in https://github.com/facebook/lexical/pull/4390
* Remove unused styles by @thorn0 in https://github.com/facebook/lexical/pull/4426
* simplify logic for the fix "Improve responsiveness of the floating text format toolbar buttons" by @AlessioGr in https://github.com/facebook/lexical/pull/4431
* Updated Toolbar Plugin to Add keyboard shortcut for adding hyperlinks by @AnuragBalhra in https://github.com/facebook/lexical/pull/4413
* Fix text click selection on touch devices #3098 by @IBastawisi in https://github.com/facebook/lexical/pull/4395
* Allow to pass all possible attributes to a content editable div by @kazimirchuk in https://github.com/facebook/lexical/pull/4450
* Revisit touch devices by @zurfyx in https://github.com/facebook/lexical/pull/4441
* fix: attach event listeners to initial nodes by @OriginalEXE in https://github.com/facebook/lexical/pull/4454
* Disable flaky test by @zurfyx in https://github.com/facebook/lexical/pull/4455
* Add documentation for TabIndentationPlugin by @mrPaintMan in https://github.com/facebook/lexical/pull/4453
* Select all adjustments by @fantactuka in https://github.com/facebook/lexical/pull/4425
* Handle empty element deletion by @fantactuka in https://github.com/facebook/lexical/pull/4380
* Tab support by @zurfyx in https://github.com/facebook/lexical/pull/4436
* Event delegation for NoteEventPlugin by @fantactuka in https://github.com/facebook/lexical/pull/4424
* Generalize Menu Logic by @tylerjbainbridge in https://github.com/facebook/lexical/pull/4284
* Sanitize floatingLinkEditor by @acywatson in https://github.com/facebook/lexical/pull/4462
* Improve rect deduplication by @acywatson in https://github.com/facebook/lexical/pull/4471
* Tests for inserting text either side of an inline element by @shirakaba in https://github.com/facebook/lexical/pull/4346
* exportDOM methods for HeadingNode, QuoteNode by @ivailop7 in https://github.com/facebook/lexical/pull/4445
* Sanitize url by @acywatson in https://github.com/facebook/lexical/pull/4483
* Add text/uri-list support in clipboard. by @xinyuan0801 in https://github.com/facebook/lexical/pull/4478
* Fix Flow types by @zurfyx in https://github.com/facebook/lexical/pull/4485
* TypeAheadMenu and TableActionMenu rendered off screen fixed. by @Shubhankerism in https://github.com/facebook/lexical/pull/4301
* Fix GC memory leak by @zurfyx in https://github.com/facebook/lexical/pull/4510
* Adjust selection after triple click by @fantactuka in https://github.com/facebook/lexical/pull/4512
* Fix GC memory leak (2) by @zurfyx in https://github.com/facebook/lexical/pull/4513
* Make tabs flexible in code by @zurfyx in https://github.com/facebook/lexical/pull/4520
* Allow arbitrary awareness fields in Collaboration plugin by @attnov in https://github.com/facebook/lexical/pull/4507
* Fix clickable link plugin #4514 by @fantactuka in https://github.com/facebook/lexical/pull/4519
* Add HTML deserialization recipe to docs by @ivailop7 in https://github.com/facebook/lexical/pull/4432
* Allow importing width and height from table cell and DOM nodes by @GMchris in https://github.com/facebook/lexical/pull/4521
* Basic Context Menu (behind Switch) by @tylerjbainbridge in https://github.com/facebook/lexical/pull/4285
* Auto embed fix #4530 by @fantactuka in https://github.com/facebook/lexical/pull/4535
* Tame wild white spaces by @zurfyx in https://github.com/facebook/lexical/pull/4467
* v0.11.0 by @zurfyx in https://github.com/facebook/lexical/pull/4539

## New Contributors (since v0.9.1)

* @khanakia made their first contribution in https://github.com/facebook/lexical/pull/4209
* @donotlb made their first contribution in https://github.com/facebook/lexical/pull/4192
* @nemophrost made their first contribution in https://github.com/facebook/lexical/pull/4216
* @howlowck made their first contribution in https://github.com/facebook/lexical/pull/4229
* @bencarletonn made their first contribution in https://github.com/facebook/lexical/pull/4237
* @yjhtry made their first contribution in https://github.com/facebook/lexical/pull/4263
* @aleksandr-kiliushin made their first contribution in https://github.com/facebook/lexical/pull/4277
* @umaranis made their first contribution in https://github.com/facebook/lexical/pull/4310
* @MohitSinghChauhan made their first contribution in https://github.com/facebook/lexical/pull/4318
* @potomak made their first contribution in https://github.com/facebook/lexical/pull/4363
* @thorn0 made their first contribution in https://github.com/facebook/lexical/pull/4426
* @AnuragBalhra made their first contribution in https://github.com/facebook/lexical/pull/4413
* @IBastawisi made their first contribution in https://github.com/facebook/lexical/pull/4395
* @kazimirchuk made their first contribution in https://github.com/facebook/lexical/pull/4450
* @OriginalEXE made their first contribution in https://github.com/facebook/lexical/pull/4454
* @mrPaintMan made their first contribution in https://github.com/facebook/lexical/pull/4453
* @shirakaba made their first contribution in https://github.com/facebook/lexical/pull/4346
* @xinyuan0801 made their first contribution in https://github.com/facebook/lexical/pull/4478
* @Shubhankerism made their first contribution in https://github.com/facebook/lexical/pull/4301
* @attnov made their first contribution in https://github.com/facebook/lexical/pull/4507
* @GMchris made their first contribution in https://github.com/facebook/lexical/pull/4521

**Full Changelog**: https://github.com/facebook/lexical/compare/v0.10.0...v0.11.0