Releases: facebook/lexical
v0.7.7
- 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
- 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
- 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
v0.7.3
- 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
- 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
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
v0.7.0 (2022-12-09)
Lexical 0.7 includes some breaking changes, including:
- Removal of
$cloneContents
from@lexical/selection
- Changes to
PlainTextPlugin
andRichTextPlugin
with regards to how placeholders are handled - Pressing tab with the
RichTextPlugin
no longer indents by default, use theLexicalTabIndentationPlugin
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
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
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.
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 toeditor.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
- Update intro.md by @crisshaker in #3064
- Update theming.md by @crisshaker in #3067
- fix(lexical-clipboard): pasting from google docs by @LuciNyan in #3063
- Update faq.md to fix error of clearing contents by @Mark-Fenng in #3070
- chore(lexical-playground): add resizability back to regular tables by @Dattaya in #3068
- Add oncall annotation by @thegreatercurve in #3071
- Fix oncall annotation issue missing from some files by @thegreatercurve in #3075
- Fix Resize and Scroll Positioning on Typeahead/Node Menu by @tylerjbainbridge in #3079
- fix(lexical-playground): read-only mode by @LuciNyan in #3081
- Removed extra 'is' in line 9 by @Boye95 in #3083
- Add some inline documentation by @acywatson in #3076
- Merge markdown E2E tests into one file by @thegreatercurve in #3086
- Add open/close callbacks to menu plugins by @tylerjbainbridge in #3087
- Add logic to catch separators by @thegreatercurve in #3084
- Tweet fallback to text on copy by @zurfyx in #3088
- Double-trigger hack for high-fidelity Node/Grid selection by @zurfyx in #3080
- Add collapsible container plugin by @fantactuka in #3082
- Make onClose optional on Flow Types. by @tylerjbainbridge in #3091
- Fix flow for $insertGeneratedNodes by @zurfyx in #3101
- chore: add e2e test for draggable-block-plugin by @LuciNyan in #3090
- copyToClipboard to return success by @zurfyx in #3105
- Fix DOM availability check by @fantactuka in #3102
- Lower key navigation command priority for Tables by @tylerjbainbridge in #3107
- Typeaheads: Add scroll command and increase priority by @tylerjbainbridge in #3106
- Typeaheads: Remove hard-coded "bottom" alignment (Breaking change) by @tylerjbainbridge in #3104
- fix(lexical-playground): draggable blockplugin uses unexposed apis by @LuciNyan in #3109
- Update createHeadlessEditor to match createEditor typedef by @fantactuka in #3111
- Fix npm install on M1 macs by @Timebutt in #3114
- Fix typeahead import by @fantactuka in #3117
- [0.6] More Typeahead Changes by @tylerjbainbridge in #3112
- Fix GridSelection comparison by @zurfyx in #3118
- Fix table paste by @zurfyx in #3129
- Add className prop to typeahead plugin by @acywatson in #3124
- Fix typeahead ref typedef by @fantactuka in #3131
- Fix Dynamic Table Options on Playground Component Picker by @tylerjbainbridge in #3132
- Support multiple classes by @acywatson in #3134
- Typeahead Menu Flow types by @acywatson in #3133
- Ignore mutations which do not have target node by @Piliuta in #3120
- Add Emoji Picker to Playground by @tylerjbainbridge in #3122
- feat: add icons to extension and change build by @im-adithya in #3140
- FF Node/Grid copy-paste support by @zurfyx in #3147
- remove repeated comments by @Zuckjet in #3154
- Ignore empty class names in addClassNamesToElement by @acywatson in #3159
- ref(selection): separate @lexical/selection/index into multiple files by @tranqhuy46 in #3145
- Check if DOM is accessible when calling
getSelection
by @yongdamsh in #3162 - Fix linting error in EmojiPicker by @thegreatercurve in #3165
- Fix flow types for root.select() by @fantactuka in #3168
- Remove development notice by @trueadm in #3171
- TreeView editor basics by @zurfyx in #3153
- Fix copy-paste CodeBlock with BR by @zurfyx in #3174
- Fix nested editor cut by @fantactuka in #3177
- Fix insertNodes when replacing content adjacent to an inline element by @birtles in #3137
- docs: Fixed broken link by @SimonProper in #3190
- Make the ComponentPicker independent of the Toolbar by @egonbolton in #3142
- Nightly and Dev releases by @acywatson in #3192
- Add flushSync option to update() by @fantactuka in #3119
- Built-in Error/SuspenseBoundaries for React DecoratorNodes by @zurfyx in https://...