Skip to content

Releases: facebook/lexical

v0.7.7

03 Feb 16:26
ecf8edb
Compare
Choose a tag to compare
  • Add list-style-position:inside (#3814) John Flockton
  • Fix is selected noop (#3805) James Abels
  • Add createParentElementNode method on LexicalNode to fix copy/paste issues with clipboard (#3800) John Flockton
  • Remove innerHTML injection from table selection (#3804) John Flockton
  • Better tab handling (#3770) James Abels
  • Fix line delete bug in history (#3769) James Abels
  • List node export dom with css classes (#3801) Maksim Horbachevsky
  • Add highlight TextFormatType (#3583) moy2010
  • Add check that target is not the root node (#3797) John Flockton
  • Fix $generateJSONFromSelectedNodes with a custom selection passed in (#3749) William Wang
  • Improve selection docs (#3798) Dominic Gannaway
  • Fix copy paste wrong order in TableOfContents (#3786) Daniel Voigt
  • fix(lexical-playground): fix bugs related to ComponentPickerPlugin (#3787) Shota Shimizu
  • fix: styling information of paragraph are missing while importing dom (#3771) Rajatava Mukherjee
  • Stabilize WeakMap in NodeEventPlugin (#3780) James Abels
  • Clean up wonky logic (#3768) Dominic Gannaway
  • Remove deprecated modules from core code base (#3729) John Flockton
  • Edit CSS to fix marker alignment issue in Safari (#3753) John Flockton
  • Move horizontal rule plugin to lexical/react (#3751) John Flockton
  • Fix equation transformer in Playground (#3758) Leonardo E. Dominguez
  • Fix list normalization on HTML paste. (#3757) Acy Watson
  • Remove preventDefault from $copyToClipboardEvent (#3742) John Flockton
  • fix(lexical-playground): NewTablePlugin is not draggable (#3747) Shota Shimizu
  • Attach checkbox click listeners to editor root element instead of document (#3738) John Flockton
  • Update listener in toc (#3726) Stepan Bolotnikov
  • Close Excalidraw only on Escape key down (#3737) John Flockton
  • fix: type-ahead menu scroll problem (#3672) huang yao
  • Tweak CodeNode to allow for overrides (#3731) James Abels
  • Discard empty TextNode that can creep into appendJSON (#3695) James Abels
  • Add config to updateDOM in ParagraphNode (#3693) James Abels

v0.7.6

10 Jan 14:31
168f0d4
Compare
Choose a tag to compare
  • Fix typo in LexicalAutoLinkPlugin code example (#3685) Lorenzo
  • updated typo (#3697) Christopher Tran
  • Add width and height to serialized image nodes (#3684) Ebad
  • fix: force to set TextNode's content when compositionKey is invalid (#3679) Conatus
  • Fix: convert html 's' tag to node for strickethrough format is missing (#3673) hun
  • Fix bug with ArrowDown/ArrowUp in RichTextPlugin (#3676) Dominic Gannaway
  • Remove ts-ignore for createContext (#3671) yf-yang
  • Fix bug in reconciler sub-tree text content cache (#3669) Dominic Gannaway
  • Hide commenting controls on mobile screen sizes (#3667) Dominic Gannaway
  • Fix theming docs (#3668) Dominic Gannaway
  • update: change character_limit to be passed as a props( maxlength) (#3649) 0x harry
  • Add TabIndentationPlugin to playground. (#3632) Acy Watson

v0.7.5

23 Dec 20:51
31bc120
Compare
Choose a tag to compare
  • selectionChange fix (#3623) Dominic Gannaway
  • Add docs for root listener (#3625) Acy Watson
  • Add docs re: working with DOM Events (#3624) Acy Watson
  • background-repeat: no-repeat; (#3621) Aloento
  • Add logic in isSelectionCapturedInDecoratorInput for contentEditables (#3622) Dominic Gannaway
  • Fix bug in convertTextFormatElement (#3618) Dominic Gannaway
  • Add size limit report (#3600) Maksim Horbachevsky
  • Allow focus/blur propagation in useYjsFocusTracking (#3617) Dominic Gannaway
  • Add missing changelog for 0.7.4 (#3598) John Flockton
  • Fix getSelectedNode logic for forward selection (#3609) moy2010
  • Fix typo in documentation (#3614) Jeremy Bernier
  • Fix bad rebase (#3607) Dominic Gannaway
  • Escape plus signs of the tag in MarkdownImport, fixes #3596 (#3599) Teemu Pöntelin
  • Add HTML paste support for checklists (#3579) Acy Watson
  • Preserve empty parent during replacement (#3595) Maksim Horbachevsky

v0.7.4

20 Dec 11:11
Compare
Choose a tag to compare
  • Add missing usages of $applyNodeReplacement (#3592) John Flockton
  • Fix import issue with line break nodes (#3593) John Flockton
  • Allow LinkNode to be replaced by custom node, fix bug in #3367 (#3588) Nhan Ho

v0.7.3

18 Dec 12:25
d6b9e6b
Compare
Choose a tag to compare
  • Fix bold italic exportDOM (#3584) Dominic Gannaway
  • Fix copy/paste issue with line breaks within paragraphs (#3581) John Flockton
  • Fix various collaboration cursor bugs (#3582) Dominic Gannaway
  • Update PlaygroundEditorTheme.css (#3553) pavan-reddy-28
  • More extensive fixes for Lexical in iframes (#3578) Dominic Gannaway

v0.7.2

17 Dec 15:46
8de8b45
Compare
Choose a tag to compare
  • Use the actual node count rather than the dirty node count (#3569) Dominic Gannaway
  • Utilize getParentElement internally when traversing up the DOM tree (#3576) Dominic Gannaway
  • check read only flag during $setSelection (#3572) yf-yang
  • Fix iframe selection issues (#3573) Dominic Gannaway
  • Fix left arrow selection on list nodes (#3575) Dominic Gannaway
  • fix: deleting forward on the last decorate node (#3568) Oleksii Piatetskyi
  • Image gets stuck in resizing state fix (#3562) (#3565) Sharat Chandar M
  • Fix flow again (#3566) Acy Watson
  • Fix placeholder text for custom Paragraph Nodes (#3557) moy2010
  • Disable lint rule in composition test (#3552) Acy Watson
  • Add $wrapNodes back to flow (#3551) Acy Watson
  • [Playground] Support clicking on links with middle mouse button (#3547) zeitstein
  • Fix bug 3535 (#3537) lizhu68
  • docs: typo fix (#3544) Bryan Ricker
  • Don't throw if getPreviousSiblings can't find a parent (#3543) Acy Watson
  • Change mousedown event type to fix selection Chromium bug on Android (#3541) John Flockton
  • Various fixes in $wrapNodes (#3234) EgonBolton
  • Add missing changelog entry to 0.7 (#3533) Dominic Gannaway
  • Remove VERSION (#3531) John Flockton

v0.7.1

11 Dec 11:31
d9b73a5
Compare
Choose a tag to compare

Contains several small bug fixes from the Lexical 0.7.0 release.

  • Fix paste for LexicalLinkPlugin (#3528) Dominic Gannaway
  • RTL fix for checkbox (#3529) shiva-Aluri
  • Add demos section to the navbar (#3507) akmarzhan1
  • Fix lexical-offset (#3526) Dominic Gannaway
  • Add missing Flow type for indentation plugin (#3527) John Flockton
  • Docs: fix "node" type in "Node Overrides" example code (#3525) Chris Montrois
  • Fix small Flow error (#3523) John Flockton

v0.7.0

11 Dec 09:16
8168ba9
Compare
Choose a tag to compare

v0.7.0 (2022-12-09)

Lexical 0.7 includes some breaking changes, including:

  • Removal of $cloneContents from @lexical/selection
  • Changes to PlainTextPlugin and RichTextPlugin with regards to how placeholders are handled
  • Pressing tab with the RichTextPlugin no longer indents by default, use the LexicalTabIndentationPlugin for this behavior.
  • The unstable helper function unstable_convertLegacyJSONEditorState has been removed. This was always meant to be a temporary work-around to allow developers to convert their formats to the new JSON format rather than using the actual editor state internals directly.

Lexical 0.7 includes performance and usability improvements. Notably, Lexical has a new internal architecture that allows for much better performance with large documents of content. Lexical also now provides a way to handle selection between blocks of content by providing an emulated cursor (make sure you add a blockCursor theme to your editor config to use it).

  • Revert "Fix exportJSON return types for ParagraphNode and LineBreakNode" (#3521) John Flockton
  • Move default language setting to Tokenizer (#3368) mizuno
  • Improve LexicalTreeView around large EditorStates (#3515) Dominic Gannaway
  • Improve insertBefore, insertAfter, replace selection restoration logic (#3516) Dominic Gannaway
  • ⏸ [0.7] Switch the internal architecture to utilize doubly linked lists (#3480) Dominic Gannaway
  • Add missing annotation to internal field of Textnode (#3514) John Flockton
  • ⏸ [0.7] Remove indentation keyboard shortcuts in RTE set up (#2855) John Flockton
  • Fix dom-less reconciliation (#3506) Maksim Horbachevsky
  • ⏸ [0.7] Add block emulated cursors (#3434) Dominic Gannaway
  • ⏸ [0.7] Customize Placeholder visibility (#3379) Gerard Rovira
  • ⏸ [0.7] Remove IntentionallyMarkedAsDirtyElement from public API (#3422) John Flockton
  • ⏸ [0.7] Remove $cloneContents (#3483) Dominic Gannaway
  • Update Playwright (#3511) Dominic Gannaway
  • Improve Auto Embed (#3505) Tyler Bainbridge
  • Skip tab e2e test in webkit (#3512) Dominic Gannaway
  • Add poll and speech-to-text plugin examples (#3484) akmarzhan1
  • Fix typedef for wrapNodes (#3492) Maksim Horbachevsky

v0.6.5

05 Dec 21:38
571e995
Compare
Choose a tag to compare

v0.6.5 (2022-12-05)

  • Fix mutation listener for when DOM moves occur (#3493) Dominic Gannaway
  • Fix decorator input selection (#3491) Dominic Gannaway
  • Inform users that they need to install headless (#3487) Phillip Burch
  • Revert changes (#3481) Dominic Gannaway
  • Improve selection performance on large updates (#3478) Dominic Gannaway
  • Support TypeScript language in code nodes (#3469) Jonas Bengtsson
  • Improve element splicing and node removal (#3454) Dominic Gannaway
  • Add start and end as format types (#3472) John Flockton
  • Fix test for collab (#3471) Dominic Gannaway
  • Add e2e test for text replacement (#3470) Dominic Gannaway
  • Markdown decorators export fallback to text content (#3464) Maksim Horbachevsky
  • Update conditional statement in LexicalAutoFocusPlugin to the same logic as in LexicalSelection (#3466) John Flockton
  • Add Node Replacement Docs (#3462) Acy Watson
  • Inherit headless flag from parent editor (#3459) Maksim Horbachevsky
  • Change heading to paragraph when heading is empty (#3455) John Flockton
  • Show caret while drag&drop (#3300) Gerard Rovira
  • Fix superscript & subscript not being converted from html string (#3453) Rajatava Mukherjee

v0.6.0

31 Oct 19:10
291b57a
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-release

Happy halloween!

108 commits! That's 66% more than 0.5.0. This release comes with many many fixes. But let's go over the highlights first:

Nightly releases

We just introduced a semi-automated release process for those of you who want to be at the cutting edge (looking at you Discord folks). New versions with the latest on the main branch will be pushed Monday through Friday.

You can find on NPM tagged with next (npm i lexical@next)

These will likely be more unstable, informal and might contain undocumented breaking changes. That said, that's what we do internally at Meta where we sync the Lexical GitHub repository onto Mercurial multiple times per week.

Collapsible container

The possibility to do spoiler containers has been a highly requested feature. We prototyped an efficient React-agnostic playground plugin that you can find on the playground (CollapsiblePlugin). It may eventually make it to @lexical/react

Screen.Recording.2022-10-31.at.8.22.21.AM.mov

Drag, drop & paste

Having seen many and very similar drag & drop implementations at Meta, we have come to the conclusion that dragging, dropping and pasting media is a fundamental piece of rich text. Hence, it is now built-in into the RichTextPlugin and you no longer have to implement your own event handling.

198162758-c02516c7-3ed5-45ed-b4a1-7bdd177f9a2d.mov

See the DragDropPaste playground plugin for an example on how to validate and insert your media nodes into the editor.

Failsafe DecoratorNodes

Safety first! React Decorators will now be independently wrapped with an ErrorBoundary and Suspense.

We found that it is very easy to miss either of them when implementing custom DecoratorNodes, and when either is missed and the component either crashes or suspends this causes the editor to be unusable.

195731936-a30b2397-9bf8-4f1c-97d7-9893b083ed98.mov

Breaking change: you now have to provide an ErrorBoundary to RichTextPlugin (you can use ours).

import {LexicalErrorBoundary} from 'lexical/@react/LexicalErrorBoundary';
<RichTextEditor ... ErrorBoundary={LexicalErrorBoundary} />

Editor namespace on TreeView

From internal and open-source feedback, TreeView has become an indispensable tool to work with Lexical. It gives you the ability to glance over the current state and understand how plugins work with each other.

We added the namespace and the editable state, which we feel is important to complement the read-only mode version of Lexical.

Screen Shot 2022-10-31 at 10 06 53 AM

Note that, while you can convert to HTML for the read-only view, Lexical size and the possibility to have high-fidelity rendering at no cost makes it a perfect candidate for to place in a read-only mode.

In any case, @im-adithya continues the work on the cross-browser extension, what will be the preferred and most complete approach for day-to-day development.

And some more

  • Added the discrete property to editor.update to perform synchronous non-batched updates. Synchronous updates are often terrible performance-wise but there are concrete occasions where they can come useful. TL;DR be careful!
  • You can now have custom collaboration cursor color.
  • Copying a Node and Grid selection (like one or multiple images) now works with Firefox.
  • Various fixes for tables, remarkably mouse selection which was acting weird sometimes.

Changelog

Read more