- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 06:53 AM
Hi everyone,
I'm currently working on customizing the article creation experience in the Knowledge module. One of the features available in the rich text editor is the Insert/Edit Link option (alongside Remove Link). As shown in the image below:
When clicking the Insert/Edit Link button (or using Ctrl + right-click on selected text), a UI Page named html_insert_link_dialog is triggered and displayed.
I'd like to override this behavior so that, instead of loading the out-of-the-box html_insert_link_dialog, it opens a custom UI Page that I will create.
The challenge is that I haven't been able to locate where the redirection to this UI Page is configured. I need to understand what triggers the editor to load html_insert_link_dialog, so I can replace it with my own.
Has anyone customized this before or knows where the configuration or redirection logic to this UI Page is defined?
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2025 01:29 AM
I found a new solution to meet my requirement regarding article URLs.
Initially, I thought about customizing the Insert/Edit Link UI Page to redirect user-entered URLs to a new UI Page. However, after further analysis, we concluded that this approach wasn’t feasible.
Instead, I came up with a better and cleaner solution: using a Business Rule.
Here’s how it works:
When someone creates an article that contains an <a href> tag, the Business Rule is triggered.
Using a regular expression (RegExp), the rule finds and replaces the original URL (entered by the user) with the new target URL.
The modified content is then updated directly in current.type (which represents the article body).
This approach allowed me to meet the requirement without needing to heavily customize the UI Page.
Hope this helps someone facing a similar challenge!
Thanks,
Daniel Vieira
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 07:22 AM
Let's see some alternatives... when you click on the insert link icon - what happens? Or what shall the UI Page do?
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 07:29 AM
@Daniel Vieira
the closes I got so far would be here:
Configuring the TinyMCE toolbar via Dictionary attributes
Default buttons | bold italic underline undo redo | fontfamily fontsize table | forecolor backcolor link unlink | image media code | alignleft aligncenter alignright | bullist numlist fullscreen |
Available buttons | newdocument, bold, italic, underline, strikethrough, justifyleft, justifycenter, justifyright, justifyfull, blocks, fontfamily, fontsize, tablecontrols, cut, copy, paste, pastetext, pasteword, search, replace, bullist, numlist, outdent, indent, blockquote, undo, redo, link, unlink, image, cleanup, code, forecolor, backcolor, removeformat, hr, visualaid, sub, sup, charmap, media, preview, fullscreen, accordion |
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2025 03:02 PM
Hi @GlideFather
Since there is no solution for that, I'm trying to customize the UI Page, but I'm having trouble seeing any changes reflected when testing. I haven’t yet figured out how this UI Page is being triggered, so I attempted to insert some custom code directly into the HTML (for example, adding an <h1> tag or changing the text slightly), but nothing seems to change in the output.
Is there something more I need to do to make sure the UI Page updates are applied correctly? I expected that even small changes—like modifying the URL text—would show up, but they don’t. Any advice on how to properly customize or debug a UI Page would be really appreciated!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2025 03:10 PM
I'd been thinking the whole time it isn't possible (perhaps it is) but I didn't want to demotivate your efforts, this was the best I can give you..
Are you open to discuss some alternatives instead?
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2025 03:50 PM
Yes, definitely — I'm open to discussing alternatives!
I really appreciate your help, and it’s great to get a different perspective.
Let me explain why I’m trying to customize this. When someone creates an article in the Knowledge Base, they often include URLs pointing to other articles or even Record Producers. These links work perfectly in the Portal.
However, the issue arises when using the ServiceNow Mobile app. When users click those same links, they get redirected to the full Portal within the mobile app — which is not the desired behavior.
To address this, I created a UI Page that detects whether the user is on a browser or using the mobile app, and then redirects them to the appropriate destination (e.g., the mobile-friendly version). With this approach, it's working fine. We can be redirected to another page in Now Mobile correctly and the same happens in Portal.
The challenge is: for this to work, the person creating the article (who may not be familiar with HTML or technical details) needs to manually insert the correct UI Page endpoint into the link. That’s not ideal for end users or agents who aren't technical.
That’s why I’m trying to customize the UI Page behind the insert/edit link dialog, so we can automate this logic — ideally by injecting a bit of code that checks the user context (browser vs. mobile) and adjusts the link accordingly.
If you know of a better or more efficient way to achieve this kind of behavior or how we can redirect correctly for Mobile and Service Portal, I’m open to suggestions!
Thanks,
Daniel Vieira