Opened 15 years ago
Closed 8 years ago
#5523 closed New Feature (invalid)
No longer possible to insert non-breakable spaces like in FCKeditor
Reported by: | anrikun | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: | geoffm@… |
Description
Since CKEditor, it is not possible to insert non-breakable spaces anymore like it used to be in FCKeditor. In FCKeditor, it was possible to add a non-breakable space pressing Shift + Space or Alt + 0160. In CKEditor, this is not possible any longer. I consider this as a bug as it is a regression.
Change History (11)
comment:1 Changed 15 years ago by
Keywords: | Confirmed added; nbsp non-breakable space shift removed |
---|---|
Type: | Bug → New Feature |
comment:4 Changed 14 years ago by
#7136 might be causing some problems while implementing this feature (at least when inserting the non-breaking space while typing, not in the middle of a text that already exists).
comment:5 Changed 14 years ago by
Bumping this with a new information:
As a workaround, I have tried to add as a special character available through the specialchar plugin.
It doesn't work either: CKEditor adds a normal space instead of I will add a separate issue about this too.
Edit: the separate issue is #8236
comment:7 Changed 13 years ago by
Just a note: This is reproducible in all browsers.
Webkit and Opera might give the false impression that it is working (look at comment 2 in #8236) but the behavior is for SPACE not for SHIFT+SPACE.
comment:8 Changed 11 years ago by
Cc: | geoffm@… added |
---|---|
Keywords: | non-breaking spaces added |
Bump... When are they putting back this essential feature? If I write "100 km" or "10 000" in a text I do not want "100" at the end of one line and "km" at the beginning of the next, they need to stick together. It's even worse when numbers are cut in two. Non-breaking spaces are essential in any text-rendering software, I don't know what they were thinking in removing this feature!
comment:9 Changed 10 years ago by
I'm using a “Typography keyboard layout” allowing to enter arbitrary Unicode characters directly. So I'm able to use non-breaking space U+00A0 in any software, but CKEditor silently replaces it by ordinary space.
Please fix it. If I enter a special character, I know exactly what and why I'm doing, and I'd like it to work as desired.
comment:11 Changed 8 years ago by
Keywords: | non-breaking spaces removed |
---|---|
Resolution: | → invalid |
Status: | confirmed → closed |
From what I have checked it is possible to add such shortcut without problems. Although there is no such feature by default, there is no problem in adding it with the help of CKEditor API.
var editor = CKEDITOR.replace( 'editor1', { }); editor.on( 'pluginsLoaded', function( evt ) { CKEDITOR.config.specialChars.unshift( [' '] ); editor.on( 'contentDom', function( e ) { var editable = editor.editable(); var doc = editor.document; editable.attachListener( doc, 'keydown', function( event ){ if(event.data.getKeystroke() === (CKEDITOR.SHIFT+32)){ editor.insertHtml( ' ' ); event.data.preventDefault(); } }); }); });
Only Shift + Space works in FCKeditor, not Alt+0160