yjs / y-quill

Quill Editor binding for Yjs
https://demos.yjs.dev/quill/quill.html
MIT License
80 stars 18 forks source link

Multi formatting bug #6

Closed team-c35p closed 3 years ago

team-c35p commented 4 years ago

Describe the bug multi selected format changed not synced

To Reproduce Steps to reproduce the behavior:

  1. open 2 browser(A, B) and go to 'https://demos.yjs.dev/quill/quill.html'
  2. In A, add some text multi line like
    
    a
    b
    c
    d
    e

3. In A, multi select from 2 to 4 lines and change type normal to H1
4. In A, multi selected lines format changed normal to H1
5. In B, only first line changed normal to H1, other lines were not chaged

**Screenshots**
![bug](https://user-images.githubusercontent.com/54426116/90608227-47943880-e23d-11ea-9064-66ffd5507344.gif)

**Environment Information**
 - use yjs, y-quill, y-websocket latest version 
manstie commented 3 years ago

I also noticed this. Any multi-line formatting (bold, ital, underline, ...) only propagates the formatting change to other clients for the first line in the selection.

Edit: this is a problem with applyDelta - the quill binding is doing as it's told and when a change comes from quill, applyDelta is only setting the formatting of the first line in the y-text object when given a quill delta.ops.

dmonad commented 3 years ago

Fixed in yjs@13.4.11 / yjs#272