nozer/quill-delta-to-html

Why is it set indent to 0?

Closed this issue · 1 comments

lvyue commented
_renderListItem(li: ListItem): string {

      //if (!isOuterMost) {
      li.item.op.attributes.indent = 0;
      //}
      var converter = new OpToHtmlConverter(li.item.op, this.converterOptions);
      var parts = converter.getHtmlParts();
      var liElementsHtml = this._renderInlines(li.item.ops, false);
      return parts.openingTag + (liElementsHtml) +
         (li.innerList ? this._renderList(li.innerList) : '')
         + parts.closingTag;
   }
nozer commented

I am terribly sorry for the delay.

In short, it doesn't make sense to indent.

If you try to indent a list item in the quill editor, a new inner list is created. If you try to insert a block (like a header or block quote etc), it breaks out of the list and list is terminated. So, indenting list item does not make sense in quill editor. Hence the indent being set to zero there.