CERN Accelerating science

How to disable non-breaking space with the CERN Full HTML format?

Hi everybody,

Is there a way to disable the automatic insertion of non-breaking space   in the code when you are in CERN Full HTML format ?

I often encounter this issue when i insert HTML from source and then open the text component again.

Example :

<div class="separation-line"></div>

becomes <div class="separation-line">&nbsp;</div> when reopening the Text Component holding it.

I looked under Configuration > Text formats and editors but didn’t find anything relevant.

Thank you,

Maxime

Hey Maxime,

Try the following solution:

  1. Visit admin/config/content/formats/manage/cern_full_html in your website
  2. Click on configure on the format that you use
  3. Enable the " Convert line breaks into HTML (i.e. <br> and <p> )" option

Let me know if that solves your issue.

Konstantinos

Hey @kplatis,

Thanks for your answer. I just tried and it doesn’t work. I still get &nbsp;

Maxime

Hi Max,

This is the default behavior of the CKEditor. In order to fix this you need to add something to its configuration file which is not possible since you don’t have a local copy but you are using the version from infrastructure.

However you can use this module https://www.drupal.org/project/nbsp This is a known issue in Drupal and the community have created a module for it.

Hi @sboutas,

Ah i see, is it a fix that would eventually be helpful for the CERN community ? :slight_smile:

I installed the module you recommended but unfortunately the issue is still here. Checking or not the “Cleanup NBSP markup” doesn’t change anything, non-breaking space are still inserted by default.

Maxime

@sboutas, i found the solution, using the no non-breaking space module :slight_smile:

Thank you very much for your help.

Maxime