Change style multi line text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2017 09:44 AM
Hi all,
i have a multi line text variable in a catalog item on service portal.
How can i change the style of this variable on service portal? For example, i would want to change background color, color text, bold, ecc.
The name of the variable is var_ssmart_infoautista
Thanks in advantage.
Regards,
Emanuele Signorin
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2017 09:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2017 10:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2017 10:12 AM
I don't have the definitive answer for you. But there is some advice at this page:
Variable Types - ServiceNow Wiki
Note that the edit bar disappears if the variable is readonly.
I'm not sure that is satisfactory for you. But it's the only advice I had at the moment.
Does anyone else know about this?
EDIT:
Here's a link to a more recent document with more information about configuring the edit menu for HTML fields.
Note that it doesn't say how to remove it completely. But you do have some control over what displays.
It's also good to know which type of editor you're using, as the instructions vary depending upon the editor in use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2017 06:51 PM
Use the below code:
function onChange(control, oldValue, newValue, isLoading) {
var cTypeLabel = $('label.incident.contact_type');
var cTypeField = $('incident.contact_type');
if (newValue == 'Self Service') {
cTypeLabel.setStyle({backgroundColor: "red"});
cTypeField.setStyle({color: "red"});
}
else {
cTypeLabel.setStyle({backgroundColor: ""});
cTypeField.setStyle({color: ""});
}
}
Thanks,
Aditya Telidevara