Stories (in fact the Story object) objects have a property called HiddenTexts. Does anybody knows a specific usage in InDesign? Does the Interface as menu to add, edit and delete these objects? Is it safe to use it within a script to store some persistent data into a story without disrupting formatting of text?
hiddenText is the text hidden by conditions: create a condition, apply it to some text, set the condition not to display its text, and you have hiddenText. It's probably not a good idea to use hiddenText to store data, because hiddenText is part of the document's content. If you want to store some persistent data into a story, you could use a custom label:
myStory.insertLabel ('myData', 'lots of persistent data goes here -- was it 32kb? Maybe more.')
what did you discover when merging labeled table cells?
My understanding is that the contents of one label will survive.
The label or the labels* of the "dominant cell" in the merge.
E.g. if you have cells with unique fill colors you will see immediately after merging the cells which was the dominant one.
But let's discuss this in a different thread…
*You could do different labels with insertLabel( "key string" , "value string" ) on one single object, that can hold labels. So you could merge all labels to e.g. all cells before you merge the cells if you want. It's up to you what data structure you like to do.