Fix #4358: RichTextEditor Provider Abstraction.

This commit is contained in:
Ben
2024-07-01 17:11:26 +08:00
parent 1eafed755d
commit e00c261777
21 changed files with 726 additions and 342 deletions

View File

@ -0,0 +1,31 @@
@namespace Oqtane.Modules.Controls
@inherits ModuleControlBase
@implements ITextEditor
<div class="text-area-editor">
<textarea @bind="_content" @ref="_editor" placeholder="@Placeholder" readonly="@ReadOnly" />
</div>
@code {
private ElementReference _editor;
private string _content;
[Parameter]
public bool ReadOnly { get; set; }
[Parameter]
public string Placeholder { get; set; }
public void Initialize(string content)
{
_content = content;
StateHasChanged();
}
public async Task<string> GetContent()
{
await Task.CompletedTask;
return _content;
}
}