Hi there,
I was having serious problems with line breaks when using the editor. When I was getting the text from the editor and saving it, it would save the line characters and carriage return characters. "\r \n"
Before saving the text, you need to remove these characters from the string.
Hope this helps!
Paul.