@using Astrol.Entities.Basic.UI
@using Astrol.Component.RichText
@using Astrol.Component.Basic.Button
@using Astrol.Component.Basic.Modal
@using Astrol.Component.Basic.Load
<Load Status="_load" />
<AstrolModal Title="HTML content" Status="_statusModal">
<div style="text-align:left; padding:20px;">
@((MarkupString) _htmlContent)
</div>
</AstrolModal>
<div style="padding:5px;">
<AstrolRichText @ref="_astrolRichText"
MaxHeight="220px"
Placeholder="Enter your text here." />
<AstrolButton OnClick="GetHTML"
Style="AstrolStyle.Blue"
Text="Get HTML"
Icon="astrol-code-1" />
@code {
private string _htmlContent = "";
private bool _statusModal = false;
private bool _load = false;
private AstrolRichText? _astrolRichText;
public async Task GetHTML()
{
_load = true;
if (_astrolRichText != null)
_htmlContent = await _astrolRichText.GetHTMLAsync();
_statusModal = true;
_load = false;
}