Hyperlink in HTML Field and open in new tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 12:58 AM
I have an HTML field in ServiceNow where users can toggle editability using a checkbox. Here's how it's configured:
UI Policy:
Name: Make HTML/Link field editable
Condition: When the checkbox is checked
Action: Sets the HTML field's Read-Only property to false, allowing users to paste links.
Business Rule:
Name: Edit HTML Field false
When to Run: Before Insert/Update (both set to true)
Action: After saving, it sets the field back to Read-Only (unchecked) and ensures the links cannot be edited unless toggled again.
Problem:
When users paste links into the HTML field, the links open inside the tiny HTML field rather than in a new browser tab. I know I can manually click the link icon and change "open link in..." to "New Window (_blank). However, the end users want the process to be seamless. They don’t want to manually modify the HTML—they just want to:
Click Allow Edit (checkbox on)
Paste links
Click Allow Edit (checkbox off)
Click the links later, and have them open in a new tab by default.
Question:
Is there a way to automatically modify the links in the HTML field to include target="_blank" when the field is set back to read-only (i.e., after the checkbox is unchecked)?
Alternatively, can I globally configure the HTML field to treat all links as opening in a new tab without manually adding target="_blank" for each link?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 01:38 AM
Hello,
You can set the property glide.ui.html.editor.default_link_target to _blank so that all links throughout the instance will open on a new tab.
If my answer has helped you in any way please mark it as correct or helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 01:57 AM
this property can be updated glide.ui.html.editor.default_link_target to _blank
But remember it would be a global change in entire instance which I won't recommend.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 03:41 AM
What if I don't want to press the link button, and just paste? I tried changing this, but it doesn't apply to the links i directly paste as free-text. They still use implicit.