-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Bug: Nested composers not running $config transforms for nodes inherited from parent #7756
Copy link
Copy link
Closed
Description
Nested composers seem to not be running node transforms defined via the new $config API, for nodes that are inherited from the parent editor. A specific manifestation of this issue is that list item indices are not being auto-incremented as the user types out a list (see screenshot below).
I'm guessing this could be because we're not pulling in the transforms defined via the $config API in
LexicalNestedComposer::getTransformSetFromKlass.
More context about our setup
We have a custom "collapsible" node that uses LexicalNestedComposer in its implementation. The nested composer inherits nodes from the parent editor as no nodes are specified when the child editor is created. The code fragment below should help to illustrate the setup.
export class CollapsibleNode extends DecoratorNode<React.Node> {
__content: LexicalEditor;
constructor(
content?: LexicalEditor,
key?: NodeKey,
) {
super(key);
if (content) {
this.__content = content;
} else {
this.__content = createEditor();
}
}
decorate(): React.MixedElement {
return (
<LexicalNestedComposer
initialEditor={this.__content}
initialTheme={[...]}>
<RichTextPlugin [...] />
[...]
</LexicalNestedComposer>
);
}
[...]
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels