Joining lines into a single line in TextEdit
If your paragraphs are separated by a blank line, you can do this with a two-part Find and Replace in TextEdit.


Open the Find and Replace dialog (⌥⌘F).
In the Find field, insert the newline character by typing option-return.
In the Replace field, insert a space, then click All. This replaces all newlines with a space, so you'll have one long line of all your text.
Change the Find field to two spaces.
In the Replace field, enter two newline characters (option-return twice).
Click All to move paragraphs to a new line.