RadEditor - please enable JavaScript to use the rich text editor.
Built-in content filters
Filters in RadEditor are small code snippets, which are called in a sequence to process the editor content, when the mode (html / design / preview) is switched. This example demonstrates the use of the editor's built-in content filters:
<%@ Page Language="C#" Theme="Default" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Editor.ContentFilters.DefaultCS" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %><%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %><%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %><%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <qsf:headtag id="Headtag1" runat="server"/></head><body class="BODY"> <form id="form1" runat="server"> <qsf:header id="Header1" runat="server" navigationlanguage="c#"/> <telerik:RadScriptManager ID="ScriptManager1" runat="server" /> <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All"></telerik:RadFormDecorator> <table cellspacing="0" cellpadding="0"> <tr> <td style="vertical-align: top;"> <telerik:RadAjaxManager ID="RadAjax1" runat="server" > <AjaxSettings> <telerik:AjaxSetting AjaxControlID="SetFiltersButton" > <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadEditor1" LoadingPanelID="LoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RestoreDefaults" > <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadEditor1" LoadingPanelID="LoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="FiltersList" LoadingPanelID="LoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <qsf:InformationBox ID="InformationBox1" runat="server"> Filters in RadEditor are small code snippets, which are called in a sequence to process the editor content, when the mode (Html / Design / Preview) is switched or the page is submitted. This example demonstrates the use of the editor's built-in content filters: </qsf:InformationBox> <telerik:radeditor runat="server" ID="RadEditor1" Height="330" EnableResize="false" SkinID="DefaultSetOfTools"> <Modules> <telerik:EditorModule Name="RadEditorStatistics" DockingZone="Bottom" Visible="true" Enabled="true" /> <telerik:EditorModule Name="RadEditorDomInspector" Visible="false" Enabled="true" /> <telerik:EditorModule Name="RadEditorNodeInspector" Visible="false" Enabled="true" /> <telerik:EditorModule Name="RadEditorHtmlInspector" Visible="false" Enabled="true" /> </Modules> <Content> <img alt="product logo" src="../../Img/productLogoLight.gif" />is the successor of the well known industry standard Editor for ASP.NET. The tight integration with ASP.NET AJAX and the powerful new capabilities make Telerik's WYSIWYG Editor a flexible and lightweight component, turning it into the fastest loading Web Editor. Among the hottest features are: <ul> <li><em>Single-file, drag-and-drop deployment</em></li> <li><em>Built on top of ASP.NET AJAX</em></li> <li><em>Unmatched loading speed with new semantic rendering </em></li> <li><em>Full keyboard accessibility</em></li> <li><em>Flexible Skinning mechanism</em></li> <li><em>Simplified and intuitive toolbar configuration</em></li> <li><em>Out-of-the-box XHTML-enabled output</em></li> </ul> </Content> </telerik:radeditor> </td> <td style="padding: 25px 0 0 8px; vertical-align: top;" > <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Enabled="true" Title="Built-in filters" Expanded="true" style="text-align:left;" HorizontalAlign="Right" Width="190"> <div style="padding: 3px; width: 200px;"> <asp:CheckBoxList ID="FiltersList" runat="server" > <asp:ListItem Text="RemoveScripts" Value="RemoveScripts" Selected="True"></asp:ListItem> <asp:ListItem Text="EncodeScripts" Value="EncodeScripts" Selected="True"></asp:ListItem> <asp:ListItem Text="MakeUrlsAbsolute" Value="MakeUrlsAbsolute" Selected="false"></asp:ListItem> <asp:ListItem Text="FixUlBoldItalic" Value="FixUlBoldItalic" Selected="True"></asp:ListItem> <asp:ListItem Text="FixEnclosingP" Value="FixEnclosingP" Selected="True"></asp:ListItem> <asp:ListItem Text="IECleanAnchors" Value="IECleanAnchors" Selected="True"></asp:ListItem> <asp:ListItem Text="MozEmStrong" Value="MozEmStrong" Selected="True"></asp:ListItem> <asp:ListItem Text="ConvertFontToSpan" Value="ConvertFontToSpan" Selected="True"></asp:ListItem> <asp:ListItem Text="OptimizeSpans" Value="OptimizeSpans" Selected="True"></asp:ListItem> <asp:ListItem Text="ConvertToXhtml" Value="ConvertToXhtml" Selected="True"></asp:ListItem> <asp:ListItem Text="ConvertCharactersToEntities" Value="ConvertCharactersToEntities" Selected="True"></asp:ListItem> <asp:ListItem Text="PdfExportFilter" Value="PdfExportFilter" Selected="false"></asp:ListItem> <asp:ListItem Text="IndentHTMLContent" Value="IndentHTMLContent" Selected="True"></asp:ListItem> <asp:ListItem Text="ConvertInlineStylesToAttributes" Value="ConvertInlineStylesToAttributes" Selected="false"></asp:ListItem> </asp:CheckBoxList> <div style="padding:5px"> <asp:Button ID="SetFiltersButton" runat="server" Text="Set Built-in Filters" OnClick="SetFiltersButton_Click" /> </div> <div style="padding:5px"> <asp:Button ID="RestoreDefaults" runat="server" Text="Restore Defaults" OnClick="RestoreButton_Click" /> </div> </div> </qsf:ConfiguratorPanel> <telerik:RadAjaxLoadingPanel Skin="Default" ID="LoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> </td> </tr> </table> <qsf:footer runat="server" id="Footer1"/> </form></body></html>
Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.
Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.
If you have any questions, do not hesitate to contact us at sales@telerik.com.