4 Replies Latest reply on Nov 21, 2008 3:08 PM by (Math_Random)

    Check for and insert end of paragraph in selected text

      For my script it is important that the selected text ends with an end of paragraph and not end of story. I'd like to check for that and if it's not there insert it.

      I tried inserting the SpecialCharacters.PARAGRAPH_SYMBOL but it's not the same, the character ends up in the text and not as a real end of paragraph. Also, I can't figure out how to use the SpecialCharacters enumeration to check for the existence of such a character.

      // Does not work, because I get a regular line break back from the contents property :(
      text.characters[i].contents == SpecialCharacters.PARAGRAPH_SYMBOL

      Thank you!