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

best way to split a paragraph(lorotext) #673

Open
sunnyawake5 opened this issue Mar 2, 2025 · 1 comment
Open

best way to split a paragraph(lorotext) #673

sunnyawake5 opened this issue Mar 2, 2025 · 1 comment

Comments

@sunnyawake5
Copy link

sunnyawake5 commented Mar 2, 2025

i'm using LoroText to represent a paragraph.
what's the best way to split a LoroText? or provide an api like this:
loroText.deleteRight(off):Delta[] //return the deleted part as Delta

@sunnyawake5 sunnyawake5 changed the title best way to split a paragraph(lorolist) best way to split a paragraph(lorotext) Mar 2, 2025
@zxch3n
Copy link
Member

zxch3n commented Mar 2, 2025

Sounds nice. Maybe we can provide a more generic method like sliceDelta(start, end): Delta[].

You can implement it in your application code at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants