-
Notifications
You must be signed in to change notification settings - Fork 14
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
xml support #151
Labels
enhancement
New feature or request
Comments
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. |
ColonelThirtyTwo
added a commit
to ColonelThirtyTwo/pycrdt
that referenced
this issue
Sep 30, 2024
Add bindings to XMLFragment, XMLElement, XMLText, and XMLEvent. Allows reading and writing of XML fragments from the document, which rich text editors use heavily. Closes jupyter-server#151
ColonelThirtyTwo
added a commit
to ColonelThirtyTwo/pycrdt
that referenced
this issue
Oct 1, 2024
Add bindings to XMLFragment, XMLElement, XMLText, and XMLEvent. Allows reading and writing of XML fragments from the document, which rich text editors use heavily. Closes jupyter-server#151
ColonelThirtyTwo
added a commit
to ColonelThirtyTwo/pycrdt
that referenced
this issue
Oct 11, 2024
Add bindings to XMLFragment, XMLElement, XMLText, and XMLEvent. Allows reading and writing of XML fragments from the document, which rich text editors use heavily. Closes jupyter-server#151
I'm working on something very similar, also happy to contribute here. |
It looks like we have a PR 🚀 |
davidbrochart
pushed a commit
that referenced
this issue
Oct 19, 2024
* Add support for XML. Add bindings to XMLFragment, XMLElement, XMLText, and XMLEvent. Allows reading and writing of XML fragments from the document, which rich text editors use heavily. Closes #151 * Add support for formatting and embeds in Text Rich text editors often store their markup in attributes and embeds. * Allow apply_update in a transaction Currently trying to use apply_update in a transaction causes a deadlock, as apply_update tries to make its own new transaction but is locked out. This reuses the existing transaction, which also allows applying multiple updates in a single transaction. * Add __eq__ and __hash__ to XML types Allows comparing whether objects refer to the same element in a doc. Important since every access generates a new, unique Python wrapper instance. __eq__ is based directly from the underlying rust objects' `Eq` implementation. __hash__ is based off of the `Hash` implementation of the `BranchID` of the rust objects. * Add XmlText.diff Like Text, XmlText can contain embedded formatting, so make that available. * Mypy and ruff fixes and formatting * Document XML types * More lint fixes * Add XML related tests and fixes for found bugs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 bypycrdt
.Proposed Solution
Any plans to support the full range of
Yjs
types?Additional context
From jupyter-server/team-compass#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?
The text was updated successfully, but these errors were encountered: