Skip to main content
dublove
Legend
Sep 3, 2025 6:24 PM UTC
Answered

I've seen .parentFrame before, but the name seems off?

Regardless of the level, one can directly access the text box layer.
There's no need for multiple levels of navigation like .parent.parent.parent.
For example, cell.parentFrame or contents.parentFrame?

rob day
rob dayCorrect answer
Community Expert
Sep 3, 2025 8:06 PM UTC

 

Do you mean parentTextFrames, which is a property (array) of text objects--text, character, insertionPoint, etc?

 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/index.html#Text.html

 

4 replies

rob day
Community Expert
rob dayCommunity ExpertCorrect answer
Community Expert
Sep 3, 2025 8:06 PM UTC

 

Do you mean parentTextFrames, which is a property (array) of text objects--text, character, insertionPoint, etc?

 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/index.html#Text.html

 

Translate
m1b
Community Expert
Community Expert
Sep 3, 2025 7:42 PM UTC

By the way, sometimes you need to ask for the text of something, for example:

var myCellsFrame = myCell.texts[0].parentTextFrames[0];
Translate
dublove
dubloveAuthor
Legend
Sep 4, 2025 8:11 AM UTC

That should be it. Thank you both very much.

Translate
m1b
Community Expert
Community Expert
Sep 3, 2025 7:38 PM UTC

Hi @dublove any Text object has a parentTextFrames property which returns an array of the text frames that contain the text.

Translate