Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
MIT License
$
method notation.Full Changelog: https://github.com/facebook/lexical/compare/v0.14.5...v0.15.0
Published by acywatson 6 months ago
Full Changelog: https://github.com/facebook/lexical/compare/v0.14.4...v0.14.5
Published by acywatson 6 months ago
Full Changelog: https://github.com/facebook/lexical/compare/v0.14.3...v0.14.4
Published by ivailop7 7 months ago
Full Changelog: https://github.com/facebook/lexical/compare/v0.14.2...v0.14.3
Published by ivailop7 7 months ago
Full Changelog: https://github.com/facebook/lexical/compare/v0.14.1...v0.14.2
Published by ivailop7 7 months ago
v0.14.1 (2024-03-18)
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]
@lexical/html
to docs by @2wheeh in https://github.com/facebook/lexical/pull/5557
Full Changelog: https://github.com/facebook/lexical/compare/v0.13.1...v0.14.1
Published by zurfyx 9 months ago
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!).
Full Changelog: https://github.com/facebook/lexical/compare/v0.13.0...v0.13.1
Published by zurfyx 9 months ago
This version wraps up a major tables refactor, and includes some more bugfixes!
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):
@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
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).
commandPriority
option to LexicalMenu
and dependent components by @huw in https://github.com/facebook/lexical/pull/5123
isNodePre
Method by @nickjmoss in https://github.com/facebook/lexical/pull/5157
insertNodes
and insertParagraph
by @GermanJablo in https://github.com/facebook/lexical/pull/5002
[k: string]: any
from LexicalNode by @etrepum in https://github.com/facebook/lexical/pull/5223
%checks
from Flow types by @thegreatercurve in https://github.com/facebook/lexical/pull/5477
DecoratorNode
s being treated as block elements by @9larsons in https://github.com/facebook/lexical/pull/5371
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!
Published by acywatson 10 months ago
Published by acywatson 11 months ago
Published by acywatson 11 months ago
This release just hotfixes a circular dependency issue in v0.12.3.
Published by zurfyx 11 months ago
This minor release is not so minor! New stuff and a scroll of bugfixes.
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
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.
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!
commandPriority
option to LexicalMenu
and dependent components by @huw in https://github.com/facebook/lexical/pull/5123
isNodePre
Method by @nickjmoss in https://github.com/facebook/lexical/pull/5157
insertNodes
and insertParagraph
by @GermanJablo in https://github.com/facebook/lexical/pull/5002
Full Changelog: https://github.com/facebook/lexical/compare/v.0.12.2...v0.12.3
Published by zurfyx about 1 year ago
Full Changelog: https://github.com/facebook/lexical/compare/v0.11.3...v.0.12.2
Published by zurfyx about 1 year ago
@lexical/utils
(#4923) RajatFull Changelog: https://github.com/facebook/lexical/compare/v0.11.3...v0.12.1
Published by acywatson about 1 year ago
#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.
SELECT_ALL_COMMAND
(#4818) Chris MontroisPublished by ivailop7 over 1 year ago
Full Changelog: https://github.com/facebook/lexical/compare/v0.11.2...v0.11.3
Published by zurfyx over 1 year ago
AutocompleteNode.clone()
by @msdrigg in https://github.com/facebook/lexical/pull/4592
Full Changelog: https://github.com/facebook/lexical/compare/v0.11.1...v0.11.2
Published by zurfyx over 1 year ago
Full Changelog: https://github.com/facebook/lexical/compare/v0.11.0...v0.11.1
Published by zurfyx over 1 year ago
Arguably no major new features but this version comes with substantial bugfixes! Most notably:
createRectsFromDOMRange
for Mark-like plugins(you can read more on these on the changelog below)
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
)
MarkNode::clone
node
arg type to this
by @potomak in https://github.com/facebook/lexical/pull/4363
Full Changelog: https://github.com/facebook/lexical/compare/v0.10.0...v0.11.0
Published by acywatson over 1 year ago
@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