38 lines
954 B
Plaintext
38 lines
954 B
Plaintext
@using Oqtane.Client.Modules.HtmlText.Services
|
|
@using Oqtane.Modules
|
|
@using Oqtane.Shared.Modules.HtmlText.Models
|
|
@using System.Net.Http;
|
|
@using Oqtane.Client.Modules.Controls
|
|
@using Oqtane.Shared;
|
|
@inherits ModuleBase
|
|
@inject IUriHelper UriHelper
|
|
@inject HttpClient http
|
|
@inject SiteState sitestate
|
|
|
|
<ModuleMessage Message="@message" />
|
|
|
|
@((MarkupString)content)
|
|
|
|
<br /><ActionLink Action="Edit" /><br /><br />
|
|
|
|
@code {
|
|
string message = "";
|
|
string content;
|
|
|
|
protected override async Task OnParametersSetAsync()
|
|
{
|
|
try
|
|
{
|
|
HtmlTextService htmltextservice = new HtmlTextService(http, sitestate, UriHelper);
|
|
HtmlTextInfo htmltext = await htmltextservice.GetHtmlTextAsync(ModuleState.ModuleId);
|
|
if (htmltext != null)
|
|
{
|
|
content = htmltext.Content;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
message = ex.Message;
|
|
}
|
|
}
|
|
} |