AEM 6.5 RTE appends .html to links | Community
Skip to main content
Level 2
April 11, 2020
Solved

AEM 6.5 RTE appends .html to links

  • April 11, 2020
  • 2 replies
  • 7468 views

In AEM 6.5 I am having an issue with the link feature of RTE. It appends .html by default to any link starting with a "/". My application is Single Page so I want only the route. How can I override this default behavior? https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/configure-rich-text-editor-plug-ins.html#linkstyles does not have any insights.

Best answer by Theo_Pendle

Hi,

First of all, those are good instincts! 😉

However the solution is the following:

  1. Under the RTE node, create a child called htmlRules
  2. Under htmlRules create a child called links
  3. Add the following property to links:

 

 

ensureInternalLinkExt -- Boolean -- false​

 

 

 

Here is the resulting node structure:

PS: don't forget to add the htmlRules and links nodes to each RTE (the one in the cq:dialog and the in cq:editConfig for example).

This fixes the issue as you can see from this GIF:

 

2 replies

Level 2
April 11, 2020
I already tried to overlay /libs/clientlibs/granite/richtext/core/js/HtmlRules.js and comment "obj.href = href + CUI.rte.Constants.EXTENSION_HTML + query + anchor;".
Theo_Pendle
Theo_PendleAccepted solution
Level 8
April 11, 2020

Hi,

First of all, those are good instincts! 😉

However the solution is the following:

  1. Under the RTE node, create a child called htmlRules
  2. Under htmlRules create a child called links
  3. Add the following property to links:

 

 

ensureInternalLinkExt -- Boolean -- false​

 

 

 

Here is the resulting node structure:

PS: don't forget to add the htmlRules and links nodes to each RTE (the one in the cq:dialog and the in cq:editConfig for example).

This fixes the issue as you can see from this GIF:

 

October 26, 2021

How to do this for content fragments where RTE is being used ?

 

Level 2
September 4, 2022

Hi Swati,
Did you find any solution on this?