You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a way to retain inline formats when the editor is empty of any text. Currently, if you apply formats to text in an editor (such as bold or color), then delete all the text, you lose any formats and any new text you type is unstyled. In addition, if you apply a format to an empty editor, that format is immediately lost if you click out of the editor without typing any text.
In the demo, I apply bold and color formats to the editor, but don't also insert any text, and those formats aren't there when you type text into the editor.
Use case
We have text fields that use Quill for rich text editing, and the user is able to define template text fields that are initially empty but can be styled ahead of time. We have an internal JSON model that we map to a Quill Delta at runtime, and after initializing the Quill editor, we use setContents to update the editor to be in sync with our model.
Why this should be in Quill
We did manage to get something working by duplicating all inline formats to also be supported as block formats, but the work required to add and maintain that logic is not something that we want to support long term, and such a feature seems like it should be supported by default.
The text was updated successfully, but these errors were encountered:
Feature request
There should be a way to retain inline formats when the editor is empty of any text. Currently, if you apply formats to text in an editor (such as
bold
orcolor
), then delete all the text, you lose any formats and any new text you type is unstyled. In addition, if you apply a format to an empty editor, that format is immediately lost if you click out of the editor without typing any text.Here's an example of the issue: demo link
In the demo, I apply bold and color formats to the editor, but don't also insert any text, and those formats aren't there when you type text into the editor.
Use case
We have text fields that use Quill for rich text editing, and the user is able to define template text fields that are initially empty but can be styled ahead of time. We have an internal JSON model that we map to a Quill Delta at runtime, and after initializing the Quill editor, we use
setContents
to update the editor to be in sync with our model.Why this should be in Quill
We did manage to get something working by duplicating all inline formats to also be supported as block formats, but the work required to add and maintain that logic is not something that we want to support long term, and such a feature seems like it should be supported by default.
The text was updated successfully, but these errors were encountered: