All Components
Theme

Themes

    Editor / Styles

    Information

    The following demo shows how to use the Editor's style tool, which provides the ability to customize the widget content by means of custom CSS classes and styling, and a CSS file registered in the Editor iframe document.

    Description

    The demo presents you how to use the Editor's style tool, which provides the ability to customize the widget content by means of custom CSS classes and styling, and a CSS file registered in the Editor iframe document.

    You can register and import your own CSS file into the content area through the StyleSheets option:
    .StyleSheets(css => css.Add(Url.Content("~/PATH_TO_CSS_FILE/CSS_FILE.css")))

    Use the Tools -> Formatting -> Add("Dropdown Item Name",".CSS Class Name") method to populate the Format dropdown with options. Note that the specified CSS class should exist in the CSS file imported in the content area through the StyleSheets -> Add method.

    ASP.NET MVC source

    Also available for:

    • styles.cshtml
    • StylesController.cs

    Support & learning resources

    Editor for other technologies