Plans supporting the use of custom CSS and JS in knowledge base site
Professional | Business | Enterprise |
---|---|---|
When 'Highlight Matching Search Keywords in Articles' is enabled, search keywords within articles are automatically highlighted. By default, the highlight color is yellow. You have the flexibility to customize this color according to your preferences. The following steps will allow you to change the highlight color for search keywords in articles, applicable to both light and dark modes.
Solution
Navigate to Settings (
) > Knowledge base site > Customize site > Custom CSS & JavaScript in the Knowledge base portal. Paste the below CSS snippet in the CSS tab.
For KB Site 1.0,
mark {
background-color: green;
color: white;
}
For KB Site 2.0,
.fp-search-content em, .search-content em {
background-color: #4E1E66;
color: white;
}
Update the desired color in the above snippet.
In the above sample snippets, green and purple colors are used with white font. You can customize it with your desired color.
Click Save.
Outcome
Before
Highlighted font with the standard colors offered by Document360 (before customization).
After
Highlighted font after customization with the background color #4E1E66
and font color white
.