Here's the scenario. I have an HTML text control configured to display the contents of a plain text field of a SharePoint list item. The text has HTML code including two hyperlinks. Only the first link would work. The second link looked like a link, but it was not clickable. After playing around with it some, it seems that a link will only work if it happens to be in the first line of the control, which my first link was. When I add more text before the first link so it gets moved to the second line, it also stops working.
Does anyone know a fix or workaround for this bug?
Thanks for the feedback.
But I don't think HyperLink would work with HTMLText control. Would you please share a screenshot of the link that "worked"?
If you would like to navigate to some webpage, you could take use of the launch function with OnSelect property.
I tried this scenario and links worked on all lines - see an example below:
"<p>Show your <a href=""https://www.microsoft.com"">Link here</a> text here.</p> <p>Another line, another <a href=""https://www.bing.com"">link</a>...</p> <p>And a third line, with <a href=""https://www.msn.com"">another link</a>.</p>"
Can you post what the HtmlText property of the HTML Text control that you are having problems with? If you add a label and set its Text property to HtmlText1.HtmlText (where HtmlText1 is the name of the HTML Text control). Please redact any private information that you have.
I have the text below (slightly modified to remove some details) stored in a plain text column in a SharePoint list item. Perhaps the reason your code works as expected while mine does not is that mine contains both links in the same paragraph.
You can find information about <a href='https://www.google.com' target=_blank>this project</a> and instructions for using the app <a href='https://powerusers.microsoft.com/t5/PowerApps-Forum/Some-links-not-working-in-HTML-text-control/m-p/61172#M25283' target=_blank>here</a>. If you can't find what you need, you can ask a question, report an issue, or provide feedback. Please include as much detail as possible.
As you can see in the first screenshot below, when I hover over the first link the cursor changes like it should for a hyperlink, and I'm able to click on and open the link. When I hover over the next link, the cursor does not change, and clicking on the link does nothing.
What is the platform you're using (authoring / Windows Studio, authoring / web, player / Windows Studio, player / web)? I tried it locally, both setting the string you sent me directly in the HTMLText property of the control, and as a field in a SharePoint list (in a Single line of text - where I had to reduce the string to fit - and Multiple lines of text).
The SharePoint column is multiple lines of text column configured to use plain text. I'm on Windows 7 so I'm authoring via the web. I've tested it on both the web and Android player with the same result.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.