lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.

MIT License

Downloads
27.6M
Stars
17.5K
Committers
399

Bot releases are hidden (Show)

lexical - v0.15.0 Latest Release

Published by ivailop7 5 months ago

Highlights

  • A new minor version, since we've introduced a new lexical eslint plugin (https://github.com/facebook/lexical/pull/5908), which enforces consistency around usage of the $ method notation.
  • New error codes generated published at publish time (https://github.com/facebook/lexical/pull/6005)
  • A significant number of fixes related to tables selection, cursor handling and a more robust copy-pasting behaviour
  • Improvements to the Lexical DevTools plugin and documentation

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.14.5...v0.15.0

lexical - v0.14.5

Published by acywatson 6 months ago

What's Changed

Full Changelog: https://github.com/facebook/lexical/compare/v0.14.4...v0.14.5

lexical - v0.14.4

Published by acywatson 6 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.14.3...v0.14.4

lexical - v0.14.3

Published by ivailop7 7 months ago

What's Changed

ESM

  • Fixes for ESM builds for Server-side rendering frameworks (#5737)
  • Node fork modules and 'bundler' module resolution (#5774)

Stability

  • A meaningful number of table fixes around selection, navigation, formatting and deletion
  • Merging of adjacent lists of the same type (#5803)
  • Support for CSS Zoom (#5772)

DevTools Plugin

  • Scaffolding for a DevTools Plugin (#5747)

Full Changelog

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.14.2...v0.14.3

lexical - v0.14.2

Published by ivailop7 7 months ago

lexical - v0.14.1

Published by ivailop7 7 months ago

v0.14.1 (2024-03-18)

Main Changes

ESM Support in https://github.com/facebook/lexical/pull/5618 (thanks @etrepum).

canExtractContents has been removed from TableNode in https://github.com/facebook/lexical/pull/5628 [BREAKING CHANGE]

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.13.1...v0.14.1

lexical - v0.13.1

Published by zurfyx 9 months ago

v0.13.1 (2024-01-26)

A wild console.info got into our 0.13 release...

Besides that, this small patch addresses some more issues, including Next.js server-side compatibility (thanks @2wheeh!).

What's Changed

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.13.0...v0.13.1

lexical - v0.13.0

Published by zurfyx 9 months ago

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 between lexical 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)

New Contributors (since 0.12.2)

Full Changelog: https://github.com/facebook/lexical/compare/v.0.12.2...v0.13.0


Thank you to the new and old contributors for helping us improve Lexical's reliability!

lexical - v0.12.6

Published by acywatson 9 months ago

v0.12.6 (2024-01-08)

  • Fix floating link editor on inline image caption (#5460) wnhlee
  • Revert Inserting hyperlink through toolbar doesnt open floating editor in edit mode (#5456) Acy Watson
  • Fix TextNode#createDOM types allow editor parameter in subclasses (#5425) Georgii Dolzhykov
  • docs fix outdated importDOM types in docs (#5431) Georgii Dolzhykov
  • Bug Editing a link and changing selection shows wrong link value (#5352) Syed Umar Anis
  • fix Reset compositionKey when backspacing a selection on Android where anchor and focus keys are different (#5389) Aman Harwara
  • Bug Fix added a fix for discarding multiple color picker entries on drag (#5335) Bhavya Karia
  • Remove duplicated test codes (#5429) wnhlee
  • Inserting hyperlink through toolbar doesnt open floating editor in edit mode (#5372) Syed Umar Anis
  • fix adding missing argument for sliceSelectedTextContent (#5380) Nadine Nguyen
  • Fixed a small typo (#5427) frankdiw
  • Fix insertNodes when inserting into inline elements (#5394) Brian Birtles
  • Add link to state update blog (#5423) Acy Watson
  • canInsertTextAfter exception for composition (#5378) Gerard Rovira
  • Fix insert image to new inserted table row in playground report error (#5417) frankdiw
  • Refactored findNearestListItemNode using findMatchingParent (#5419) Ajay Prakash PP
  • docs correct custom node examples (#5407) Naseem Ali
  • Fixed the error when CollapsibleTitleNode type enter key (#5416) frankdiw
  • dropdown text visibility problem fixed for medium and smaller screens (#5382) Recep ifti
  • Fix convertFromMarkdownString breakdown due to no parent (#5393) wnhlee
  • Fix bug on window.event conflict (#5391) Henry Boisgibault
  • Fix typo on test title (#5399) wnhlee
  • fix typo Contaner - Container (#5410) Philippe de Reynal
  • fix logical error in description of insertBefore parameter (#5400) spirobel
  • Featureexcalidraw resize (#5383) Recep ifti
  • Flow fix RangeSelection extends (#5377) Gerard Rovira
  • Fixed for #5162, The beginning of a TextNode with canInsertTextBefore false in (#5363) matsuyama-k1
  • PR 4 remove GridSelection from lexical core (#5293) Illia Olenchenko
  • PR 3 Removed edge-cases of GridSelection (#5291) Illia Olenchenko
  • Clear link using key shortcut bug (#5354) Syed Umar Anis
  • refactor(playground) kill ts-ignore (#5342) Aron Griffis
  • Automatic release on merge (#5347) Acy Watson
  • Improve TypeScript types by removing k string any from LexicalNode (#5223) Bob Ippolito
  • Support other formats in Collapsible Title (#5328) Ivaylo Pavlov
  • docs added exportJSON function to the ExtendedTextNode plugin code (#5338)
lexical - v0.12.5

Published by acywatson 11 months ago

v0.12.5 (2023-12-06)

  • Make subscript and superscript text formats mutually exclusive (#5317) Gry Ogam
  • PR 2 5276 PointSelection instead of GridRangeSelections (#5281) Illia Olenchenko
  • keep selection style when clicking empty editor (#5292) kyoyoung keum
  • Fix insertNodes bugs (#5325) GermanJablo
  • PR 1 Swap instance selection for BaseSelection in most cases (#5280) Illia Olenchenko
  • selectEndstart as a method of LexicalNode instead of ElementNode (#5205) GermanJablo
  • Make insertRangeAfter private (#5323) Gerard Rovira
  • Improvements in insertNodes (#5201) GermanJablo
  • Export CommandListener Flow (#5315) Gerard Rovira
  • Add 2 missing flow exports (#5314) Gerard Rovira
  • URL sanitization ClickableLinkPlugin (#5302) Yeison Daza
  • fix backspace in Android not deleting first character (#5282) Kiran Dash
  • docs improve DecoratorNode docs (#5284) Miroslav Petrov
  • Fixing nested collapsible section chevron (#5300) Ebad
  • Support HTML export overrides from config for nested editors. (#5267) Acy Watson
  • Revert Fix Autolink plugin URL recognition failures (#5275) (#5295) Acy Watson
  • Fix Autolink plugin URL recognition failures (#5275) Chinmay Disale
  • Move to new Excalidraw APIs for 0.17 update (#5277) Ivaylo Pavlov
  • Fix Resolve Cannot read properties of undefined (reading trim) issue in getSelectionStyleValueForProperty (#5271) Yeison Daza
  • Fix The number in a numbered list gets duplicated (#5253) trinhvinhtruong96
  • Fix Apply background color to multiple selected cells (#5258) Joo Hee Paige Kim
  • packagelock (#5247) Gerard Rovira
lexical - v0.12.4

Published by acywatson 11 months ago

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

lexical - v0.12.3

Published by zurfyx 11 months ago

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 (https://github.com/facebook/lexical/pull/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 (https://github.com/facebook/lexical/pull/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

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v.0.12.2...v0.12.3

lexical - v0.12.2

Published by zurfyx about 1 year ago

v0.12.2 (2023-09-08)

Changelog

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

Full Changelog: https://github.com/facebook/lexical/compare/v0.11.3...v.0.12.2

lexical - v0.12.1

Published by zurfyx about 1 year ago

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: https://github.com/facebook/lexical/compare/v0.11.3...v0.12.1

lexical - v0.12.0

Published by acywatson about 1 year ago

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%
lexical - v0.11.3

Published by ivailop7 about 1 year ago

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: https://github.com/facebook/lexical/compare/v0.11.2...v0.11.3

lexical - v0.11.2

Published by zurfyx over 1 year ago

v0.11.2 (2023-07-11)

Changelog

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.11.1...v0.11.2

lexical - v0.11.1

Published by zurfyx over 1 year ago

0.11.1 (2023-05-26)

Changelog

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

lexical - v0.11.0

Published by zurfyx over 1 year ago

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: https://github.com/facebook/lexical/compare/v0.10.0...v0.11.0

lexical - v0.10.0

Published by acywatson over 1 year ago

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