I\'m going to go a bit in-depth with my problem, you can jump to the TL;DR if you don\'t want to read all of this
I
This is a problem akin to code versioning and saving only the changes between versions.
Take a look at jsdiff
You can create a patch, save it, and apply it later to the original text to get the modified text.