Copy link to clipboard
Copied
I usually try to insert (group of) objects into the start of table cell texts, now I would like to automate them. This is what I usually do (manual work):
I tried to look into the internet but there isn't anything about insertion points in table cells. Would appreciate if anyone could point out how to insert objects within table cell texts.
Copy link to clipboard
Copied
It's a little strange at first, working with insertion points. In your other post, my script does insert an object (a group, in that case) into an insertion point of a cell. Look at the line
anchorMe.anchoredObjectSettings.insertAnchoredObject(insertionPoint);
That is where the insertion happens. Note that it is nothing special about table cells—you can use any insertionPoint. See the Text documentation. Text objects have InsertionPoints. They are the invisible points between two characters and at the beginning and end of text. If you set the "contents" property of an insertionPoint, it is equivalent to inserting the text between the character before and after the insertionPoint. Also anchoredObjects are anchored to an insertionPoint. Tables are also anchored to an insertionPoint. (Table.storyOffset will give you its InsertionPoint.)
- Mark
Copy link to clipboard
Copied
Sorry was with so many things. I'll have a look at it.