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

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

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 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