Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

339
Visualizações
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 Respostas
Responde à pergunta

0

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

enter image description here

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda