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

Midhun1
Giga Guru

Hi,



Could you please provide screen shot.


Study Optimizer courese.png


Brian, the users can click on these + and - icons to avoid scroll bars.



find_real_file.png


Another thing to consider would be to make some modifications in your HTML code, like using height: 100%; width: 100% rather than using 'px' values.


Because I make it ready only they cannot see the plus sign.   What would the the HTML to change the height?