jupyter-server / pycrdt

CRDTs based on Yrs.
https://jupyter-server.github.io/pycrdt
MIT License
41 stars 10 forks source link

xml support #151

Open iliatimofeev opened 3 weeks ago

iliatimofeev commented 3 weeks ago

Problem

I'm working on a Python agent, that needs to edit state of richtext. On js side, I can use y-prosemirror but the document schema is based on YXmlFragment which is not supported by pycrdt.

Proposed Solution

Any plans to support the full range of Yjs types?

export const YXmlElementRefID = 3
export const YXmlFragmentRefID = 4
export const YXmlHookRefID = 5
export const YXmlTextRefID = 6

Additional context

From https://github.com/jupyter-server/team-compass/issues/55 I know that the XML part is not used internally.

Unfortunately, I'm new to Yjs and have zero experience with Rust. I can give it a try under some guidance, but I'm not sure that would be the best solution for the mantainer :)

Maybe someone already did it, and I can use a fork?

davidbrochart commented 3 weeks ago

That would be good to have in pycrdt, but I'm not sure when I can find time to do it. A PR would indeed make it happen sooner.