@using Oqtane.Modules.HtmlText.Services @using Oqtane.Modules.HtmlText.Models @namespace Oqtane.Modules.HtmlText @inherits ModuleBase @inject NavigationManager NavigationManager @inject HttpClient http @inject SiteState sitestate @((MarkupString)content) @if (PageState.EditMode) {
} @if (PageState.EditMode) {

} @code { private string content = ""; protected override async Task OnParametersSetAsync() { try { var htmltextservice = new HtmlTextService(http, sitestate); var htmltext = await htmltextservice.GetHtmlTextAsync(ModuleState.ModuleId); if (htmltext != null) { content = htmltext.Content; content = content.Replace(Constants.ContentUrl, "/" + PageState.Alias.AliasId.ToString() + Constants.ContentUrl); } } catch (Exception ex) { await logger.LogError(ex, "An Error Occurred Loading Html/Text Content. " + ex.Message); AddModuleMessage(ex.Message, MessageType.Error); } } }