logo

NJP

ServiceNow tutorial on HTML styling |servicenow knowledge management tips | ServiceNow Notifications

Import · Apr 26, 2022 · video

[Music] hi all and welcome back so in today's tutorial we'll be looking on one more interesting topic with respect to the html fields so every company uh have their own company standards with respect to foreign font size how exactly they want to showcase data with respect to you can say knowledge article or whenever they are sending the notifications also they want to follow the same set of standards okay so it's difficult every time that we we have a default standard set on the html field on the knowledge base and it's difficult that we have to go and edit the html tags every time we create a knowledge article just to have this branding so i got a question from a user that is it possible to change the default font family and font size when creating new knowledge articles via some some kind of configurations and today we'll be trying uh we'll try to answer the same okay so basically first try to and let's try to understand the problem statement so for example we have a knowledge article so if we go and if we go to the new knowledge article okay if we create a new knowledge article so basically this is a template which we get okay we give knowledge base which knowledge basis belongs to short description blah blah blah and then we have article body so this is the the article body which you see over here this is what gets showcased to a user okay once it gets published so as per the normal standard means by default it got stuck to vardhana as a font called now font size is eight point okay and so on so the question is like can we very modify it out for example if if my company wants to follow send share okay sinusoidal font so is it possible for me that i can do the default configuration vertical body that it will follow sans serif and it will follow the font size as 12 rather than modifying it every time i do the code so how basically if you want to they type something out so this is the key p article so once i typed it out i i i have to go to the source code and i have to do the changes to the source code okay once it gets saved that's when it will be showcasing okay this is not a ideal scenario so how to change it out this particular statement set the default configuration so that every time you create a knowledge article it will follow the same set of standards so this configuration pretty easy so basically what you have to do simply you don't have there are first of all there is a misconception with a lot of people i've seen on the community that they fit everything which is configuration as done via system property but not everything right so this is done via dictionary entry so basically what you can do on this article body right you can simply right click so i've already right click but it's taking some time right click and let me just do it right click again so you will be configuring the dictionary in order to set this values out okay right click and to configure dictionary i may have to leave this out and here you can see the type of this of this knowledge article this entry is translated html so we have to modify it out so how we can modify it out so basically you can see currently there are no such attributes or no such modification where we can so there is nothing choice field specification no default palette nothing so what you have to do you have to first go to the advanced view okay and in advance view what you can do you can go to the default values and here you can give the default configuration for your for your html html field okay so for example let's consider it as a paragraph only so we can give paragraph okay i will close that paragraph off and in that i will give a span tag and in span tag let's provide a style equal to the first type we will be providing is like font family so i will give font dash family colon and i will give say i i know this because i i'm using the same in my company also so it's i will just zoom out somewhere so it's sheriff sheriff commas and that does shell and what else what other things i want to do let's do the font size also so i will give go with font dots slash size okay and we'll give it to 12 point so you know the default was verdana and eight points so we are changing it to sans serif and twelve point and then semicolon again you can give and nbps which is space and then we will close the span tag so for now i have added only couple of things okay you can add as many things as you want in the styling okay and it will work for the same so this is all we have to do and if i save this out save this out and what i will do i will just go and create a new article now so i'll go create a new article and we will wait for it to get loaded okay i don't know my internet is so what and now you can see the article body now whatever you type over you okay you can if you want you can remove i just wanted to add a signature over there but if you can remove and now if i reload this form out right so what if now you can see the font family change to share if the uh the fonts is changed to 12 now if i find if i write anything hello world so it will follow the form of the styling which you have defined on the dictionary entry isn't is amazing so you don't have to do it for each and every val each and every knowledge article you have to go to the source code and change the things out okay you can simply change it from here okay now this is not only restricted to knowledge base it's just it you can do the same wherever there is a html field for example on the notification we in our organization have on standards on notification also that it should have certain font it should follow certain styling and all this thing so i can do the same thing on that thing also or if you want to explore more options so you can go to dictionary system definition under system definition this is a dictionary tab and if i go to dictionary you can find n number of fields okay so you can simply what you can do you can simply type html over here and now whatever list you will see on the screen will be the list of ways which you can modify doing the same so it can be work around on the html one problem task cmdb service blah blah blah and so on okay so for all these things you can change the default styling you can have a separate styling on different entities that is also possible okay so this is all for today's tutorial i hope this is useful to you and you will not be doing the changes on each and every html field individually you will set a standard company standard as a default uh configuration on the dictionary entry and then everything will be done for you okay so this is all for today's tutorial hope you like this tutorial please like follow subscribe my channel to get the updates on my latest videos okay please drop comments so that i will get some motivation to create more content for you and stay safe and stay happy okay so thank you thank you all bye you

View original source

https://www.youtube.com/watch?v=Mgyx-Ds_0Vk