These are chat archives for GetmeUK/ContentTools
Hi @mattsah it's possible to get the HTML for any region at any point safely using the
region.html() method but the inner HTML for each region should be consider off limits (I guess) until the save method is complete (e.g at the point the
saved is triggered - although only if the save is not passive).
In earlier versions we only had a
save event that triggered where
saved now triggers but this was very limiting and so event triggers were added at the start of the save process
save and the end
I can see how this might not feel intuitive because the
saveevent is triggered before any action is taken, and perhaps
after-save event names would have been more intuitive (these variations were considered but felt clunky over all to me).
Having said all of this I never expected devs to read the innerHTML of regions to get the HTML to send back to their servers (partly because different browsers, at least at the time of starting to write CT, will potential return back different HTML). And therefore I don't think I've actually documented anywhere when it is and isn't safe to interact with the region HTML - so that's something I need to look at.