Y-prosemirror decorations after YDoc updated

Hi,

I have the need to render decorations from a custom prosemirror plugin but after the YDoc has been updated.

I was first working on this with the v1.1.2 and it was working good but in some cases the decorations was completely breaking prosemirror and the app. I checked and I seen actually y-prosemirror was doing 2 renders and the first one with outdated decorations the cause of my issue.

Now I updated to v1.1.3 that kill the two renders, thanks for the work on this. But now My decorations are always on the previous YDoc content :confused:
I checked the code and the sync of the doc appear to be desync via timeout so my custom plugin got the apply transaction call and then the YDoc is getting sync.

I would love some help/hint to get my decorations in sync with the YDoc changes (each stroke).
Note: If I render the old decorations with updated prosemirror state there is lot of chance to break.

Thank you in advance :wink:

Hi @dmonad sorry to at you directly I know you are pretty involve in the y-prosemirror binding maybe you could give me some hints here so we can finally release our feature :wink: