|
3 rokov pred | |
---|---|---|
BlazorAceEditor | 3 rokov pred | |
BlazorAceEditor.Test | 3 rokov pred | |
.gitignore | 3 rokov pred | |
BlazorAceEditor.sln | 3 rokov pred | |
README.md | 3 rokov pred |
Ace editor component wrap for Blazor
Register component deps at startup
builder.Services.UseAceEditor();
Razor page
<AceEditor @ref="editor" class="border" OnChanged="UpdateContent" OnLoad="Load"></AceEditor>
<div>@((MarkupString)_content)</div>
Code
private AceEditor editor;
private string _content = "";
private async Task UpdateContent()
{
var _content = await editor.GetValue();
}
private async Task Load()
{
await editor.SetValue("<h1>Title</h1>");
await editor.SetInfinityLines();
await editor.SetMinLines(10);
await editor.SetFontSize(20);
await editor.SetLang("html");
await editor.ClearSelection();
}