I am looking for a solution against the creation of unwanted nbsp's, but cant find tips, which are more user- oriented.
the problem is described eg. here
http://ckeditor.com/forums/Support/Preventing-double-space-being-converted-%C2%A0
and here
http://stackoverflow.com/questions/9741620/ckeditor-unwanted-nbsp-characters
- This seems to be a well known limitation to the editor, so, is there an official position on how to generally deal with this?
- is there an overview of the problem, and possible solutions / workarounds?
did not find anything from quite some googling and FAQ-reading....
I could imagine a number of solutions,
eg. a setting to generally disallow nbsp's (replace them all on save).
or a plugin to show invisible chars, something like text-editors offer, or what the show-blocks plugin already does.
my findings towards a solution:
One "Solution" that i have seen is implemented in FCK Editor Version 2.6.4.1 Build 23187, which is used in the e-Commerce System GAMBIO GX2. You can see it in the GX2 Demo:
When you delete one of 2 spaces which are next to each other, the editor is automatically deleting the nbsp entitiy, even if the cursor position was on the regular space character.
Deleting the middle of 3 words, leaves a normal and a nbsp space.
Another behaviour can be seen on CKEditor 4.2.dev, used in DRUPAL's current Alpha4 (test-installation click on "launch sandbox", folow the installer, when finished, click "add content" on the left.):
When a word is marked by doubleclicking, the following space char is also selected, so when you press delete, you end up with only one regular space.
Even when you manually select the middle WORD only, and press delete, the following space will be removed also.
So i conclude, the current Editor 4.2.2 could in deed do better on this issue.
I thought i had seen issues about this before, but i did not find any, so i created one:
https://dev.ckeditor.com/ticket/11024
We are awere of this problem,
We are awere of this problem, but it is a browsers bug and we cannot fix all possible cases. Read more here - http://dev.ckeditor.com/ticket/9929#comment:15. We can however try to implement some workaround which will reduce the impact of this bug, but we'll definitely wait some time to see what Google/Apple will do about this.
Piotrek (Reinmar) Koszuliński
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
a possible solution / workaround:
http://ckeditor.com/forums/CKEditor/your-thoughts-tips-for-a-nbsp-highlighter-plugin