These are chat archives for GetmeUK/ContentTools
@oodavid hi - CT has a brute force approach to history where we simply check each editable region frequently (every 250ms I think) for modified content using the last modified date/time attribute and then record any changes in a history stack. The major pro being typically it supports new features and tools added to the editor without any work because we're just taking snapshots.
At the moment the history stack doesn't take account of editable regions because in the base editor these aren't dynamic but this is where you'd need to start (and I don't think it would be too difficult): https://github.com/GetmeUK/ContentTools/blob/master/src/scripts/history.coffee
You'd need to modify the history snapshot the current map of regions, checking for new regions whenever the content changed (in the same way it does now), the tricker bit to this is that currently history replaces the content of the region in question on an undo with the previous snapshot, where as in your case it would also need to remove or re-add a regions dynamically into the HTML and then sync the regions with the editor - but again I think that's possible and I'd be happy to help you as much as I can.
I do apologise for the late reply I was away Friday/Saturday and had limited access to wifi
<article>element and has the ability to add
<section>elements, these may contain pre-built snippets (latest blog article, last 5 tweets etc.) or contain ContentEditable regions.
<article>element. This way I'll be capturing settings and style changes too.
stack.watch('#myArticle')or somesuch. My instinct is that this is a dead-end, but maybe worth a try.