RichText editor custom inline hyperlinks not supported

I am using a rich text editor in my app and i want to add inline deeplinks in the format.

name://path?type=a&source=b

When i add the inline hyperlink it is automatically removed and formatted as follows without the href. Is there any workaround for this ?

"

  1. aaa
  2. jdfghjfghj
"

<a rel="noopener noreferrer" target="_blank">aaa</a>

Hello @Mahendra_Dassanayaka,

The issue you're experiencing with the hyperlink not appearing after a page refresh is due to using an incorrect default value.

To ensure hyperlinks are retained correctly in the Rich Text Editor, use a properly formatted HTML string like this in the default value:

<p><a rel="noopener noreferrer" href="https://www.google.com/search?q=grpc+api&amp;sca_esv=91e9498f46de628c&amp;sxsrf=AE3TifMVQ2UWzfIDnj6P90edNmTKUXWBxw%3A1752757626708&amp;ei=evV4aOb8Kp3M1e8PrO34wAM&amp;ved=0ahUKEwjmod79-sOOAxUdZvUHHaw2HjgQ4dUDCBA&amp;uact=5&amp;oq=grpc+api&amp;gs_lp=Egxnd3Mtd2l6LXNlcnAiCGdycGMgYXBpMgUQABiABDIFEAAYgAQyBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAEMgUQABiABEiNG1DmDVitEnABeACQAQCYAZEBoAH0BKoBAzAuNbgBA8gBAPgBAZgCBaACkATCAgcQIxiwAxgnwgIKEAAYsAMY1gQYR8ICDRAAGIAEGLADGEMYigXCAgQQIxgnwgIKEAAYgAQYQxiKBcICDRAAGIAEGLEDGEMYigXCAggQABiABBixA5gDAIgGAZAGCpIHAzEuNKAHhRuyBwMwLjS4B4sEwgcFMC40LjHIBw0&amp;sclient=gws-wiz-serp" target="_blank">Hello</a></p>

I discovered this correct format by applying a hyperlink within the editor and then inspecting the resulting value. Using that exact output as the default value ensures the hyperlink is preserved across refreshes.

4 Likes

Hi @Mahendra_Dassanayaka, the hyperlink will let you pass in urls to other webpages with the format: https://www.somedomain.com/page?param=2 or http://google.com or relative paths within your website: customers?user=2 -> yourretooldomain.com/someid/appname/customers?user=2.

Inputting paths that it can't navigate to, whether it's an unfamiliar format or an attempted link to the filesystem (like Users/Mike/Documents/etc), will change to about:blank.

1 Like

Thanks for the clarification @Mike_M. My attempt is to include an app hyperlink like app_name:://appscreen_name?param=1234. Is there any way I can achieve this ?

I think the app_name:// part is what is not working. Have you tried using the whole url? ex: https://your_username.retool.com/apps/some_alphanumeric_id/app_name?param=1234

1 Like

no @Mike_M it is a predefined format. in my case this is a mobile app

Oh ok, mobile might change things. This is the type of link I get when I click "Copy deep link" from a mobile app: https://retool.com/mobile/link?type=APP&path=Mobile%2520test&host=...

Does that not work?

Also are you linking from one mobile app to another?

1 Like

@Mike_M we are using this basically to navigate to screeens via emails and push notifs and the format is self defined that is why it starts with app_name:://screen_name?param=1 format.

In testing links in the rich text editor I found out that your example, app_name:://screen_name?param=1 actually does work, but only if there's an underscore in app_name.

Something else I tried out is a leading slash would also work (regardless of underscores), ex: /appname:://screen_name?param=1. Let me know if that is a viable solution!

Also I changed the topic category to Mobile, just for reference to anyone seeing this thread later.

1 Like

Hi @Mahendra_Dassanayaka, just checking in! Were you able to get this working?

1 Like

Hey @Mike_M adding an underscore works but it needs a total revamp of the app deeplinks currently defined/used. Thanks for the help.

1 Like