Skip to content

Releases: facebook/lexical

v0.12.4

19 Nov 00:02
Compare
Choose a tag to compare

This release just hotfixes a circular dependency issue in v0.12.3.

v0.12.3

17 Nov 22:15
Compare
Choose a tag to compare

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!

Screenshot 2023-11-17 at 5 08 09 PM

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

Read more

v0.12.2

08 Sep 21:59
3fbe947
Compare
Choose a tag to compare

v0.12.2 (2023-09-08)

Changelog

  • Move isHTMLElement into core (#4977) Gerard Rovira
  • 0.12.1 (#4978) Acy Watson

Full Changelog: v0.11.3...v.0.12.2

v0.12.1

08 Sep 21:58
Compare
Choose a tag to compare

v0.12.1 (2023-09-07)

Changelog

  • Fix: font colors do not apply to text within table cells (#4934) Tahir Shakir
  • fix #4526 (#4910) xyyjk
  • fix: dispatching undo & redo states for collaboration; fixing up Point.getNode not a function (#4956) Nadine Nguyen
  • Retain TextNode whitespace on export (#4969) Gerard Rovira
  • Revert "Fix: fixes regex in YouTube AutoEmbedPlugin (#4916)" (#4966) Ivaylo Pavlov
  • Fix: fixes regex in YouTube AutoEmbedPlugin (#4916) Rajat
  • refactor: moved functions to @lexical/utils (#4923) Rajat
  • refactor: remove redundant styles from floating text format plugin (#4938) VelociRaptor
  • 🐛 Fixed range selection splicing text (#4659) Steve Larson
  • Added extra Yjs information to collaboration docs (#4951) Steven Fabre
  • fix: disable spellcheck for code format (#4927) VelociRaptor
  • Add column layout plugin example (#4937) Maksim Horbachevsky
  • docs: fix example in getting-started/react (#4935) Mike
  • Fix: MaxLengthPlugin crashes when the limit is reached and enter is pressed (#4871) Hansu Kim
  • chore: prefer viewBox to width/height on SVG images (#4921) VelociRaptor
  • Adds ElementFormatDropdown to the Toolbar plugin (#4904) itaquito
  • Add iOS information to the website (#4899) amyworrall
  • fix: Only append fragment when element is HTMLElement (#4490) lsbyerley
  • Table unmerge (#4877) Peter Cook Bulukin
  • Revert "Updated link markdown regex (#4461)" (#4896) Gerard Rovira
  • Add missing flow def (#4889) Maksim Horbachevsky
  • Handle undefined rows and columns in table utils after cell merge (#4874) Peter Cook Bulukin
  • Updated link markdown regex (#4461) Ronald Langeveld
  • Fix: Pressing enter now doesnot delete ImageNode from the ListItemNode (#4866) Takumi Uchida

New Contributors

Full Changelog: v0.11.3...v0.12.1

v0.12.0

10 Aug 15:39
Compare
Choose a tag to compare

v0.12.0 (2023-08-09)

Breaking Changes

#4818 moves "select all" behavior to the SELECT_ALL command, meaning anyone using setRootElement directly (i.e., not using PlainTextPlugin or RichTextPlugin or their underlying functions) would need to wire up command listeners for SELECT_ALL_COMMAND in order to preserve the default "select all" behavior after this version.

  • Extract "select all" behavior to new SELECT_ALL_COMMAND (#4818) Chris Montrois
  • Paste decorators before empty text nodes (#4672) Steve Larson
  • Added "Page Break" to Lexical Playground (#4842) Dias Kappassov
  • fix editor ref types and use EditorRefPlugin in the playground (#4852) Anton Kostiuchkov
  • Expand react docs (#4845) Acy Watson
  • Port lexical.dev to Tailwind (#4827) Awjin
  • Stop collapsing non-collapsible whitespace on paste (#4770) Brian Birtles
  • feat(playground): add support for collapsed margins in draggable block (#4823) Mathieu Métral
  • feat(playground): add support for drop block on empty area (#4811) Mathieu Métral
  • docs: remove placeholder property from exampleTheme (#4802) Karam Qaoud%

v0.11.3

19 Jul 11:47
dc996d0
Compare
Choose a tag to compare

v0.11.3 (2023-07-18)

  • Fix table imports (#4795) Maksim Horbachevsky
  • RFC Add prev editor state for mutation listener (#4796) Maksim Horbachevsky
  • Fix Cant convert paragraph into a header if the first child of the paragraph is a LineBreakNode (#4776) Naveen
  • Add setStyle to Flow types (#4780) Acy Watson
  • Fix width reflow in columns when resizing tables (#4775) Karam Qaoud
  • package.lock (#4769) Gerard Rovira
  • Remove duplicate declaration (#4772) Roman Gafiatullin
  • fix Return LexicalEditorRefPlugin as valid JSX (#4771) Thomas Sauques
  • Update TS to 5.1.x (#4695) Georgii Dolzhykov

New Contributors

Full Changelog: v0.11.2...v0.11.3

v0.11.2

11 Jul 18:10
d535ec0
Compare
Choose a tag to compare

v0.11.2 (2023-07-11)

Changelog

New Contributors

Full Changelog: v0.11.1...v0.11.2

v0.11.1

26 May 23:01
c0a59bc
Compare
Choose a tag to compare

0.11.1 (2023-05-26)

Changelog

Full Changelog: v0.11.0...v0.11.1

v0.11.0

24 May 00:49
e00bd57
Compare
Choose a tag to compare

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

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

New Contributors (since v0.9.1)

Full Changelog: v0.10.0...v0.11.0

v0.10.0

18 Apr 19:15
Compare
Choose a tag to compare

0.10.0 (2023-04-18)

Breaking Changes

@lexical/link will now sanitize anchor tag hrefs before rendering them to the DOM. This provides a measure of protection against XSS attacks
that rely on inlining javascript in that attribute. However, it means that links using less common protocols will now be sanitized (converted to about:blank),
which will be a breaking change for any existing links.

Like most other node-based logic in Lexical, the sanitization logic can be overriden by overriding LinkNode using the Node Overrides API and replacing it with a node that implements the sanitizeUrl method differently.

Fixes CVE-2023-30792

  • Table feature: background color (#4345) Gerard Rovira
  • Add @react/LexicalClickableLinkPlugin (#4316) Gerard Rovira
  • TablePlugin feature: cell merge (#4343) Gerard Rovira
  • Ban javascript URLs in @lexical/link (#4342) Acy Watson
  • Table Cell Background Color (#4306) Gerard Rovira
  • ExportDOM in Debug Tree View (#4307) Ivaylo Pavlov