Slicing text before/after a line break

Hey All - New to Axure and the forums. Apologies if this has been answered. I dug around for a few hours and thought the experts might be able to help out!

I’m building a prototype in which a user would enter 2 or more paragraphs of text into a field. On a following page, they would see their text (so they can review it), but the first sentence of the second paragraph would be formatted like a pull quote. So my questions is - how can I slice their text such that the I display:

  1. the first paragraph in one box
  2. the first sentence of the 2nd paragraph in another box, and
  3. the rest in a 3rd box.

I’ve been tinkering around for hours, mostly trying to figure out #1 above. My initial thought was to create a global variable (e.g., TextSlice1) and set it to [[UserText.slice(0, UserText.indexOf(“/n”))]] when the user clicks to go to the next page. Then, when the next page loads, set the text in Rectangle 1 to the value of global variable TextSlice1.

Here’s a file showing this EssaySlice.rp (62.6 KB)

Thanks for any help!

I found a pretty inelegant solution, using many global variables . I’ll share the file here for posterity in case anyone is running up against a similar issue.

EssaySlice.rp (57.6 KB)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.