-
Notifications
You must be signed in to change notification settings - Fork 291
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
runfix: achieve WYSIWYG with lists and blockquotes markdown rendering [WPB-16228] #18850
Conversation
@@ -129,6 +129,7 @@ const registerBlockquoteBackspaceCommand = (editor: LexicalEditor) => { | |||
editor.update(() => { | |||
lastChild.remove(); | |||
editor.dispatchCommand(INSERT_PARAGRAPH_COMMAND, undefined); | |||
editor.dispatchCommand(INSERT_PARAGRAPH_COMMAND, undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding an extra new line on backspace actually escape the blockquotes, and the added line is consistent with the message list md rendering
// keep the list indentation for the next paragraph after the list | ||
& + .editor-paragraph, | ||
// and for every paragraph with text with a parent with text | ||
// the ltr class is present for a paragraph with left-to-right text | ||
& ~ .ltr + .ltr { | ||
margin-left: 24px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css spaghetti here.
lexical does not keep the next paragraph after a list in the ul, but markdownit does (it's standard md).
the css is for keeping the list indentation for a single paragraph after a list, and every paragraph after that that contain text (the ltr class is added by lexical to paragraphs with left-to-right text)
|
Description
There's a couple of discrepancies between markdown rendering in the input bar and the message list:
Screenshots/Screencast (for UI changes)
before
after
Checklist