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

341
Vistas
React Quill Editor - Losing Text Formatting

I am using the Quill editor in a React app, using react-quill.

On my app, the user can perform a search for a word in the editor and if it's found, I simply highlight the word using the Quill API formatText()

My app also uses the standard MUI dashboard with a left hand menu bar.

The problem I'm facing is this. After the user enters a word to search on, I then highlight the word(s) within the editor. However, when I collapse the menu using the hamburger menu icon, all of the highlighting is lost.

Here's the app with the menu open and words highlighted - using the Quill API formatText().

enter image description here

Upon collapsing the menu, the highlighting is lost...

enter image description here

I also notice this behaviour when the app is displayed on mobile phones and when the keyboard is dismissed - again losing all highlights.

Interestingly, if I do a before and after getContents(), the fomatting attributes are indeed lost at 'after'.

How do I preserve the formatting? and secondly, why does this happen?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I wasn't setting the value, ie, wasn't doing this...

enter image description here

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