title: Quill Custom Attributes Overlap
body: <p>I am trying to implement a margin-comment binding with the document body. I have checked <a href="https://stackoverflow.com/questions/45359148/overlapping-inline-annotations-with-quill">Overlapping Inline Annotations with Quill</a>, and used the answer code to save the comment id at the class attribute.
  Two issues when I tried to comment on overlapping text:</p>
  <ol>
  <li>If I first bind a comment to segment A, then bind another segment B inside A, the segment after B and is still part of A will lose its custom comment attribute if I check the delta from getContents(), but Dom tree and Blot object got from getLeaf() showed there was a comment attribute. And I save the document contents from the getContents(). I tried:<br/>
  a. Tried to convert html to delta. I tried three NPM packages: <a href="https://www.npmjs.com/package/node-quill-converter" rel="nofollow noreferrer">https://www.npmjs.com/package/node-quill-converter</a>, <a href="https://www.npmjs.com/package/node-quill-converter-custom" rel="nofollow noreferrer">https://www.npmjs.com/package/node-quill-converter-custom</a>, <a href="https://www.npmjs.com/package/deltaconvert" rel="nofollow noreferrer">https://www.npmjs.com/package/deltaconvert</a>. The first two packages got the &quot;Module not found: Can't resolve 'child_process'&quot; error, tried the solution at <a href="https://stackoverflow.com/questions/54459442/module-not-found-error-cant-resolve-child-process-how-to-fix">Module not found: Error can&#39;t resolve &#39;child_process&#39;, how to fix?</a> but still couldn't fix it. And the third package lost the custom comment attributes.<br/>
  b. Tried to update the delta by updateContents() and save the attribute to the segment after B but within A. Contents got updated, but when I saved the document and reloaded it, that segment had the same attributes as segment B.</li>
  <li>When segments A and B only partially overlap, the segment after B and within A will be combined with the overlapping part of A and B. Supposedly there should be three spans: 1.)A not B; 2.)A and B; 3.)B not A. But I only got: 1.)A not B; 2.)A and B. And I could not figure out why they got combined automatically yet.</li>
  </ol>