32 lines
645 B
Plaintext
32 lines
645 B
Plaintext
@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;
|
|
}
|
|
}
|