You don't need to use an external editor for this. You can make use of the Replace interval text...
command (you might have to upgrade Praat to a recent version if you don't have this command).
Depending on how your newlines are encoded, this should do the trick.
This will loop through all the tiers in the selected TextGrid and check whether it is an interval or point tier. In each case, the appropriate command to replace labels will be used.
The command uses 6 arguments: the tier to process, the beginning and the end of the point/interval range to process (0
meaning all items), the string to match and its replacement, and whether the match should be done using regular expressions.
# Run with a single TextGrid selected
# (or include in a larger script to process multiple objects)
for tier to do("Get number of tiers")
# Use appropriate replace command for interval and point tiers
# The command will replace all instances of "\n" by " " in all
# interval / point labels.
if do("Is interval tier...", tier)
Replace interval text: tier, 0, 0, "\n", " ", "Regular Expressions"
else
Replace point text: tier, 0, 0, "\n", " ", "Regular Expressions"
endif
endfor