flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

How to display a Delta diff?

Open FaFre opened this issue 2 years ago • 4 comments

I'm struggling to display a diff I obtained from two Deltas:

jsonEncode(a.diff(b).toJson())

Produces:

[{"insert":"xda bda sdafsafdsadf  sadf sad f sadf sa df sa df sadfsadfasf"},{"delete":113}]

I tried to load those changes via Document.fromDelta as well with Document()..compose(). But in both cases there are some newline validations failing. It looks like Document.fromDelta is also only accepting inserts, but the diff produces deletes too.

Did anyone figure a way how to display diffs?

FaFre avatar May 16 '23 17:05 FaFre

I stumbled upon this today again. @freshtechtips do you have a hint for me?

FaFre avatar Nov 15 '23 08:11 FaFre

I stumbled upon this today again. @freshtechtips do you have a hint for me?

Thank you for the report

Honestly, I don't think I'm able to address this issue for now as the todos are quite big and I need quite a few months before start on this, but I will add it to the todos

EchoEllet avatar Nov 15 '23 14:11 EchoEllet