You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my instantiation of Quill I only support certain formats. I specifically exclude the 'color' format, for example. Most of the time this works great: when a user pastes colored text into Quill, it is appropriately removed.
However, on occasion, I end up finding a color attribute in the Delta object I ship to my server (coming directly from a TEXT_CHANGE event handler Delta). When I subsequently load the Delta into Quill, Quill appropriately removes it this time. This however results in inconsistent note state between client and server.
The question is, how did the color attribute get into the Delta object in the first place? I'm curious if there is any chance there is some kind of race condition which is causing this? Maybe the removal of the color attribute is happening after its applied to the editor? I couldn't find where in the Quill code the removal of unsupported formats happens.
To prevent this from ever occurring, I'm considering adding custom clipboard matchers for each of my unsupported formats and to remove them in the matcher. Hopefully this prevents it from ever getting into an outputted Quill delta.
But wanted to report this here in case it's possible to address the issue in Quill itself and also in case other people are experiencing it.
Unfortunately it's the worse kind of issue since it's incredibly difficult to reproduce. I've tried to find a reliable repro case but haven't been able to. Though it still occurs in production on occasion.
Steps for Reproduction
Configure Quill to not support color format
Create TEXT_CHANGE event handler to display Quill delta
Paste text with color format into Quill
Expected behavior:
Color attribute never shows up in outputted Quill delta
Actual behavior:
Most of the times this works, but on occasion the Quill delta contains the color attribute
Version:
Quill 1.2.3
The text was updated successfully, but these errors were encountered:
In my instantiation of Quill I only support certain formats. I specifically exclude the 'color' format, for example. Most of the time this works great: when a user pastes colored text into Quill, it is appropriately removed.
However, on occasion, I end up finding a color attribute in the Delta object I ship to my server (coming directly from a TEXT_CHANGE event handler Delta). When I subsequently load the Delta into Quill, Quill appropriately removes it this time. This however results in inconsistent note state between client and server.
The question is, how did the color attribute get into the Delta object in the first place? I'm curious if there is any chance there is some kind of race condition which is causing this? Maybe the removal of the color attribute is happening after its applied to the editor? I couldn't find where in the Quill code the removal of unsupported formats happens.
To prevent this from ever occurring, I'm considering adding custom clipboard matchers for each of my unsupported formats and to remove them in the matcher. Hopefully this prevents it from ever getting into an outputted Quill delta.
But wanted to report this here in case it's possible to address the issue in Quill itself and also in case other people are experiencing it.
Unfortunately it's the worse kind of issue since it's incredibly difficult to reproduce. I've tried to find a reliable repro case but haven't been able to. Though it still occurs in production on occasion.
Steps for Reproduction
Expected behavior:
Color attribute never shows up in outputted Quill delta
Actual behavior:
Most of the times this works, but on occasion the Quill delta contains the color attribute
Version:
Quill 1.2.3
The text was updated successfully, but these errors were encountered: