Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

236
Views
  is inserted instead of the white-space for the redactor-js

Why   is inserted instead of the white-space after inserting the second space in the row between two words or numbers, e.g. 1 2. When I click on the HTML button I see 1  2. I think it is correct behavior but I don't understand does this happen because of the browser or there's any flag in the code which turn it on? I didn't find any documentation for the redactor-js.

Please find the source code by link https://github.com/html5cat/redactor-js

Please find the redactor (a new version) by link https://imperavi.com/redactor/

Steps to reproduce:

  1. open the link https://imperavi.com/redactor/
  2. clear the redactor
  3. write 1 2 (two spaces between)
  4. click on the HTML button
  5. check that there's 1  2 instead of 1 2

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Its because in html when you have multiple spaces the browser will strip them out.

The &nsbp; is a html entity called a non-breaking space that allows programmers to over come this intended functionality.

https://www.w3schools.com/html/html_entities.asp

In this instance as its a WYSIWYG, it will replace multiple [space]'s with the html entity so that it displays as the user intends.

Specifically in this instance its handled by the browser and the "contenteditable" attribute.

https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!