0

I got some objects in my vue app and i want to wrap a specific string within this object into a <span class="myClass">mySearchedStringInObject</span> to add a class to this string for some highlighting of this searched string. After that, i pass that object as a prop to another component in my vue app and display the object values there (also to newly highlited string).

I have absolutley no idea how to do this, can anybody help me out here?

Alex
  • 132
  • 1
  • 4
  • 21
  • This has been asked a thousand times. See something like https://markjs.io/, if you have no idea how to implement yourself. – tauzN Apr 16 '21 at 16:09
  • Does this answer your question? [How to highlight text using javascript](https://stackoverflow.com/questions/8644428/how-to-highlight-text-using-javascript) – tauzN Apr 16 '21 at 16:10

0 Answers0