Hey, lately I wanted to try the text comparison and when we have a longer article in the editor it’s hard to see what has changed compared to the previous version.
Feature Request. Something that will visually highlight the changes so they can be easily compared.
Do you have an example how this could look like?
I couldn’t find an example online at remirror so Remirror is based on prosemirror and the equivalent of @remirror/extension-diff in remirror is Tracking changes in prosemirror.
Link to prosemirror example ProseMirror change tracking example I think the simplest implementation of a substitute for comparison with git would be to add change highlighting.
Squidex actually uses remirror: GitHub - Squidex/editor: Rich Text Editor for Squidex. Theoretically this is possible, but I am not sure how to implement that. The problem is that we are only dealing with strings at the moment. So a solution could be to save the remirror state tree instead of html or string and then make the html or markdown conversion on the fly. This should not be too difficult.
When you have the state tree you probably have IDs as well and from there on you could build a diff, because you know what has been added and what has been modified.
But this is a big change.
I had a closer look and I think it is basically impossible with the current architecture. The problem is that you don’t know from the state itself what you have changed.
Consider a very basic example:
World is big
What has been changed?
Hello has been removed and
is big has been added?
Hello World has been removed and
World is big has been added?
There is this collaboration feature, where I am working on, perhaps it is possible with that.
Remirror is based on prosemirror so maybe something similar could be achieved in squidex?
They achieve it by maintaining a history of changes. It is not a diff that is calculated by taking 2 different versions
can’t we save this history of changes in the content version?
Yes, something like that would be possible, but also challenging.