Your search did not match any results.

Ribbon

Backend API
<script src="~/DemosScripts/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("onCustomCommandExecuted") .OnDocumentLoaded("onDocumentLoaded") .Height(600) .ConfirmOnLosingChanges(c => c.Enabled(false)) )
using Microsoft.AspNetCore.Mvc; namespace AspNetCoreDemos.RichEdit { [Route("[action]")] public class RichEditController : Controller { public IActionResult RibbonCustomization() { return View(); } } }
function onCustomCommandExecuted(s, e) { switch (e.commandName) { case 'insertEmailSignature': s.document.insertParagraph(s.document.length); s.document.insertText(s.document.length, '_________'); s.document.insertParagraph(s.document.length); s.document.insertText(s.document.length, 'Best regards,'); s.document.insertParagraph(s.document.length); s.document.insertText(s.document.length, 'John Smith'); s.document.insertParagraph(s.document.length); s.document.insertText(s.document.length, 'john@example.com'); s.document.insertParagraph(s.document.length); s.document.insertText(s.document.length, '+1 (818) 844-0000'); break; case 'sendEmail': var text = s.document.getText(); var mailto_link = 'mailto:bob@example.com?subject=Test&body=' + encodeURIComponent(text); window = window.open(mailto_link, 'emailWindow'); if(window && window.open && !window.closed) window.close(); break; } } function onDocumentLoaded(s, e) { s.document.insertText(0, 'Dear Mr Stanley,'); s.document.insertParagraph(s.document.length); var startPosition = s.document.length; s.document.insertParagraph(startPosition); s.document.insertText(startPosition, '[Type your text here]'); s.selection.setSelection(new DevExpress.RichEdit.Interval(startPosition, s.document.length - startPosition)); s.focus(); }