Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

232
Vistas
  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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda