Question

Highlight keywords in text area field.

Hi Team,

Can you please help with how to highlight/bold keywords in a text area field. There are certain keywords that need to be highlighted.

Correct Answer
December 11, 2019 - 4:44am

Hey SaikiranTK,

You could use the HTML bold tag to only have parts of your sentence bold and as above use a rich text editor to display the sentence. this can be done with a field value, or can be done by placing the HTML in the message when creating.

Example below.

<p>This is normal text - <b>and this is bold text</b>.</p>

Comments

Keep up to date on this post and subscribe to comments

Pega
December 6, 2019 - 11:00pm

Hi Kiran,

You can use "Rich Text editor" control instead of text input, where you can make the words in bold.

Please let me know if you are facing any issues with this.

December 9, 2019 - 12:05pm
Response to kanap2

Hi Kanap,

We don't want to highlight the whole sentence but just few words within the sentence and also the field is read only.

Pega
December 10, 2019 - 11:31am

Hi Kiran

If the field is read only, you can use RichTextDisplay control.

December 10, 2019 - 11:53am
Response to mahab_GCS

Hi Mahab,

But how do i highlight keywords rather than whole sentence, i was using replaceAll function but that can replace/highlight only 1 word. So, is there any function to do for array of words.

 

December 11, 2019 - 4:44am
Response to SaikiranTK

Hey SaikiranTK,

You could use the HTML bold tag to only have parts of your sentence bold and as above use a rich text editor to display the sentence. this can be done with a field value, or can be done by placing the HTML in the message when creating.

Example below.

<p>This is normal text - <b>and this is bold text</b>.</p>