Opened 8 years ago

Closed 5 years ago

Last modified 5 years ago

#8236 closed Bug (fixed)

specialchar plugin does not allow non-breakable space  

Reported by: anrikun Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:

Description

As a workaround for #5523, I have tried to add   as a special character available through the specialchar plugin.

It doesn't work: CKEditor adds a normal space instead of  

Change History (7)

comment:1 Changed 8 years ago by anrikun

More information: It works only when trying to insert a non-breakable space after a space.

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

comment:2 Changed 8 years ago by Jakub Ś

Status: newconfirmed
Version: 3.6.2 (SVN - trunk)3.0

It looks like the first space always gets truncated. This issue is only reproducible in Firefox and IE.

  1. open replacebycode sample and place the cursor at the end of text
  2. press space, switch to SOURCE

Result: Normal space was inserted and next truncated when switching to SOURCE


  1. open replacebycode sample and place the cursor at the end of text
  2. press space two times, switch to SOURCE

Result: First space is Normal and the second is  . The first one - normal space, is truncated when switching to SOURCE.


In Webkit and Opera insertHtml( ) inserts  , special char also inserts   no matter how many times you press it.

Space key produces interesting reslts:

  1. open replacebycode sample and place the cursor at the end of text
  2. press space once and switch to source -   is inserted
  1. Refresh
  2. press space twice and switch to source - normal space next to   is inserted. But the first space doesn't get truncated when switching between modes.

I have checked it under Chrome13, Opera 11.50 and Safari 5.1

comment:3 Changed 8 years ago by Jakub Ś

In my opinion #7137 is caused by the same problem as this one (Specialchar uses insertText() method but text is taken form HTML node into which HTML value is inserted).

Last edited 7 years ago by Jakub Ś (previous) (diff)

comment:4 Changed 7 years ago by Jakub Ś

Whether you are switching to source, use getData or use specialchar plugin result depends on browser as described in comment2

#6453 was marked as duplicate

comment:5 Changed 5 years ago by Dave C

Has this issue been resolved in any future versions of CKEditor? I've not been able to test it successfully in the demo on the main page in Firefox so I think maybe not and also since this ticket is still open but I see 7137 is resolved as fixed so I'm confused it this should be working now.

comment:6 Changed 5 years ago by Jakub Ś

Looks like this issue has been fixed.

I have checked code that special char plugin uses (can be checked in FF console):

var editor = CKEDITOR.instances.editor1;
var span = editor.document.createElement( 'span' );
span.setHtml( ' ' );
editor.insertText( span.getText() );

and it inserts   which doesn't get removed when switching to source mode.

I have then added   to special char dialog and it worked as expected.

In fact the only problem I have experienced was in IE8-10. When you add   at the end text, the   gets removed when switching to source mode and back. I don’t think however it is related to this ticket.
On one hand it works but on the other it doesn’t in 100%.

Last edited 5 years ago by Jakub Ś (previous) (diff)

comment:7 Changed 5 years ago by Piotrek Koszuliński

Resolution: fixed
Status: confirmedclosed

The problem with IEs is of different nature.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy