Answered
How to Insert a Rectangle Frame Tool Inside a Text Frame in InDesign
Hi sir
I was trying to insert a rectangle frame tool inside a text frame using this code
const selectedTextFrame = doc.selection[0];
const page = selectedTextFrame.parentPage;
This code creates the rectangle, but it does not place it inside the text frame
const rect = page.rectangles.add({
geometricBounds: [0, 0, 100, 100],
});
