Closed ZacP closed 6 years ago
We were able to fix this via a regex hack, that detects the commented out macro and temp macro text and fixes them to display the macro correctly.
static Regex FixMacroMarkup = new Regex("<div[^>]+umb-macro-holder[^>]+><!-- | --><ins>Macro alias.*?<\\/ins><\\/div>| --><ins>.*?<\\/ins><\\/div>", RegexOptions.Singleline);
/// <summary>
/// Adds a hack for the text count RTE macro rendering
/// </summary>
/// <param name="data"></param>
/// <param name="nodeId"></param>
/// <returns></returns>
public static IHtmlString RenderRteForTextCount(IHtmlString input)
{
return new HtmlString(FixMacroMarkup.Replace(input.ToString(), ""));
}
Hi Zac,
Thanks for reporting the issue. I will try to reproduce it here and see if I can include a fix for it.
Hi Zac,
I've been able to fix the bug and I have released a new version on NuGet: 1.0.14.
Thanks again for reporting the issue.
And I should have added as well that you might have to save & publish the RTEs again after upgrading, to make sure the macro syntax in the RTE is saved correctly in the database.
Hi,
The TextCount RTE macros don't display correctly. Instead of showing the macro, it just shows the bolded text "Macro Alias: {MacroName}".
Wrapping the output with umbraco.library.RenderMacro does not fix the problem either.
We tested this side by side with a normal RTE and a TextCount RTE. The normal RTE displays the macro correctly on the front end. The TextCount RTE does not display the macro correctly on the front end (although it does display it correctly in the umbraco admin).