bagaag
07/01/2024, 3:06 AMJanae
07/01/2024, 3:39 AMdata-udi
attribute on the link that should have the udi in it (something like umb://document/4fed18d8c5e34d5e88cfff3a5b457bf2
- see https://docs.umbraco.com/umbraco-cms/reference/querying/udi-identifiers).
Does the a
have that attribute on it? If so, does the GUID have hyphens? Those may be the root of the issue.Dean Leigh
07/01/2024, 5:51 AMbagaag
07/01/2024, 11:31 AMbagaag
07/01/2024, 12:03 PMJacob Overgaard
07/01/2024, 12:30 PMbagaag
07/01/2024, 9:45 PMJacob Overgaard
07/02/2024, 7:50 AMDivisator
08/18/2024, 11:16 AMJanae
08/18/2024, 11:12 PMDivisator
08/19/2024, 12:35 AMJanae
08/19/2024, 3:41 PMDivisator
08/24/2024, 10:50 PMJanae
08/25/2024, 4:19 AMpublic class StringHelper
{
private readonly IUmbracoContextAccessor _contextAccessor;
private readonly IPublishedUrlProvider _urlProvider;
public StringHelper(IUmbracoContextAccessor contextAccessor, IPublishedUrlProvider urlProvider)
{
_contextAccessor = contextAccessor;
_urlProvider = urlProvider;
}
public string? ParseLocalLinks(string? rawHtml)
{
if(rawHtml == null) return null;
var linkParser = new HtmlLocalLinkParser(_contextAccessor, _urlProvider);
var content = linkParser.EnsureInternalLinks(rawHtml, false);
return content;
}
}
Then in the View we use
@inject YourProject.StringHelper _stringHelper;
@{
var rawHtml = _stringHelper.ParseLocalLinks(Model.RichTextEditorContent);
}
Divisator
08/30/2024, 2:02 PMDivisator
09/01/2024, 6:02 PM