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.9.2

Published by acywatson over 1 year ago

0.9.2 (2023-04-14)

  • Update codes.json (#4320) Gerard Rovira
  • Missing table types (#4302) Gerard Rovira
  • Fix cursor changing to default when resizing image (#4317) (#4318) Mohit Singh Chauhan
  • Persist files and scene state in Excalidraw plugin (#4299) Ivaylo Pavlov
  • Fix crash on prettier formatting fail (#4310) Syed Umar Anis
  • YouTube embed: use more privacy-friendly youtube-nocookie.com instead of youtube.com (#4282) Alessio Gravili
  • Fix flowtypes for insertBefore/after (#4245) Maksim Horbachevsky
  • Fix excluded property imports (#4287) Acy Watson
  • Allow excluding specific properties from collab syncing via plugin (#4275) Acy Watson
  • Update tables.md (#4278) Gerard Rovira
  • Refactor Check for mention match function (#4277) Aleksandr Kiliushin
  • Replace canExtractContents with ShadowRoot check (#4276) Gerard Rovira
  • Ignore script nodes in HTML deserialization (#4249) Acy Watson
  • Fix Clear Formatting (Fixes #4188) (#4204) Ivaylo Pavlov
  • Add try catch around katex renderer (#4260) John Flockton
  • last table row delete throwing error (#4270) Aman Bansal
  • Upgrade Flow to 0.2 (#4264) Gerard Rovira
  • Cell merge backwards compatiblity 2 (#4268) Gerard Rovira
  • Cell merge backwards compatiblity (#4267) Gerard Rovira
  • fix get text selectRect error (#4263) yjh
  • Loosen node and version types (#4143) John Flockton
  • Bugfix: Comment popup closes when cursor hovers over table (#4228) Ben Carleton
  • isEditable is true on first render even if editor initiated with false (#4251) Aman Bansal
  • Fix TableCellNode import/exportJSON (#4259) Gerard Rovira
  • Flow: table missing methods (#4261) Gerard Rovira
  • Fix insertTableColumn when rowSpan > 1 (#4258) Gerard Rovira
  • Bugfix: Floating tool bar not responsive in tables (#4237) Ben Carleton
  • pasting text on input was creating a new paragraph node instead of ad… (#4246) Aman Bansal
  • Excalidraw Component fixes (#4252) Ivaylo Pavlov
  • Preserve content with merging cells (#4242) Gerard Rovira
  • Support select all for node selection (#4233) Maksim Horbachevsky
  • Fix TypeaheadMenuPlugin scrollIntoView to not rely on external class (#4238) Dragoș Străinu
  • Ignore __indent in list deserialization (#4241) Acy Watson
  • Revise Excalidraw dependency (#4234) Gerard Rovira
  • Table toolbar foundation (#4182) Gerard Rovira
  • Restore MD selection (#4232) Gerard Rovira
  • Fixed aria-label typo (#4229) Hao Luo
  • Export $hasUpdateTag (#4216) Alma Madsen
  • Fix incorrect placement of Auto Embed (#4192) wangqi
  • Fix bad selection shift at boundary (#4219) Gerard Rovira
  • Improve Documentation - multiple modules (#4166) Harry Sanders
  • Unmerge cell (#4212) Gerard Rovira
  • Only allow numbers in TablePlugin row / column number input (#4201) Alessio Gravili
  • Create fragment attached to the doc (#4186) Maksim Horbachevsky
  • Add a title to the link node to support titles in markdown (#4161) themagickoala
  • Fix table insertion (#4180) Gerard Rovira
  • added trash button to floatingLinkEditor plugin to toggle the link to… (#4209) Aman Bansal
  • Delete unused LinkPreview.css (#4200) Alessio Gravili
  • Use 'padding' shorthand CSS rule (#4198) Alessio Gravili
  • Add missing flow file (#4193) Maksim Horbachevsky
lexical - v0.9.1

Published by zurfyx over 1 year ago

v0.9.1 (2023-03-24)

  • Explicit E2E_BROWSER on E2E runs (#4179) Gerard Rovira
  • Fix tables Webkit e2e (#4175) Gerard Rovira
  • Remove unused convertToMarkdown file (#4169) themagickoala
  • Improve markdown transformers (#3886) Godefroy
  • Iterate through the live NodeList instead of copying to an array in $generateNodesFromDOM (#4164) Acy Watson
  • Bump Excalidraw to v0.14.2 (#4153) Ivaylo Pavlov
  • Fix table stealing selectionchange (#4162) Gerard Rovira
  • Improve Documentation #2845 - lexical/selection (#4140) Harry Sanders
  • UX: Floating link editor: better positioning (#4158) Alessio Gravili
  • DecoratorNode not disabling placeholder at root (#4147) Harry Sanders
  • Color picker - fixes #4127 (#4146) Harry Sanders
  • Validate against infinite loop in ListItemNode.setIndent (#4120) Acy Watson
  • Paste merged celled table (#4116) Gerard Rovira
  • Add md import/export tests, fix numbered lists pasting (#4123) Maksim Horbachevsky
  • Bump webpack from 5.75.0 to 5.76.0 (#4128) dependabot[bot]
  • fix: drag-over event on windows (#4125) 子瞻 Luci
  • Remove link preview (#4122) John Flockton
  • Add a function to create a LinkMatcher based on a RegExp (#3972) Karibash
  • Revise padding for smaller res (#4112) Gerard Rovira
  • Catch failures in parseEditorState (#4109) Acy Watson
  • Improve Documentation #2845 - lexical/list (#4107) Harry Sanders
  • Fix tables Collab E2E (#4117) Gerard Rovira
  • Fix ShadowRoot + X insertNode (#4115) Gerard Rovira
  • Overflow of logos of action items in Lexical Playground (#4096) 7gaurab_khanal
  • Remove columns w/ span support (#4093) Gerard Rovira
  • Remove rows w/ span support (#4078) Gerard Rovira
  • Table insert column w/ span support (#4074) Gerard Rovira
  • Table insert row w/ span support (#4063) Gerard Rovira
  • Use broader return types in HorizontalRuleNode (#4097) Chris Montrois
  • Add focus tag to editor.focus (#4092) Dragoș Străinu
  • Improve Documentation #2845 - lexical/utils (#4047) Harry Sanders
  • Fix toolbars that shouldn't appear in certain cases (#4077) Warren19
  • Fixed reference to old addUpdateListener method in transforms doc (#4094) Kevin Ansfield
  • Pass tags to onChange for LexicalOnChangePlugin (#4091) Dragoș Străinu
  • Fix tables E2E (#4090) John Flockton
  • Change default indent to 40px (#4025) EgonBolton
  • Update CODEOWNERS (#4089) John Flockton
  • Updated InsertTableDialog UX (#4082) Brandon
  • Export getNearestEditorFromDOMNode (#4079) Gerard Rovira
  • Fix unresponsive resize handle in Safari (#4081) Brandon
  • Sticky toolbar to assist in editing large content (#4076) Brandon
  • Fix table RangeSelection test (#4061) Gerard Rovira
  • Trim table e2e assert (#4060) Gerard Rovira
lexical - v0.8.1

Published by thegreatercurve over 1 year ago

  • Clone objects from the CSS cache before mutating them (#3945) Brian Birtles
  • added docsfeature-button in lexical playground issue#3918 (#3935) Mohan Sai Potla
  • fix: change from to (#3942) Asim Kattum Thazha
  • Added Chinese character support for native webkit (#3846) Annabelle Almås
  • Fix autocapitalization (#3881) Gerard Rovira
  • Expand the actionable empty playground editor text area via flex (#3883) Brandon
  • Fix toggling styles on collapsed selections with (#3922) Brian Birtles
  • Remove condition for history merge on null prev selection (#3914) Acy Watson
  • fix: change tablecell return type for TableCellNode (#3925) Sebastien Ahkrin
  • Align types for createEditor APIs (#3928) Acy Watson
  • Remove instanceof type checks against HTMLElement and subtypes (#3913) Acy Watson
  • Fix small lint error breaking main (#3924) John Flockton
  • Update plugins.md (#3926) dimitarbikov
  • Added support for Java & C++ (#3884) Vignesh gupta
  • Add fixme annotation to flaky collab tests (#3916) Acy Watson
  • Playground: fix issue with floating link editor plugin not closing (#3904) Rich
  • Further tweaks to format/style selection (#3895) Dominic Gannaway
  • Add KEY_DOWN_COMMAND (#3878) Dominic Gannaway
  • Remove draggable block plugin on mobile devices (#3875) John Flockton
  • Close color pickers on select (#3874) John Flockton
  • Fix ContentEditable types for internal use (#3868) John Flockton
  • Fix v0.8.9 typo in changelog, should be v0.8.0 (#3869) Joel Besada
lexical - v0.8.0

Published by thegreatercurve over 1 year ago

What's Changed

lexical - v0.7.9

Published by thegreatercurve over 1 year ago

Fix bad import into core (https://github.com/facebook/lexical/pull/3861) Dominic Gannaway
Add import/export DOM methods to YouTubeNode and improve EquationNode (https://github.com/facebook/lexical/pull/3835) Pervez Ali
Fix backspace regression (https://github.com/facebook/lexical/pull/3862) Dominic Gannaway
Fix restoreEditorState (https://github.com/facebook/lexical/pull/3856) Dominic Gannaway
Add more configuration for heading in INSERT_TABLE_COMMAND (https://github.com/facebook/lexical/pull/3843) Sebastien Ahkrin
perf(playground): load prettier and its parsers on demand in code block (https://github.com/facebook/lexical/pull/3637) Shanmughapriyan

lexical - v0.7.7

Published by trueadm over 1 year ago

  • 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
lexical - v0.7.6

Published by trueadm almost 2 years ago

  • 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
lexical - v0.7.5

Published by trueadm almost 2 years ago

  • 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
lexical - v0.7.4

Published by thegreatercurve almost 2 years ago

  • 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
lexical - v0.7.3

Published by trueadm almost 2 years ago

  • 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
lexical - v0.7.2

Published by trueadm almost 2 years ago

  • 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
lexical - v0.7.1

Published by thegreatercurve almost 2 years ago

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
lexical - v0.7.0

Published by thegreatercurve almost 2 years ago

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
lexical - v0.6.5

Published by trueadm almost 2 years ago

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
lexical - v0.6.0

Published by zurfyx almost 2 years ago

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

https://user-images.githubusercontent.com/193447/199079683-a065cc72-f526-42d6-a8c2-2f4fe6640ba5.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.

https://user-images.githubusercontent.com/193447/199079730-c9e6182c-64bd-4329-b536-9524c2fb3e09.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.

https://user-images.githubusercontent.com/193447/199079773-f132645e-1822-497d-9768-b1694e688c7e.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

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.5.0...v0.6.0


Thank you open-source community for helping us shape yet another version! Happy halloween and back to coding 👨‍💻

lexical - v0.5.0

Published by zurfyx about 2 years ago

v0.5.0 (20 days after v0.4.0) comes with a meaty set of features, API refinements and bugfixes.

Draggable blocks

One of the most beloved features of Notion is the ability to seamlessly move blocks within the same document. @LuciNyan has ported this behavior to Lexical under the DraggableBlockPlugin name. You can check it out in our playground!

https://user-images.githubusercontent.com/22126563/190201193-3784dc18-7214-4b48-afba-ade0b5aa288d.mov

LexicalTablePlugin makes its way to Meta production

We started our tables (@lexical/react/LexicalTablePlugin) development at the start of the year, one of the most ambitious and complex plugins we have built for rich text. We have blocked a good amount of time during this past month to work with multiple internal teams to identify and squash most of these (10+) high-pri bugs that make the experience unideal and we believe they are now in a good shape to meet their first internal users.

Screen Shot 2022-09-23 at 3 08 54 pm

Shadow Root

We have introduced a new advanced concept for Lexical ElementNodes: [Shadow Root](https://lexical.dev/docs/api/classes/lexical.ElementNode#isshadowroot). A Shadow Root is a Node that behaves like a root (we stole the name from Shadow DOM). This method enables you to have complex deep rich text hierarchies where children node shouldn't see beyond the parent. For example, the cell node content.

$insertNodes with NodeSelection and GridSelection support

We introduced a seamless way to handle node insertion. We bundled {rangeSelection/nodeSelection/gridSelection}.insertNode into just one method: $insertNodes. We also added insertNodes support for NodeSelection and GridSelection that was previously not supported.

https://user-images.githubusercontent.com/193447/178761488-d39987f7-2a90-4604-b4fc-dfbf57178f35.mov

Various API changes

  1. PlainTextPlugin and RichTextPlugin will no longer take an initialEditorState. We found that this is unintuitive to handle nested editors and harder to control SSR-enabled pages. Instead, MLCComposer will take and apply the initialEditorState on editor creation
  2. We killed INERT nodes. We found them cumbersome to use, not accessible and they didn't meet the requirements for our one and only use case (AutocompletePlugin) where private node data is required. Instead, the recommended approach for now is to use a DecoratorNode.
  3. We deprecated the Grid API. The future of the Grid API is uncertain but if there's something we know is that it isn't a good fit in the lexical package, it serves a very specific use case and it's redundant for plain text.
  4. Killed isTopElement in favor for isInline on ElementNodes to reflect what they do better.
  5. And some more (see [0.5] prefixed in the list below).

Lots of bugfixes

  • Formatting, composition, MD, etc. (see changelog below for a complete list).

Release automation: nightly releases

We listened to your (mostly Discord) feedback, you want to have the latest, more frequently, especially when some of you are heavily involved into the development and growth of the Lexical framework.

The reality is, we didn't choose to postpone releases for 2 weeks. It has mostly been a lack of automation and making sure we bundle breaking API changes to avoid developer churn.

We know that there's no one-size-fits-all when it comes to developers, and that's why we want to offer different ways to play with the library, what we have now, a slow-ish but less time-consuming (for you) release cycle but also offer nightly releases that would happen automatically once per day and would include the very latest of the development.

The work is still under development but we plan to start this soon, stay tuned!

Changelog

New Contributors

Full Changelog: https://github.com/facebook/lexical/compare/v0.4.1...v0.5.0


Thank you open-source community for your help shaping this brand new release, either via direct PR contributions, feedback or bug reports!

lexical - v0.4.0

Published by acywatson about 2 years ago

Breaking Changes

Renamed isReadOnly API to isEditable

editor.isReadyOnly -> editor.isEditable()
editor.setReadyOnly -> editor.setEditable()
editor.registerReadOnlyListener -> editor.registerEditableListener()
editor config { readOnly: true } -> { editable: boolean }

https://github.com/facebook/lexical/pull/2912

Markdown Transformers Require Dependencies

The "dependencies" property is now required for custom markdown Element and TextMatch Transformers. It takes an array of LexicalNode subclasses and
asserts that they're available in the editor when transforms are registered.

https://github.com/facebook/lexical/pull/2910

Selection Updates when isEditable is false (previous ReadOnly mode)

Lexical will now track and update selection in response to DOM selectionchange events when editor.isEditable is false. This is necessary for enabling some behavior
such as commenting via marks, but may cause other indirect changes such as update listeners firing when they didn't previously.

  • Ensure editor states are cloned if read only (#2936) Dominic Gannaway
  • Prevent nested editor event duplication (#2935) Dominic Gannaway
  • Avoid preventing default for copy events when there is no selection (#2930) Dominic Gannaway
  • Non-Editable Mode Playground Improvements (#2927) Acy Watson
  • fix: do not import LexicalTypeaheadMenuPlugin from src folder (#2928) Eric Charles
  • Change read only mode API to editable mode (#2912) Dominic Gannaway
  • Fix typo (#2925) Tjaart van der Walt
  • Remove redundant readonly checks. (#2921) Acy Watson
  • allow selection in readonly mode (#2920) Acy Watson
  • Remove $getEditor (#2919) Dominic Gannaway
  • Use window of current default view (#2918) Dominic Gannaway
  • Fix bad CSS on content editable container (#2917) Dominic Gannaway
  • Ensure we only mutate a non-readonly editor state (#2915) Dominic Gannaway
  • Fix failing build (#2916) John Flockton
  • Read only validation server (#2899) Dominic Gannaway
  • Add serialized node type exports (#2914) Matthew Lin
  • Provide markdown plugin node dependencies (#2910) Dominic Gannaway
  • Fixed typo (#2908) Heesung Jang
  • Add Flow Types for AutoEmbedPlugin and TypeaheadPlugin (#2904) Tyler Bainbridge
  • Fix link pasting (#2903) Maksim Horbachevsky
  • Attempt transform of NodeSelection to RangeSelection on mouseDown (#2901) Gerard Rovira
  • chore: add e2e tests for maxlength plugin (#2478) Adithya Vardhan
  • Added sanitizer to FloatingLinkEditor (#2900) Heesung Jang
  • Rename website folder (#2902) John Flockton
  • remove unnecessary text append (#2898) John Flockton
  • Fix Lexical package main entry points (#2897) Dominic Gannaway
  • Fix overriding keyboard controls on internal decorator (#2895) Dominic Gannaway
  • Allow code highlighting to run without active selection (#2891) Maksim Horbachevsky
  • Fix editor content clipping bug (#2890) Dominic Gannaway
  • LexicalTypeaheadMenuPlugin - Increase priority for keyboard commands (#2885) Theo Tillberg
  • Remove redundant css property (#2888) Adam Kona
  • Playground: Fix collab connect/disconnect toggling (#2887) Maksim Horbachevsky
  • Improve heuristics around node selection and keyboard navigation (#2884) Dominic Gannaway
  • Don't merge history entries from different editors (#2873) Acy Watson
  • Exported DEFAULT_TRANSFORMERS array in react LexicalMarkdownShortcutPlugin (#2878) Kevin Ansfield
  • Replaced addTransform with registerNodeTransform in transforms doc (#2882) Kevin Ansfield
  • add example for additional nodes in plugin (#2879) Stefan Huber
  • add the corresponding import to react doc (#2881) Stefan Huber
  • Fix playground visual styling (#2876) Dominic Gannaway
  • chore(deps): bump minimist in /packages/lexical-website-new (#2744) dependabot[bot]
  • chore(deps): bump terser from 5.14.1 to 5.14.2 (#2869) dependabot[bot]
  • Change linebreak node handling in insertNodes (#2857) Acy Watson
  • Add some React Docs (#2858) Acy Watson
  • fix delete backward bug (#2870) Dominic Gannaway
  • add watch mode for auto-gen doc comments in dev (#2859) Acy Watson
  • Update package-lock.json (#2866) ANDRI H.U
  • Update package-lock.json (#2865) ANDRI H.U
  • Fix issue with emoji (#2853) John Flockton
  • Adjust Typeahead Styles (#2846) Tyler Bainbridge
  • revert inadvertent change (#2849) Acy Watson
  • Fix small type issue (#2847) John Flockton
  • Wider (#2848) John Flockton
  • Add autogenerated TypeDoc docs (#2837) Acy Watson
  • fix: set cursor grab when image can be dragged (#2831) 子瞻 Luci
  • fix(lexical-playground): two issues with scrolling-related scenarios (#2724) 子瞻 Luci
  • fix: add fallback for code formatting (#2833) Adithya Vardhan
  • rename local variables (#2840) Acy Watson
  • fix broken links in docs (#2839) Reid Barber
  • Fixing grammar on RootNode documentation (#2838) Aaron Freeland
  • fix: transfer format and indent info on wrap (#2832) Adithya Vardhan
  • fixed getStyleObjectFromRawCSS to handle css values with a colon (#2814) Hayden Warmington
  • Add Panel to Display Props for DevTools Nodes (#2803) Will

New Contributors (THANK YOU!)

Full Changelog: https://github.com/facebook/lexical/compare/v0.3.9...v0.4.0

lexical - v0.3.9

Published by zurfyx about 2 years ago

0.3.9 (August 11, 2022)

Most notably:

  • Added playground Figma embed and AutoEmbed plugin
  • LinkNode target and rel support
  • Many bugfixes

Commits:

  • No nullish LinkNode props (#2818) Gerard Rovira
  • Fix collapsed selection on links (#2817) Gerard Rovira
  • prevent button from submitting forms (#2811) Gerard Delmàs
  • Fixed flow return type for TableOfContents plugin (#2802) Karam Qaoud
  • Update editor-state.md (#2808) William Cary
  • Fix nested editors in collab (#2781) Dominic Gannaway
  • chore: add some declare global (#2804) 子瞻 Luci
  • Fix selection adjustment after text match transformer (#2795) Maksim Horbachevsky
  • Inject DevTools Script in Browser Extension (#2778) Will
  • Fix inserting nodes next to top level decorators (#2796) Maksim Horbachevsky
  • chore(auto-link-plugin): fix invariant message for node registration check (#2790) Eric Charles
  • Fixing comments list scrolling issue (#2789) Ebad
  • Fix internal build error (#2787) John Flockton
  • fix: dropdown icon css (#2786) Adithya Vardhan
  • chore: Move useCollaborationContext to dedicated file (#2777) Thomas Sauques
  • chore(lexical-playground): typos, improved build (#2780) Yaroslav Kiliba
  • make importJSON static in test node (#2784) Acy Watson
  • fix(lexical): ts expect error (#2776) 子瞻 Luci
  • Fix documentation typos (#2774) Lyle Denman
  • fix: Single anchor element per LexicalTypeaheadMenuPlugin instance (#2768) Thomas Sauques
  • Node/GridSelection docs (#2773) Gerard Rovira
  • Add Figma Embed to Playground (#2705) Tyler Bainbridge
  • Selection#formatText to retain selection and handle all text nodes (#2770) Maksim Horbachevsky
  • Fixed scrolling bar view (#2772) Karam Qaoud
  • Add LexicalAutoEmbedPlugin and (Playground)AutoEmbedPlugin. (#2704) Tyler Bainbridge
  • Bug: Undo command after creating a Quote removes text after Quote element (https://github.com/facebook/lexical/issues/2750) (#2767) Alexandru Pavaloi
  • Handle insertTranspose for beforeinput event (#2764) Maksim Horbachevsky
  • Fix selection format for empty paragraphs (#2759) Maksim Horbachevsky
  • Remove unused keys from evens and utils (#2763) John Flockton
  • chore: fix aria-label typo (#2762) 子瞻 Luci
  • feat: Replace select with dropdown for code (#2761) 子瞻 Luci
  • Fix typo in community page (#2760) Joshua Chen
  • Add initial editor state for collab example (#2749) Maksim Horbachevsky
  • Table of contents style improvements (#2743) Karam Qaoud
  • Highlight DOM Nodes onHover of Lexical DevTools Node (#2728) Will
  • Tighten check on top level decorator nodes (#2746) John Flockton
  • Remove unused markdown functions (#2747) John Flockton
  • feat: Replace select with dropdown for font size and font family (#2441) Adithya Vardhan
  • fix: Verify if there are text nodes before continue (#2616) Nahuel Veron
  • Convert pasted Google Docs Title text into a Heading (#2729) Acy Watson
  • Remove isCollapsed from selection onClick (#2727) John Flockton
  • fix: cross button css in poll node (#2742) Adithya Vardhan
  • fix: getTopLevelElement for decoratorNode (#2741) Adithya Vardhan
  • fix: timeoutId type (#2735) Shanmughapriyan S
  • fix: some typo (#2737) 子瞻 Luci
  • docs: readme improvements (#2734) GJunior
  • Bug: typo in Documentation. It should be ReactNode instead of React (https://github.com/facebook/lexical/issues/2731) (#2732) Alexandru Pavaloi
  • Added table of contents documentation (#2720) Karam Qaoud
  • Fix: Minor Typo on Lexical Playground ActionsPlugin (#2717) Yamil García Hernández
  • Excalidraw fixes (#2711) John Flockton
  • Resolve selection for orphan selected children (#2677) Gerard Rovira
  • feat(lexical-playground): prettier code (#2688) 子瞻 Luci
  • Revert "Add E2E test for TableOfContentsPlugin (#2675)" (#2708) Gerard Rovira
  • Add E2E test for TableOfContentsPlugin (#2675) Karam Qaoud
  • OnChangePlugin ignoreInitialChange -> ignoreHistoryMergeTagChange (#2706) Gerard Rovira
  • feat: Link node with target and rel (#2687) Andriy Chemerynskiy
  • fix: check if options are empty (#2701) Adithya Vardhan
  • Remove coverage reports (#2699) John Flockton
  • Make includeHeaders a boolean (#2697) alinamusuroi
  • fix(playground): fix rendering Exclidraw (#2694) Bryan
  • Collapse and Expand DevTools Tree Nodes (#2679) Will
  • fix(lexical-playground): LexicalTypeaheadMenuPlugin import (#2689) Elvin Dzhavadov
  • Fix VALID_TWITTER_URL to allow underscores. (#2690) hiraoka
  • fix: path to icons (#2683) Adithya Vardhan
  • Fixed typo (#2678) SalvadorLekan
  • Separate @lexical/code into more atomic modules (#2673) John Flockton
  • fix(lexical-list): remove list breaks if selection in empty (#2672) 子瞻 Luci
  • Conditionally utilize startTransition if it's present (#2676) Jack Hanford
  • chore(lexical-playground): make directory clear (#2674) 子瞻 Luci
lexical - v0.3.8

Published by acywatson about 2 years ago

0.3.8 (July 20, 2022)

Lots of bug fixes.

Introduces TypeaheadPlugin and associated primitives, which consolidate the implementation of all such functionality (mentions and component picker) and create a base to build similar typeahead functionality from.

Introduces TableOfContents plugin for easier navigation of long-form documents. Available in the playground in the settings menu (bottom-left corner).

Introduces a "clipboard viewer" functionality in the local dev environment. When active, it shows the clipboard content the last time the paste event was fired with the editor focused.

  • Remove default styling imports on HTML paste (#2663) Acy Watson
  • fix(lexical-playground): code lang display (#2658) 子瞻 Luci
  • chore(lexical-playground): remove files that should not be submitted (#2662) 子瞻 Luci
  • Selection.extract fix (#2620) Acy Watson
  • Specify the return type of getNearestNodeOfType. (#2651) hiraoka
  • Autolink default protocol (#2654) Gerard Rovira
  • fix(doc): RichTextPlugin placeholder (#2655) unvalley
  • fix(lexical): calculate range selection formatting (#2643) 子瞻 Luci
  • Add TableOfContentsPlugin (#2634) Karam Qaoud
  • Port ASCII State Tree to Browser Extension (#2625) Will
  • Fix markdown text matchers during md import (#2644) Maksim Horbachevsky
  • fix(lexical): Japanese IME issue (#2623) 子瞻 Luci
  • Remove comment box from footer (#2639) John Flockton
  • Delete doc from ydocMap on unmount. Fixes init on re-mount (#2637) Maksim Horbachevsky
  • feat: new way to delete comments and threads (#2570) Adithya Vardhan
  • Lexical Typeaheads (#2534) Tyler Bainbridge
  • Add $insertBlockNode (#2633) Gerard Rovira
  • Add seperate flag for if script had loaded (#2628) John Flockton
  • Fix Chrome types in Lexical DevTools (#2627) John Flockton
  • Capture the expected payload type in commands (#2537) Patrik Åkerstrand
  • fix unit test warning (#2618) Acy Watson
  • fix(lexical-playground): fix toolbar-item button style bug in safari (#2621) 子瞻 Luci
  • add docs (#2611) Acy Watson
  • Add default value for undefined case in markdown transformers (#2453) Noah Cook
  • Add PasteLog Plugin (#2609) Acy Watson
  • Fix pasting inline code blocks (#2607) Maksim Horbachevsky
lexical - v0.3.7

Published by zurfyx over 2 years ago

0.3.7 (July 6, 2022)

Lots of bug fixes and polish. Notably, the full text of minifed Lexical error codes can now be accessed via the Lexical website.

  • Update Browser Extension's Vite Config (#2540) Will
  • fix: import color and vertical align info from html string (#2571) Adithya Vardhan
  • Update PollNode.css (#2602) VelociRaptor
  • Update package names (#2599) Acy Watson
  • Ensure to call existing listeners only (not newly added ones) (#2573) Maksim Horbachevsky
  • Added dragend to list of rootElementEvents (#2598) stuartrobinson3007
  • Reverse MarkdownExport loop order to take TextMatchTransformers into account first (#2582) Lukas
  • Fetch Lexical State Tree in DevTools App (#2510) Will
  • chore: use keyboard shortcuts (#2580) Adithya Vardhan
  • fix prettier Gerard Rovira
  • Replace background images with pseudo classes to display checkboxes in playground (#2567) VelociRaptor
  • Customize default focus position (#2591) Gerard Rovira
  • Add missing dependencies (#2585) John Flockton
  • Website error codes - lexical.dev/error/<code> (#2574) Gerard Rovira
  • Use Vite server for E2E tests in CI (Fix windows CI failures) (#2584) Acy Watson
  • feat(lexical-playground): copy button for @lexical/code (#2396) 子瞻 Luci
  • fix: commenting issue after ts migration (#2558) Adithya Vardhan
  • npm run changelog (#2561) Gerard Rovira
  • fix: typo edtior to editor (#2560) Florent DUVEAU