@using Oqtane.Modules.HtmlText.Services @namespace Oqtane.Modules.HtmlText @inherits ModuleBase @inject IHtmlTextService HtmlTextService @inject IStringLocalizer Localizer @if (PageState.EditMode) {
} @((MarkupString)content) @code { private string content = ""; public override string RenderMode => RenderModes.Static; protected override async Task OnParametersSetAsync() { try { if (ShouldRender()) { var htmltext = await HtmlTextService.GetHtmlTextAsync(ModuleState.ModuleId); if (htmltext != null) { content = htmltext.Content; content = Utilities.FormatContent(content, PageState.Alias, "render"); } } } catch (Exception ex) { await logger.LogError(ex, "Error Loading Content {Error}", ex.Message); AddModuleMessage(Localizer["Error.Content.Load"], MessageType.Error); } } }