composablesys / collabs

Collabs library monorepo

Home Page:https://collabs.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quill line formatting inconsistency

mweidner037 opened this issue · comments

Quill says "Many line formats are exclusive. For example Quill does not allow a line to simultaneously be both a header and a list, despite being possible to represent in the Delta format."

The rich-text demo does not handle this, instead allowing a line to have multiple formats. Quill apparently reacts by using the most recent format it received, which can cause inconsistencies across users.

To solve this, we could store all line formats under a single attribute "lineFormat", so that it we get a single LWW winner. However, I will have to check which of "Many" line formats are exclusive (hence need to grouped under "lineFormat").

Complete list of Quill's (default) formats: https://quilljs.com/docs/formats/

I believe all of the Block types that are actually "Blocks" in the Quill source (i.e., extend class Block when defined here) are mutually exclusive, while Indent and Text Direction are compatible with anything. So it suffices to store the actually-Block formatting attrs under a single format key.

While we're fixing this, could also complete closedEndSpans (currently it's just the subset of formats that I knew about).