Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for converting directly between prosemirror and Y.XmlFragment nodes #89

Merged
merged 1 commit into from
May 13, 2022

Conversation

nkeynes
Copy link
Contributor

@nkeynes nkeynes commented Jan 25, 2022

Adds new methods prosemirrorToYXmlFragment, prosemirrorJSONToYXmlFragment, yXmlFragmentToProsemirror, and yXmlFragmentToProsemirrorJSON to support direct PM <=> YXmlFragment conversion.

Note there's a small hack in prosemirrorToYXmlFragment to allow independent creation of Y.XmlFragment before the Y.Doc exists (supporting bottom-up tree construction)

Fixes #50

@dmonad
Copy link
Member

dmonad commented May 13, 2022

Thank you for this PR. Looks good!

@dmonad dmonad merged commit e3813d6 into yjs:master May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants