-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
How to keep formatting between lines? #5620
How to keep formatting between lines? #5620
Comments
It sounds like you'll need to prevent the stop the propagation of the |
@acywatson @zurfyx do we agree, this should be the default behaviour? |
I mean the trade off is now that you have the opposite problem. If a user wants to just bold one line or add several formats to one segment of text, they need to then clear all those formats off when they start typing on the next line. I suspect the case of adding formats to a small portion of otherwise non-formatted text (or even typing the text non-formatted, then going back to apply formats to specific sections) is far more common than the case of setting a bunch of formats and typing multiple lines with those formats engaged. Probably the perspective we should come from here, though, is what's the easiest way to set it up so a developer can easily customize it for their own editor. From that angle, I think it might be better to make the formats sticky, and allow people to write a plugin that clears the formatting on enter or on double-enter, as they see fit. Additionally, though, this would be a breaking change. |
I have discovered that using |
the same. it should follow the same styling. |
I'm facing the same issue, see discord thread 🙂 |
thank you very much @Sahejkm 🙌 |
I'm trying to achieve a different behavior regarding the formatting between lines in the Lexical Editor.
The current behavior
Enter
once, it will insert a new line, which will have an "unstyled cursor" but upon new typing, the styles and formatting are applied again to the text.Enter
twice, the new line, separated by the other ones, will lose all of the previous formatting and styling, returning to the default.Gravacao.de.Tela.2024-02-16.as.09.16.21.mov
The desired behavior
Enter
regarding of how much times/lines, the styles and formats are preserved. The user doesn't have to select the font-family and font-size again (for example) every time he creates a new a paragraph.How can I achieve this?
Originally posted by @nickschinestzki in #5619
The text was updated successfully, but these errors were encountered: