Hide editor HTML variable type

svizcaino
Kilo Contributor

Hi guys,

I was wondering, there is some way to hide the html editor when i display a catalog item form?

I create a variable html, and when i display the form, it show the editor, and i only want the information.

Captura de pantalla 2017-10-30 a la(s) 10.13.35.png

I try to reproduce this ServiceNow KB: Making HTML variable read-only on Geneva still shows the editor bar and large text bo...   and doesnt work! Could be a problem is this is in geneva and i have istanbul?

Thanks in advance!

Regards

-Sergio V

9 REPLIES 9

adityaghosh
Tera Guru

please use the below function say in OnLoad (client scripts)



function onLoad() {


    var sheet = window.document.styleSheets[0];


  sheet.insertRule('.mce-toolbar-grp { display: none !important; }', sheet.cssRules.length);


  sheet.addRule('.mce-toolbar-grp ', 'display: none !important;', -1); // IE likes to be different


    }



find_real_file.png



find_real_file.png


Thanks for your response.



Looks like that, when i apply the client script, it shows me only the default value of the variable.



Captura de pantalla 2017-10-30 a la(s) 10.38.47.png



Captura de pantalla 2017-10-30 a la(s) 10.39.19.png



Captura de pantalla 2017-10-30 a la(s) 10.40.09.png




Thanks!


adityaghosh
Tera Guru

Please use same logic i.e. script to p[populate the table and you may try the script provided before to hie html editor on say onChange, etc  


adityaghosh
Tera Guru

I am using the same logic and populiating contents of table on runtime i.e. using script & not default values..



find_real_file.png