how record change timestamp of every line in editor?


the source code I am editing is stored in a table that stores the line text and the date/time of the last change to the line.

After CodeMirror is done editing a file, how to match up the resulting text lines with the lines of the input table? Where code can determine which lines were changed, deleted and added. Can I associate a never changing key with each text line that CodeMirror is editing?



That won’t work, but you could maintain this data structure during editing by listening for "changes" events and updating the data for each change, as they come in.