Skip to main content
Participating Frequently
February 11, 2023
Question

How to insert objects into table cell insertion point?

  • February 11, 2023
  • 1 reply
  • 274 views

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):

  1.  Use the text tool
  2.  Click at the start of the table cell (as like inserting texts)
  3.  Paste the object(s) I after

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. 

This topic has been closed for replies.

1 reply

m1b
Community Expert
Community Expert
February 11, 2023

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

SHY.JohnAuthor
Participating Frequently
March 21, 2023

Sorry was with so many things. I'll have a look at it.