Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

JavaScript property to tell if text is in a continued table

$
0
0

Hi,

Is there any way to determine if text in a textframe is within a table, even if that table has been threaded through multiple text frames? I can check the tables count for the text frame where the table begins to see if it has a table, and then work from there for that frame. However, subsequent text frames have a tables.length of 0. Individual characters within the table, when selected, have a parent of Cell, but in my case I need to be able to check the first character in the frame and move forward based on whether that cell is in a table. For reasons that aren't clear to me, that character is never the child of Cell. And, if I pull subsequent characters from the (let's say) textFrame.characters collection, I only get characters that appear after the table (source line or caption). I'm obviously missing something about how the table is referenced in the DOM, but I can't figure out what it is.

 

What I want:

- Given a textFrame, determine if it begins with a table (so, check first character in textFrame for "table-ness")

 

What I'm getting

- The table itself seems invisible to the textFrame object.

 

I hope this question is clear enough. I'm having a little trouble expressing the problem. Thank you!


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>