<IsabyteRichTextEditor Placeholder="Start writing your content here..."
EnabledToolbarGroups="RteToolbarGroup.All"
AllowedExportFormats="@(new[] { RteExportFormat.HtmlBlob, RteExportFormat.HtmlPage, RteExportFormat.Docx })"
OnContentChanged="OnContentChanged"
OnExport="OnExport"
OnSelectionChange="OnSelectionChange"
InitialContent="@initialContent" />
@code {
private const string initialContent = "<h1>Welcome</h1><p>Start editing this content.</p>";
private void OnContentChanged(string html)
{
Console.WriteLine($"Content length: {html.Length}");
}
private void OnExport(RteExportResult result)
{
Console.WriteLine($"Export: {result.Format} -> {result.FileName}");
}
private void OnSelectionChange(RteSelectionChangeEventArgs args)
{
Console.WriteLine($"Active formats: {string.Join(", ", args.Formats.Keys)}");
}
}