Question

StackExchange has introduced an interesting edit system, as authors can review the edits made to his/her post, by marking the words changed (red for old words, and green for new words). How does this system work?

I think that the system does not record the list of changes/edits, but store different versions, and the markups we see as the edit review are the result of comparison between two versions.

But, how we can compare two texts to highlight the changes?

I wish to code it in PHP.

Was it helpful?

Solution

To highlight Codechanges you can use some Diff-Tools/Functions.

Short googling found for PHP php-diff. There are also other tools/frameworks for other languages available on internet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top