3

How can I look for the first line in each paragraph, and add a line break after it?

  • What exactly do you mean by "line"? Do you mean from the beginning of the paragraph to the first period character? Or do you mean from the beginning of the paragraph to the border of the text frame? The first could easily be achieved with a GREP search, for the second it might be better to use a nested line style. Could you please post a screenshot with a before and after example? Maybe there is a better way to do what you are asking for. – Wolff Dec 12 '19 at 17:36
  • @Wolff When I said "line," I meant "from the beginning of the paragraph to the border of the text frame". I know the option to mark rows using nested styles, then look for the nested style with REP. I'm looking for a cleaner way to do it, even through a javascript. – i. Madar Dec 16 '19 at 15:35
  • OK, it's just because I'm wondering why you need this. I wouldn't normally add line breaks if I could avoid it and the break will come in a "random" position in the text. Sounds like you are doing it to be able to style the first line separately from the rest so why not just use nested line style? – Wolff Dec 16 '19 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.