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

189
Visualizações
ExtJS highlight words in grid row till word is changed

i am using this code to mark special words in a 2 column grid row

gridRow.childNodes[1].firstChild.innerHTML = '<span class ="highlightClass">' + word+ '</span>';

Now everytime when I click inside the row, the word is not marked anymore because div is changing.

The expected behavior is, that the word is still marked till I am changing it.

Would be great, when someone could help me.

Thank you in advance

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can easily highlight words with the HTML tag <mark>.

Just to give you a quick direction, you could define a renderer for your two columns where you look for a precise word/s and replace/mark em with a regular expression.

For example, to highlight all the occurrences of the word "apple" in a column, you could define its renderer like below:

renderer: function (value, metaData, record) {                                        
      var wordToHighlight = "world";
      return value.toString().replace(new RegExp(wordToHighlight , "ig"), "<mark>$&</mark>"));
}           

So...

...something like "Orange Apple Pineapple" will be rendered as "Orange <mark>Apple</mark> Pineapple"
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