How to Customize the Insert/Edit Link Dialog in Knowledge Article Editor?

Daniel Vieira
Tera Expert

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:

 

html_editor_link.png

 

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!

 

 

 

1 ACCEPTED SOLUTION

@GlideFather

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:

  1. When someone creates an article that contains an <a href> tag, the Business Rule is triggered.

  2. Using a regular expression (RegExp), the rule finds and replaces the original URL (entered by the user) with the new target URL.

  3. 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

View solution in original post

11 REPLIES 11

SumanthDosapati
Mega Sage
Mega Sage

@Daniel Vieira 

Unique requirement. I doubt that to be possible. One option would be customizing the oob ui page but it has it's own drawbacks.

 

Regards,
Sumanth

I have to customize the UI Page, it's the best option.

 

Thanks for your help!

GlideFather
Tera Patron

Hi @Daniel Vieira,

 

this will be most likely impossible to achieve

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Yes @GlideFather, it seems impossible for me I would like to have more opinions. 

Thanks for your feedback!