Search code examples
quilldeltaparagraphs

Quill plain paragraphs in delta


Deltas from the Quill rich text editor seem to represent plain paragraphs as simple newlines in the text with no attributes. Is it possible to have paragraphs represented explicitly, like other block elements, and have the editor accept the revised delta format?

eg

...
{
    attributes: {para:true},
    insert: '\n'
}

Solution

  • No. The purpose of attributes is represent formatting so if there is none, there is no value. This is also how inline attributes work.

    Attributes also does not necessarily represent a block element. For example, text alignment is implemented as a class or inline style.