Welcome to Delicate template
Just another WordPress site

Develop .NET apps in a breeze (Part-2)

August 3rd, 2012 | Posted by rajendhran.r in .NET | Telerik Controls

Telerik RadEditor


RadEditor was chosen by Microsoft to use in MSDN, CodePlex, TechNet, MCMS and even as an alternative to the default editor in SharePoint.  It comes with spellchecker and content authoring environment.  The output is clean XHTML, fast rendering and has widest cross-browser support.


<telerik:RadEditor ID="RadEditor1" runat="server" ToolbarMode="Default" ToolsFile="RadEditorForm_ToolsFile.xml">


RadEditor  Components


RibbonToolBar provides us an editor interface, which we used in Word by integrating the RibbonBar controls as the toolbar for the editor. This can group the menu items such as copy& paste into their own tabs for good look and feel.


<telerik:RadEditor ID="RadEditor1" runat="server" ToolbarMode="RibbonBar" ToolsFile="RadEditorForm_ToolsFile.xml">


Spell Checker:

To enable Spell Checker in the web application:

1.   Copy the required dictionary files in the project’s App_Data folder:

The files are located in <RadControls for ASP.NET AJAX installation folder>\App_Data\RadSpell.
Create a RadSpell folder in your project’s App_Data folder and copy the dictionaries there.

2.   Add the SpellCheck handler in the web.config file. This can be done with the following techniques:

  • Manually add the handler in your web.config file (in the httpHandlers section):
      <add verb="*" validate="false" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI"/>
  • Use the RadEditor’s Smart Tag in Visual Studio. Note that the smart tag will appear only if you have the Telerik.Web.Design.dll file in your project’s bin folder or in the GAC.



<telerik:RadEditor runat="server" ID="RadEditor1">
        <telerik:SpellCheckerLanguage Code="fr-FR" Title="French" />

Cleaning Word Formatting:

1. Strip Word-formatting on paste

The “Paste from Word” button  allows us to strip the Word-specific tags from the text copied in the clipboard and will paste it in RadEditor with a single click.


2. Strip Word-formatting on paste (cleaning fonts and sizes)

The “Paste from Word cleaning fonts and sizes” button  will clean all Word-specific tags and will remove font names and text sizes, as they are rarely used in the web environment.


3. Forced format stripping on Paste

Developers can now enforce content formatting using the new StripFormattingOptions property.  As a result, format stripping will be applied to all pasted content, with the following options:

  • None
  • MSWord (retains fonts and sizes)
  • MSWordNoFonts
  • MSWordRemoveAll
  • CSS
  • Font
  • Span
  • All


4. Word Content in Clipboard Interception

In case the user is trying to paste Word content with the regular Paste button or Ctrl+V, a dialog will prompt whether the Word markup should be cleaned. If the Clipboard content does not come from Word, the dialog will not be shown.


5. Strip Word-formatting after paste

As an alternative to the “Paste from Word” tool (item 1) you may paste the formatted content first and then strip it using the “Format Stripper” tool.


6. Paste plain text

The “Paste Plain Text” button  works similarly to “Paste from Word” , but it removes all HTML formatting and pastes plain text, preserving the line breaks.


7. Paste as HTML

This new tool  allows you to paste the HTML content of the Clipboard as code, which may be quite convenient for developer-oriented applications (e.g. support systems, forums, etc.)




<telerik:RadEditor runat="server" ID="RadEditor2" Width="420" Height="200" EnableResize="false">
    <telerik:EditorTool Name="Paste" />
    <telerik:EditorTool Name="PasteFromWord" />
    <telerik:EditorTool Name="PasteFromWordNoFontsNoSizes" />
    <telerik:EditorTool Name="PastePlainText" />
    <telerik:EditorTool Name="PasteAsHtml" />

    <telerik:EditorTool Name="FormatStripper" />


You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply

Your email address will not be published. Required fields are marked *