I need an Indesign script to add a irregular textframe (polygon) to page and add text content to it. I have so far this code. but it is a regular text frame.
var doc = app.documents.add();
var textFrame = doc.textFrames.add();
textFrame.properties =
{
geometricBounds : [ 0,0,100,100 ],
strokeWidth : 0,
fillColor : "None",
contents : "Hello World!"
}
I can also add this polygon but I can't add text to it.
var doc = app.documents.add();
var polygon = doc.polygons.add();
var points = [
[100,100],
[150,100],
[200,200],
[120,150],
[100,100],
]
polygon.paths.item(0) = points;
thanks for your help!