AdminEditor Component
Overview
A rich text editor component. Supports multiple editor plugins via the IEditorComponent interface. Uses DefaultEditorPlugin (simple textarea) by default. After installing the EasyAdminBlazor.HtmlEditor extension, it is automatically replaced with the TinyMCE rich text editor.
Parameters
| Parameter | Description |
|---|---|
| @bind-Value | Bind the editor's HTML content |
| DisplayText | Form display label |
Usage Example
<AdminEditor @bind-Value="@articleContent" DisplayText="Article Content" />
Extension Mechanism
// Default implementation
builder.Services.TryAddTransient<IEditorComponent, DefaultEditorPlugin>();
// Automatically replaced with TinyMCE after installing the HtmlEditor extension
.AddEasyAdminBlazorTinyMCEEditor();
Notes
- The editor outputs content in HTML format
- When using TinyMCE, the corresponding JS resources need to be loaded