Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lexical-list] Bug Fix: Ensure new paragraph node retains selection styling when exiting list #6917

Merged
2 changes: 2 additions & 0 deletions packages/lexical-list/src/formatList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ export function $handleListInsertParagraph(): boolean {

if ($isRootOrShadowRoot(grandparent)) {
replacementNode = $createParagraphNode();
replacementNode.setTextStyle(selection.style);
replacementNode.setTextFormat(selection.format);
topListNode.insertAfter(replacementNode);
} else if ($isListItemNode(grandparent)) {
replacementNode = $createListItemNode();
Expand Down
Loading