Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Created March 26, 2013 13:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save lohithgn/5245307 to your computer and use it in GitHub Desktop.
Kendo Editor Custom Style Feature
<!--Editor Styles-->
.hlError
{
background-color:#fea;
color:#f33;
}
.hlOK
{
background-color:#aef;
color:#060;
}
.inlineCode
{
font:bold 12px monospace;
}
@* Code *@
@(
Html.Kendo().Editor()
.Name("kEditor")
.Tools(tools => tools
.Clear()
.Styles(styles => styles
.Add("Highlight Error", "hlError")
.Add("Highlight OK", "hlOK")
.Add("Inline Code", "inlineCode")
)
)
.StyleSheets(styles => styles.Add(Url.Content("~/Content/EditorStyles.css")))
.Value(@<text>
Kendo UI Editor allows your users to edit HTML in a familiar, user-friendly way.<br />
In this version, the Editor provides the core HTML editing engine, which includes basic
text formatting, hyperlinks, lists,
and image handling. The widget <strong>outputs identical HTML</strong> across all major
browsers, follows
accessibility standards and provides API for content manipulation.
</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