- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 12:19 PM
Hello
How can I change the color of the hyperlink in the article Viewer (kb_view) and the color in the article body box editor (kb_knowledge)
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 10:16 PM
Hello @Mohamed Ezzeddi ,
Log in to your ServiceNow instance with administrative privileges.
Navigate to UI Scripts:
For Article Viewer (kb_view):
Go to Self-Service > Knowledge > View. Here you'll find the UI Page used for viewing articles.
For Article Body Box Editor (kb_knowledge):
Go to Self-Service > Knowledge > Create New. This is where you create new articles and use the editor.
Create or Edit UI Scripts:
For Article Viewer (kb_view):
Click on the UI Page for kb_view. Then, click on the "Script" tab. Here, you can create or edit scripts using JavaScript and CSS.
For Article Body Box Editor (kb_knowledge):
Click on "New" to create a new article, or edit an existing one. In the editor, you can access the HTML source code to add CSS.
Add Custom CSS:
In the scripts, you can add CSS code to change the hyperlink color. For example, to change the hyperlink color to blue, you can use:
a {
color: blue !important; /* 'important' overrides any other conflicting styles */
}
Save Changes:
After adding the CSS code, save the script.
Preview and Adjust:
Test the changes by viewing an article or editing an article in the respective interfaces. If the color doesn't appear as expected, you may need to adjust the CSS properties.
Please note that modifying the UI elements and styles in ServiceNow requires a good understanding of CSS and potentially JavaScript. Also, be cautious when making changes in a production environment, as they could potentially affect the overall user experience.
Always make a backup or take a snapshot of your instance before making significant changes. If possible, consider testing these changes in a non-production instance first
Mark helpful or correct if applicable.
Thanks & Regards,
Sayali Gurav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2023 10:16 PM
Hello @Mohamed Ezzeddi ,
Log in to your ServiceNow instance with administrative privileges.
Navigate to UI Scripts:
For Article Viewer (kb_view):
Go to Self-Service > Knowledge > View. Here you'll find the UI Page used for viewing articles.
For Article Body Box Editor (kb_knowledge):
Go to Self-Service > Knowledge > Create New. This is where you create new articles and use the editor.
Create or Edit UI Scripts:
For Article Viewer (kb_view):
Click on the UI Page for kb_view. Then, click on the "Script" tab. Here, you can create or edit scripts using JavaScript and CSS.
For Article Body Box Editor (kb_knowledge):
Click on "New" to create a new article, or edit an existing one. In the editor, you can access the HTML source code to add CSS.
Add Custom CSS:
In the scripts, you can add CSS code to change the hyperlink color. For example, to change the hyperlink color to blue, you can use:
a {
color: blue !important; /* 'important' overrides any other conflicting styles */
}
Save Changes:
After adding the CSS code, save the script.
Preview and Adjust:
Test the changes by viewing an article or editing an article in the respective interfaces. If the color doesn't appear as expected, you may need to adjust the CSS properties.
Please note that modifying the UI elements and styles in ServiceNow requires a good understanding of CSS and potentially JavaScript. Also, be cautious when making changes in a production environment, as they could potentially affect the overall user experience.
Always make a backup or take a snapshot of your instance before making significant changes. If possible, consider testing these changes in a non-production instance first
Mark helpful or correct if applicable.
Thanks & Regards,
Sayali Gurav