Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Productivity and Design Tools
New to Telerik UI for ASP.NET AJAX? Download free 30-day trial
<%@ Page Language="vb" AutoEventWireup="true" Theme="Default" CodeFile="DefaultVB.aspx.vb"Inherits="Telerik.Web.Examples.Editor.CleaningWordFormatting.DefaultVB" %> <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> <!DOCTYPE html> <html xmlns='http://www.w3.org/1999/xhtml'> <head runat="server"> <title>Telerik ASP.NET Example</title> <link href="../Common/styles.css" rel="stylesheet" type="text/css" /> <script src="scripts.js"></script> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" /> <div class="demo-containers"> <div class="demo-container"> <h2>Automatic format stripping on paste</h2> <telerik:RadEditor RenderMode="Lightweight" runat="server" OnClientSubmit="TelerikDemo.OnClientSubmit" ID="RadEditor1" SkinID="BasicSetOfTools" Width="420px" Height="300px" EnableResize="false"> <Content> <p class="MsoNoSpacing" style="margin: 0in 0in 0pt;"><span class="MsoIntenseEmphasis" style="color: #4f81bd;"><strong><em><span style="font-family: calibri;"> <br /> Experiment with the various options of the StripFormattingOptions setting for cleaning Word formatting.</span></em></strong></span></p> <p class="MsoNoSpacing" style="margin: 0in 0in 0pt;"><span class="MsoIntenseEmphasis"><strong><em><span style="color: #4f81bd; font-family: calibri;"> The content here has MS Word formatting which you can strip on submit by clicking on the "Submit and Clean" button above.<o:p></o:p></span></em></strong></span></p> </Content> </telerik:RadEditor> <telerik:RadButton RenderMode="Lightweight" ID="Button1" runat="server" UseSubmitBehavior="false" OnClick="Button1_Click" ToolTip="Useful for browsers that do not provide onPaste event" Text="Submit and Clean"></telerik:RadButton> <telerik:RadToolTip RenderMode="Lightweight" ID="RadToolTip1" Title="Cleaned editor content" Animation="Resize" ShowCallout="true" Position="Center" Height="500px" Width="500px" RelativeTo="BrowserWindow" Modal="true" HideEvent="ManualClose" runat="server"> </telerik:RadToolTip> </div> <div class="demo-container"> <h2>manual format stripping</h2> <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="RadEditor2" Width="420px" Height="300px" EnableResize="false"> <Tools> <telerik:EditorToolGroup> <telerik:EditorTool Name="Paste"></telerik:EditorTool> <telerik:EditorTool Name="PasteFromWord"></telerik:EditorTool> <telerik:EditorTool Name="PasteFromWordNoFontsNoSizes"></telerik:EditorTool> <telerik:EditorTool Name="PastePlainText"></telerik:EditorTool> <telerik:EditorTool Name="PasteAsHtml"></telerik:EditorTool> </telerik:EditorToolGroup> <telerik:EditorToolGroup> <telerik:EditorTool Name="FormatStripper"></telerik:EditorTool> </telerik:EditorToolGroup> </Tools> <Content> <br /><strong><em><span style="color: #4f81bd; font-family: calibri;">Use the Paste from Word, Paste from Word cleaning Fonts and Sizes , or Paste Plain Text tools to strip and paste text copied from MS Word.</span> <br /> <br /><span style="color: #4f81bd; font-family: calibri;">Use the FormatStripper to remove Word-formatting from existing text in the RadEditor.</span></em> </strong> </Content> </telerik:RadEditor> </div> </div> <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadioButtonListEditMode"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadEditor1" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="RadioButtonListEditMode" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"></telerik:RadAjaxLoadingPanel> <qsf:ConfiguratorPanel runat="server" Title="StripFormattingOptions Configurator"> <Views> <qsf:View> <asp:CheckBoxList OnSelectedIndexChanged="RadioButtonListStripFormattingOptions_SelectedIndexChanged" ID="RadioButtonListEditMode" runat="server" AutoPostBack="True" RepeatColumns="3"> <asp:ListItem Value="MSWord">MSWord</asp:ListItem> <asp:ListItem Value="MSWordNoMargins" Selected="True">MSWordNoMargins</asp:ListItem> <asp:ListItem Value="MSWordNoFonts">MSWordNoFonts</asp:ListItem> <asp:ListItem Value="MSWordRemoveAll">MSWordRemoveAll</asp:ListItem> <asp:ListItem Value="ConvertWordLists" Selected="True">ConvertWordLists</asp:ListItem> <asp:ListItem Value="Css">Css</asp:ListItem> <asp:ListItem Value="Font">Font</asp:ListItem> <asp:ListItem Value="Span">Span</asp:ListItem> <asp:ListItem Value="AllExceptNewLines">AllExceptNewLines</asp:ListItem> <asp:ListItem Value="All">All</asp:ListItem> <asp:ListItem Value="NoneSupressCleanMessage">NoneSupressCleanMessage</asp:ListItem> <asp:ListItem Value="None">None</asp:ListItem> </asp:CheckBoxList> </qsf:View> </Views> </qsf:ConfiguratorPanel> </form> </body> </html>