Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to highlight specific words in a text area

PaulPDec 10 2020 — edited Dec 10 2020

Latest browsers FF and Chrome; APEX19.2
I have a requirement from my client to show specific words highlighted in a long field retrieved into a text area item from the DB. The data has no HTML tags associated with it. I have about 6 words that need highlighting if they appear.
I noticed that a text area won't resolve the data into HTML so substituting the words by wrapping HTML tags and attributes using CSS or Javascript won't display highlighting. e.g. <mark>foo</mark> displays literally. I've tried using a markdown item type with no result.
There must be a way to traverse the DOM and change the CSS on the page wrt a set of given words.
Any hints appreciated
PaulP

Comments
Post Details
Added on Dec 10 2020
3 comments
644 views