I'm using insertHtml to populate the editor with images from a gallery software. It would be tremendously helpful if I could force a trailing space and/or linebreak after each image, since people use it to insert several images at once.
Is it somehow possible to do that? At the moment, I have the problem that " " gets trimmed and " " is parsed to "  " in WYSIWYG (a non-breaking space would be not my preferred choice for obvious reasons).
Thank you for your thoughts.
Is it somehow possible to do that? At the moment, I have the problem that " " gets trimmed and " " is parsed to "  " in WYSIWYG (a non-breaking space would be not my preferred choice for obvious reasons).
Thank you for your thoughts.
Re: insertHtml and trailing space
Also I had no problems using in insertHtml
Re: insertHtml and trailing space
I use this to insert code into the editor; it works for both Wysisyg and code mode:
Note the space at the end of my example code? It gets trimmed as soon as the code is injected. There has to be some processing going on, since the code is immediately changed into the image (which is what I want).
Re: insertHtml and trailing space
Is the space between images preserved?
Re: insertHtml and trailing space
Which does not preserve the space inbetween either.
Then I tried
This way the space in the middle is preserved. That's what makes me think that the trailing space gets trimmed when fireing insertHtml. The same is true, btw, for leading space.
Re: insertHtml and trailing space
Walking through bug reports I've found this http://dev.ckeditor.com/ticket/6876
Maybe editor.insertText(' '); will work for you?