Remove HTML tags from bottom of HTML field

ColeM
Tera Guru

Is there a way to remove the html tags from the bottom of an HTML field? 

HTML Tag Example.PNG

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @ColeM ,

 

You can remove the HTML tag breadcrumbs (status path) from the bottom of the HTML field using an onLoad Client Script, but note that this method manipulates the DOM, which is not recommended by ServiceNow. It may break after upgrades or not always load reliably.

 

I’ve tested this approach in a Yokohama PDI, and it works as expected.

Client Script (Not recommended approach):

1. Go to System Definition > Client Script > New.

2. Configure the script:

Name: Hide status path from HTML field

Table: <Your Table>

Type: onLoad

Isolated script: uncheck (important when manipulating DOM)

function onLoad() {
    var sheet = window.document.styleSheets[0];
   sheet.insertRule('.tox-statusbar__path { display: none !important; }', sheet.cssRules.length);
}

3. Save and test.

 

MIftikhar_3-1760544584131.png

 

I confirmed the class name ".tox-statusbar__path" using the browser console (F12). 

I have implemented this for Project [pm_project] table.

 

It will be applied to all HTML fields in Project [pm_project] table.

 

MIftikhar_2-1760544225370.png

 

If my response helped, please mark it as the accepted solution so others can benefit as well. 

View solution in original post

7 REPLIES 7

Community Alums
Not applicable

Hi @ColeM ,

 

Can you please explain what is your requirement?

These tags only appear for the current line e.g. if you are typing a plain text "p" will be shown at the bottom, if you bold the text then "p > strong" appears. 

 

If my response helped, please mark it as the accepted solution so others can benefit as well. 

The requirement is to remove HTML tags from HTML fields to improve user expierence.  

Community Alums
Not applicable

Hi @ColeM ,

 

You can remove the HTML tag breadcrumbs (status path) from the bottom of the HTML field using an onLoad Client Script, but note that this method manipulates the DOM, which is not recommended by ServiceNow. It may break after upgrades or not always load reliably.

 

I’ve tested this approach in a Yokohama PDI, and it works as expected.

Client Script (Not recommended approach):

1. Go to System Definition > Client Script > New.

2. Configure the script:

Name: Hide status path from HTML field

Table: <Your Table>

Type: onLoad

Isolated script: uncheck (important when manipulating DOM)

function onLoad() {
    var sheet = window.document.styleSheets[0];
   sheet.insertRule('.tox-statusbar__path { display: none !important; }', sheet.cssRules.length);
}

3. Save and test.

 

MIftikhar_3-1760544584131.png

 

I confirmed the class name ".tox-statusbar__path" using the browser console (F12). 

I have implemented this for Project [pm_project] table.

 

It will be applied to all HTML fields in Project [pm_project] table.

 

MIftikhar_2-1760544225370.png

 

If my response helped, please mark it as the accepted solution so others can benefit as well. 

Ankur Bawiskar
Tera Patron
Tera Patron

@ColeM 

that is just used to increase/decrease the height

why you want to remove?

💡 If my response helped, please mark it as correct ✔️ and close the thread 🔒 — this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader