pycrdt icon indicating copy to clipboard operation
pycrdt copied to clipboard

Add to_delta on XmlText

Open jezell opened this issue 5 months ago • 1 comments

In yjs, there is a toDelta method to get the contents of the xmltext node:

https://docs.yjs.dev/api/shared-types/y.xmltext

Looks like pycrdt only has a to string, which makes it hard to port code over.

jezell avatar Jul 22 '25 16:07 jezell

Besides toDelta, applyDelta would also be very useful;

ytext.applyDelta(delta: Delta) Apply a Text-Delta to the Y.Text instance.

ytext.toDelta(): Delta Retrieve the Text-Delta-representation of the Y.Text instance. The Text-Delta is equivalent to Quills' Delta format.

https://docs.yjs.dev/api/shared-types/y.text

carlosleandr avatar Oct 02 '25 13:10 carlosleandr