-
Notifications
You must be signed in to change notification settings - Fork 2.1k
How to keep formatting between lines? #5620
Copy link
Copy link
Closed
Labels
Description
I'm trying to achieve a different behavior regarding the formatting between lines in the Lexical Editor.
The current behavior
- In an empty editor, the user starts adding formatting and styles in the editor (font-family, font-size, color, bold, italic, etc)
- When you press
Enteronce, 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. - When you press
Entertwice, 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
- In an empty editor, the user starts adding formatting and styles in the editor (font-family, font-size, color, bold, italic, etc)
- When pressing
Enterregarding 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
Reactions are currently unavailable