Hi,
On Safari, The API call InsertHtml() converts the preceding and following whitespace into a nonbreaking space ( ).
This Issue http://dev.fckeditor.net/ticket/1509 was raised for IE6/7. And from the discussion,
Since the in Safari and Opera is added by the browser rather than by FCKeditor, and they have a good reason for doing so. I suggest we only fix the issue for IE, and just leave it as-is in Opera and Safari.
Re: insertHTML in Safari introduces a non breaking space
I used DOM methods to remove the nbsp characters.
I inserted a id into the html fragment inserted into the FCKEditor. Then using getElementById, I retrieve the inserted element node. And i get Previous and next sibling nodes of the inserted node.
The i used the following regex
prevSib.textContent = prevSib.textContent.replace(/\u00a0$/," ");
to replace the nbsp character.
Does this approach make sense?
Regards,
Deepak