Create a functionality which formats the given text into paragraphs