Your search did not match any results.

Ribbon Customization

The ASP.NET Core Rich Text Editor control allows you to provide a custom ribbon for your application. This demo shows how to display default and custom items in the ribbon.

The ribbon tab’s items collection provides a set of methods that allow you to add default items to a ribbon (for instance, in this demo the AddUndoItem and AddRedoItem methods).

Use the AddButton method to populate the ribbon with custom items. To process the item click, handle the OnCustomCommandExecuted event. The commandName event argument returns the clicked item’s CommandName property value and allows you to identify the clicked item.

<script src="~/scripts/ribbonCustomization.js"></script> @(Html.DevExpress().RichEdit("DemoRichEdit") .Ribbon(ribbon => ribbon .Visible(true) .ActiveTabIndex(1) .Tabs(tabs => { tabs.Clear(); tabs.AddHomeTab() .Items(items => { items.Clear(); items.AddUndoItem(); items.AddRedoItem(); items.AddFontNameItem(); items.AddFontSizeItem(); items.AddBoldItem().ShowText(true); items.AddItalicItem().ShowText(true); items.AddUnderlineItem().ShowText(true); }); tabs.Add() .Title("Email") .Items(items => { items.AddButton() .Text("Insert Email Signature") .CommandName("insertEmailSignature") .ShowText(true) .Icon("user"); items.AddButton() .Text("Send Email") .CommandName("sendEmail") .ShowText(true) .Icon("email"); items.AddPrintDocumentItem().BeginGroup(true); items.AddDownloadDocumentItem(); }); }) ) .OnCustomCommandExecuted("function(s,e) { onCustomCommandExecuted(s,e); }") .OnDocumentLoaded("function(s,e) { onDocumentLoaded(s,e); }") .Height(600) .ConfirmOnLosingChanges(c => c.Enabled(false)) )
using Microsoft.AspNetCore.Mvc; namespace AspNetCoreDemos.RichEdit { [Route("[action]")] public class DemosController : Controller { public IActionResult RibbonCustomization() { return View(); } } }