[lexical-extension][lexical-react] Feature: LexicalExtensionEditorComposer, NestedEditorExtension, and fixed SharedHistoryExtension with playground refactor#8202
Merged
etrepum merged 31 commits intofacebook:mainfrom Mar 17, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7faf840 to
232368b
Compare
etrepum
commented
Mar 15, 2026
Comment on lines
+85
to
+96
| export function useSyncExtensionSignal< | ||
| K extends string, | ||
| V, | ||
| Output extends {[Key in K]: Signal<V>}, | ||
| >(extension: OutputExtension<Output>, prop: K, value: V) { | ||
| const signal = useOptionalExtensionDependency(extension)?.output[prop]; | ||
| useEffect(() => { | ||
| if (signal) { | ||
| signal.value = value; | ||
| } | ||
| }, [signal, value]); | ||
| } |
Collaborator
Author
There was a problem hiding this comment.
Will probably switch this over to something higher-level in a follow-up PR to propagate settings to output signals in batch but this was straightforward when migrating one plugin to extensions at a time
zurfyx
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking Changes
Unhandled dispatched commands are now only bubbled to parent editors if the parent editor is not currently in an update. The previous behavior was broken as it would trigger a commit and GC in the middle of an in-progress update which can corrupt the state.
Description
Refactor more of the playground to use extensions, and address some needs it has with nested editors:
@lexical/react/LexicalExtensionEditorComposer:LexicalExtensionEditorComposercomponent to render an editor (nested or otherwise) that was already built with extensions@lexical/extensionNestedEditorExtensionto set theparentEditorin the EditorConfig when the nested editor is constructedSharedHistoryExtensionshould now work properly (before there was a bootstrapping issue due to the init phase of HistoryExtension)HorizontalRuleExtensionnow implements theINSERT_HORIZONTAL_RULE_COMMANDLinkExtensionnow registersTOGGLE_LINK_COMMANDat the lowest editor priorityCheckListExtensionnow has an output signal for itsdisableTakeFocusOnClickconfigurationSelectionAlwaysOnDisplayExtensionto wrapselectionAlwaysOnDisplayCloses #8203
Test plan
All existing e2e and unit tests pass (unit tests depending playground plugins were also refactored for extensions)