Open the find and replace dialog (press CTRL+H).
Then select Regular expression
in the 'Search Mode' section at the bottom.
In the Find what
field enter this: [\r\n]+
In the Replace with
: ,
There is a space after the comma.
This will also replace lines like
Apples
Apricots
Pear
Avocados
Bananas
Where there are empty lines.
If your lines have trailing blank spaces you should remove those first. The simplest way to achieve this is
EDIT -> Blank Operations -> Trim Trailing Space
OR
TextFX -> TextFX Edit -> Trim trailing spaces
Be sure to set the Search Mode to "Regular expression".