Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Set Rich Text Value in client script

Peter Xiang
Tera Expert

Hi Everyone,

I want to use client script to modify the rich text value in the Rich Text lanel type. Does anyone know how to implement it?

find_real_file.png

19 REPLIES 19

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Did you try to set html string using g_form.setValue()

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Bawiskar,

I used used g_form.setValue("banner"), g_form.setValue("bnnder.rich_text") and g_form.setValue("rich_texk"), none of these approaches will work.

Hi,

which is the table and what is the field name?

did you try this

g_form.setValue('field name', 'my text');

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi,

This is CatalogVariable, not fields.