Copy link to clipboard
Copied
can u help me in code of scripting in js to find the last paragraph of text story in a text frame
With the textframe selected, run the following
app.selection[0].parentStory.paragraphs[-1]
-Manan
Copy link to clipboard
Copied
With the textframe selected, run the following
app.selection[0].parentStory.paragraphs[-1]
-Manan
Copy link to clipboard
Copied
Copy link to clipboard
Copied
In your contents string change \n to \r. \n creates a soft return and hence a new paragraph is not created that is the reason you get the whole content of the paragraph. \r creates two paragraphs
P.S. :- Don't post new topics for the same question, it will not get you faster answers. Maintain the decorum of the forum
-Manan
Copy link to clipboard
Copied
thanks a lot for your help.can you suggest me from where one can read and gain knowledge about scripting
Copy link to clipboard
Copied
See a related post that lists resources on how to learn scripting for InDesign
-Manan