Skip to main content
Inspiring
September 9, 2016
Answered

avoid overset

  • September 9, 2016
  • 1 reply
  • 334 views

I need to avoid over set in the tinted box..

But I want to create the tinted text frame and give link for the same.

How to duplicate the textframe without content. Please advice.

This topic has been closed for replies.
Correct answer Skemicle

To duplicate the textFrame and keep all properties the same you will have to duplicate the content as well. You can duplicate the textFrame and remove all contents before linking the duplicate to the original textFrame:

var sel = app.selection;

var gb0 = sel[0].geometricBounds[0];

var gb3 = sel[0].geometricBounds[3];

var second = sel[0].duplicate([gb3 + .5,gb0]);

second.parentStory.contents  = "";

second.previousTextFrame = sel[0];

1 reply

Skemicle
SkemicleCorrect answer
Inspiring
September 12, 2016

To duplicate the textFrame and keep all properties the same you will have to duplicate the content as well. You can duplicate the textFrame and remove all contents before linking the duplicate to the original textFrame:

var sel = app.selection;

var gb0 = sel[0].geometricBounds[0];

var gb3 = sel[0].geometricBounds[3];

var second = sel[0].duplicate([gb3 + .5,gb0]);

second.parentStory.contents  = "";

second.previousTextFrame = sel[0];