Opened 9 years ago

Closed 22 months 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 9 years ago by Alfonso Martínez de Lizarrondo

Keywords: Confirmed added; nbsp non-breakable space shift removed
Type: BugNew Feature

Only Shift + Space works in FCKeditor, not Alt+0160

comment:2 Changed 9 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

comment:3 Changed 8 years ago by Wiktor Walc

#6433 was marked as dup.

comment:4 Changed 8 years ago by Wiktor Walc

#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 8 years ago by anrikun

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

Last edited 8 years ago by anrikun (previous) (diff)

comment:6 Changed 7 years ago by Jakub Ś

#8766 was marked as duplicate.

comment:7 Changed 7 years ago by Jakub Ś

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 6 years ago by Geoff M

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 4 years ago by George Tudosi

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:10 Changed 4 years ago by Jakub Ś

Related issues: #13733 and #3015.

#9978 was marked as duplicate.

Last edited 22 months ago by Jakub Ś (previous) (diff)

comment:11 Changed 22 months ago by Jakub Ś

Keywords: non-breaking spaces removed
Resolution: invalid
Status: confirmedclosed

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();
        }
      });	
  });
});
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy