A light editor for writing messages: bold, italic, underline, lists, quote, link and clear formatting.
Why it helps
- Basic formatting
- Light and quick
- Switch to plain text
Where it fits
- Mail composers
- Comments
- Notes
Example
<MessageEditor @bind-Value="_html" @bind-Mode="_mode" Label="Message" Placeholder="Write your message" MinHeight="10rem" />
<h3>Safe HTML</h3>
<CodeBlock Language="html" Code="@(_html ?? string.Empty)" ShowCopy="false" />
<h3>Plain text</h3>
<CodeBlock Language="text" Code="@MessageHtml.ToPlainText(_html)" ShowCopy="false" />
@code {
private string? _html = "<p>Hello,</p><p>Please find the <b>report</b> attached. See <a href=\"https://example.com/report\">the online copy</a>.</p>";
private MessageEditorMode _mode = MessageEditorMode.Rich;
} A short fragment. Add @using RayCraft.Blazor.Components to your page and use an interactive render mode.
Part of RayCraft Complete.