Is there an InDesign DOM flowchart? Getting contents of text frames on a specific page.
I reference the flowchart for Illustrator quite a bit to understand structure, but I'm just wondering if one is available for InDesign? Maybe it's too fluid, but in general, I'm scripting getting the contents of a text frame based on the page number. Stories seem to hold the most info, but I don't entirely understand where they are in the structure. So I think my best bet is:
pageItems = app.activeDocument.pages.item(1).allPageItems
for(var i = 0; i < pageItems.length; i++){
var curPI = pageItems[i];
var curType = curPI.constructor.name;
if(curType == "TextFrame") alert(curPI.parentStory.contents)
}I don't entirely understand how parentStory or parentPage works... is there a more straightforward way than I've found?
FWIW I'm determining which page I pull text frames from, based on the first findGrep result, but have not complicated this example with that piece.
