Skip to main content
jankeesv97378045
Participant
February 2, 2023
Question

Select first line in new textframe with autoflowed text

  • February 2, 2023
  • 1 reply
  • 459 views

Is it possible to search for or select the first line in a textbox with autoflowed text? I have text with a first line indent, but when that text is the first line in a new textframe I don’t want that first line of the paragraph to be indented. Or maybe there is another way that I’m missing?

Thanks in advance!

This topic has been closed for replies.

1 reply

Robert at ID-Tasker
Legend
February 2, 2023

Automatically - not possible - as this is a property of the paragraph itself - so it doesn't matter where paragraph is. 

 

Only through scripting and assigning new ParaStyle. 

 

But then you'll need to run script from time to time / when text reflows and re-apply correct ParaStyle to previously changed paragraphs. 

 

FRIdNGE
February 2, 2023

… Quickly written!

 

Basically, placing the cursor in a story:

 

/*
by FRIdNGE, Michel Allio [02/02/2023]
*/

var mySel = app.selection[0],
myTFrames = mySel.parentStory.textContainers;
for ( var t = 0; t < myTFrames.length; t++ ) if ( myTFrames[t].paragraphs[0].insertionPoints[0].parentTextFrames[0].parentPage == myTFrames[t].parentPage ) myTFrames[t].paragraphs[0].firstLineIndent = 0;
alert( "Just For Fun!" )

 

(^/)  The Jedi

jankeesv97378045
Participant
February 2, 2023

Thanks a lot, that works like a charm 🙂