DEV Community 👩‍💻👨‍💻

Discussion on: Highlight text in paragraphs with a simple directive in Angular

ribizlim profile image
Mark Magyarodi

nice solution, but what happens if the element has nested HTML tags? those are not returned by textContent right?

adisreyaj profile image
Adithya Sreyaj Author

Yup...if there is nested tags, we may need to either provide the text content as input or maybe pass a selector for the text element as input.