Go Back
  • Cleaning Pasted Content in RadEditor

    Telerik RadEditor & Sitefinity ASP.NET CMS Sitefinity ASP.NET CMS is a web-based content management platform and Telerik's RadEditor plays a key role in managing the web site's content.  Using RadEditor, content editors can create HTML without knowing HTML.  However, as you'll see below, simple abstractions can have unforeseen consequences. 

    In past blog posts I explained how to Disable HTML Editing in RadEditor and Add Custom Styles to RadEditor.  These techniques help ensure that content editors can do no wrong.

    This post I'll add to this theme by demonstrating how to automatically remove dangerous & ugly HTML from content pasted into RadEditor.

    The Problem with Copy & Paste

    RadEditor is designed to generate valid & clean HTML.  However, a lot of web site content isn't composed in RadEditor.  Often content is created in Microsoft Word, Adobe InDesign or various other programs.  This content is then copied to the clipboard and pasted into RadEditor.

    Rich-text content ...

  • Disabling the HTML Edit Mode in RadEditor

    Sitefinity ASP.NET CMS is a web-based content management platform and Telerik's RadEditor plays a key role in managing the web site's content.  RadEditor is a WYSIWYG web-based editor that makes it easy to create rich-text content.

    By default, RadEditor includes the ability to toggle into HTML mode.  This displays the raw HTML and allows editors to make edits directly to the HTML.  In the hands of an HTML savvy editor, this is a very useful feature.  However, in the hands of an inexperienced editor, this is a quick way to butcher the web site's layout.

    RadEditor's HTML Edit Mode

    Thankfully, RadEditor's HTML Edit Mode can be disabled.  In addition, Sitefinity's built-in Roles can be used to selectively enable/disable HTML editing for different users.

    Straight to the Point

    RadEditor's HTML mode can be enabled/disabled by using the EditModes property to specify the available edit modes.  For example, the following tag enables all edit modes:

    <telerik:RadEditor ...
  • Adding Custom Styles to Sitefinity's RadEditor

    Sitefinity ASP.NET CMS is a web-based content management platform and Telerik's RadEditor plays a key role in managing the web site's content.  RadEditor is a WYSIWYG web-based tool that makes it very easy to create rich-text content.

    In my last post, I showed how to add new tools to Sitefinity's RadEditor.  Among these tools are tools that allow editors to set the font, font size, font color and background color.

    However, it's not recommended that editors be allowed to arbitrarily use any font settings.  Doing this results in extra HTML (embedded styles) and inconsistent presentation.  Instead, it's recommended that editors choose from a list of carefully selected stylesheets.

    Identify the Styles to Apply to RadEditor

    Before applying a new CSS style to RadEditor it's important to understand what can go wrong.  Take, for example, the following style definition:

    body {
        background: #fff url(Images/bg.jpg) repeat-x top left;
        color: black;
        font-size: ...
  • Enabling/Disabling Tools in RadEditor

    Sitefinity ASP.NET CMS is a web-based content management platform and Telerik's RadEditor plays a key role in managing the web site's content.  RadEditor is a WYSIWYG web-based editor that makes it easy to create rich-text content. 

    In a nutshell, RadEditor empowers editors to create HTML without knowing HTML.

    RadEditor in Sitefinity Example

    RadEditor is part of the Telerik's RadControls for AJAX UI suite.  Sitefinity comes included with this entire suite of UI products.  All of these controls are available to use within your Sitefinity project.

    Tools, Tools and more Tools

    RadEditor alone is a very powerful product and has many tools available.  Out of the box, only a fraction of these tools are enabled in Sitefinity.  There are over 60 tools that can be easily added to RadEditor (full list of RadEditor tools). 

    In fact, if all the tools are enabled, it becomes overwhelming....

    RadEditor with All Tools Enabled

    Enabling ALL tools might be unpractical, however you ...