Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Created March 26, 2013 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lohithgn/5244764 to your computer and use it in GitHub Desktop.
Save lohithgn/5244764 to your computer and use it in GitHub Desktop.
Kendo editor custom button feature
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.Clear()
.FontName()
.FontSize()
.FontColor()
.BackColor()
.CustomButton(cb => cb
.Name("HorizontalRule")
.ToolTip("Insert a horizontal rule")
.Exec(@<text>
function(e)
{
var editor = $(this).data("kendoEditor");
editor.exec("inserthtml",{value:"<hr />"});
}
</text>)
)
)
.HtmlAttributes(new {style="width:740px;height:240px"})
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment