Jump to content

nbsp not working in CK Editor


Jules Vau
 Share

Recommended Posts

Hello,
I use CK editor with ProcessWire 3.0.96 and I am not able to use a non-breaking space (nbsp).
When I put an nbsp in the "Source" window in CK Editor nothing happened to the client side, the markup is removed.

My configuration below:

  • Content Type: Markup/HTML
  • Edito Mode: Inline Editor
  • Use ACF? Yes
  • Use HTML Purifer? Yes
  • Convert div tag to paragraphs tags Yes
  • Remove empty paragraph tags Yes
  • Remove non-breaking spaces (nbsp) No

I put nbsp; in Extra Allowed Content field but nothing happened.
Can anyone help me?


Thanks in advance.

Link to comment
Share on other sites

Welcome to the PW forums @Jules Vau

2 hours ago, Jules Vau said:

When I put an nbsp in the "Source" window in CK Editor nothing happened to the client side, the markup is removed.

Probably silly question, but you are entering   right?

It is working for me with the same settings as you show above (although I didn't enter anything in Extra Allowed Content as that shouldn't be needed in this case). I tested in 3.0.99 but I don't think anything has changed in this regard since 3.0.96.

2018-04-23_101039.png.6a4210209181a01c83e44be3dc55c5e3.png

2018-04-23_100925.png.cc191b3ab8b572a550f574dd0c89fbc5.png

Link to comment
Share on other sites

17 minutes ago, Robin S said:

Welcome to the PW forums @Jules Vau

Thank you @Robin S I am very glad to be part of the fantastic PW community.

16 minutes ago, Robin S said:

Probably silly question, but you are entering   right?

You are right I put  

Unfortunately with the same settings it still not working for me as you can see below :(

5add0c9756080_Capturedecran2018-04-23a00_25_59.png.c28c7eca89e94adc28d44676099ed477.png

5add0c95d8670_Capturedecran2018-04-23a00_26_24.png.207ed78eeb0287250c763ac6f9c5de39.png

Link to comment
Share on other sites

1 minute ago, Jules Vau said:

Unfortunately with the same settings it still not working for me as you can see below

Are you positive the   is not actually there in the source? Not sure what tool that screenshot is from but some tools will decode HTML entities in which case   would just display as a space between words.

Also, I can see an inline color style in your screenshot - is that coming from Javascript perhaps? If so, disable all your Javascript to make sure it is not responsible for converting the   entity.

  • Thanks 1
Link to comment
Share on other sites

7 hours ago, Robin S said:

Are you positive the   is not actually there in the source? Not sure what tool that screenshot is from but some tools will decode HTML entities in which case   would just display as a space between words.

You are right.
I was inspecting with Firefox decoder tool  which is not displaying nbsp whereas Chrome decoder tool (see image below) display them.
Thank you @Robin S you made my day whereas is only 8:30am in Paris!

5add80c9f02b1_Capturedecran2018-04-23a08_42_40.png.f3541a5b60946f0255869ca09e91c263.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...