yjs / y-prosemirror

ProseMirror editor binding for Yjs
https://demos.yjs.dev/prosemirror/prosemirror.html
MIT License
335 stars 116 forks source link

Expose the `mapping` when converting Prosemirror (JSON) to Y.Doc instances #69

Open ankon opened 2 years ago

ankon commented 2 years ago

This mapping is needed for invoking the position transformation functions, and therefore shouldn't be thrown away.


I added the parameter at the end and made it optional with a default matching the previous behavior, so I claim that this should be quite safe.

Possibly related:

jamesopti commented 2 years ago

We have the need for this too! Thanks for this PR @ankon !

@dmonad any thoughts here?

HelloAlexPan commented 2 years ago

Same here! Bump

jamesopti commented 2 years ago

Any update on this one?

EricHasegawa commented 7 months ago

Bumping this! @dmonad Any thoughts?

ankon commented 7 months ago

Purely for the record: I no longer work with prosemirror at all, so if you want to merge this -- please do! But if it needs fixes/adjustments, please also feel absolutely free to do them as I won't be able to.