Change size of html editor

Brian Lancaster
Tera Sage

I have a catalog item that is displaying has an HTML editor to display the training courses that someone need to take before requesting access.   This is displayed on the screen as read only.   Is there a way to make it longer do it does not have a scroll bar?

1 ACCEPTED SOLUTION

rohantyagi
ServiceNow Employee
ServiceNow Employee

Yes you need too write a client script "on Load". Should be as simple as this:



g_form.getControl('<VARIABLE_NAME>').style.height = '150px';



Please refer this article for more details.



If it was a regular field on the form, Field Style configuration in SN could have worked but it is about variable field styling which is not possible without a client script at this time.  


View solution in original post

15 REPLIES 15

Kailash Bhange
Kilo Sage
Kilo Sage

Hi,

For me "g_form.getControl" was not working for sc_task table so I used g_sc_form.

If anyone still looking to get it done, please write onLoad Client script for Catalog item with below Code.

 

var form = typeof g_sc_form != "undefined" ? g_sc_form : g_form;
var myControl = form.getControl("VARIABLE_NAME");
myControl.style.height = '100px';

 

Hope this helps.

If my answer resolves your issue, please mark my answer as Correct & Helpful based on the validations.

Thank You!
Regards,
Kailash