Creates and inserts a new text frame which is anchored to the specified text position. It has the specified horizontal alignment and a textflow which is given through the insertion
<void> TextFrameCollection.addAnchored(<Size> size, <HorizontalAlignment> horizontalAlignment, <number> textPosition, <TextFrameInsertionMode> insertionMode, [<RequestTextFrameCallback> callback], [<ErrorCallback> errorCallback])
Parameter | Description |
---|---|
size | The text frame's size in twips. |
horizontal |
Specifies the text frame's horizontal alignment. |
text |
Specifies the text position at which the text frame is to be inserted. If -1 is specified, the text frame is inserted at the current input position. |
insertion |
Specifies how the text flow is handled. |
callback | Optional. The newly created text frame object is returned via this callback function. |
error |
Optional. Is called when the operation failed with an error. |