Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Editor / Full HTML Page Edit

   
  
 
 
   

  • Full HTML Support

    RadEditor offers the ability to create and edit full HTML and the Page Properties dialog significantly facilitates the process of creation and formatting of complete html content:



    Once the Page Properties dialog is opened and closed by pressing the OK button, then the following full html content will be inserted in the editor:
    <html>
       
    <head>
           
    <title></title>
           
    <style>
           
    </style>
           
    <meta name="Description" />
            <
    meta name="Keywords" />
        </
    head>
       
    <body>
       
    </body>
    </html>

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Theme="Default" Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Editor.CompleteHTMLSupport.DefaultVB" %>

    <%@ 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="VB" />
            <telerik:RadScriptManager ID="ScriptManager1" runat="server" />
            <telerik:RadEditor runat="server" ID="RadEditor1">
                <Tools>
                    <telerik:EditorToolGroup>
                        <telerik:EditorTool Name="PageProperties" Text="Page Properties" />
                    </telerik:EditorToolGroup>
                    <telerik:EditorToolGroup>
                        <telerik:EditorTool Name="Bold" />
                        <telerik:EditorTool Name="Italic" />
                        <telerik:EditorTool Name="Underline" />
                        <telerik:EditorTool Name="Cut" />
                        <telerik:EditorTool Name="Copy" />
                        <telerik:EditorTool Name="Paste" />
                        <telerik:EditorTool Name="FontName" />
                        <telerik:EditorTool Name="RealFontSize" />
                    </telerik:EditorToolGroup>
                    <telerik:EditorToolGroup>
                        <telerik:EditorTool Name="InsertTable" />
                        <telerik:EditorTool Name="InsertImage" />
                        <telerik:EditorTool Name="LinkManager" />
                        <telerik:EditorTool Name="Unlink" />
                        <telerik:EditorTool Name="InsertOrderedList" />
                        <telerik:EditorTool Name="InsertUnorderedList" />
                    </telerik:EditorToolGroup>
                </Tools>
                <ImageManager ViewPaths="~/Editor/Img/UserDir/Marketing,~/Editor/Img/UserDir/PublicRelations" />
                <Content>
         
                <html>
                    <head>
                        <title>Full HTML page</title>
                        <style type="text/css">
                            body
                            {
                                color: #555;
                            }
                        </style>
                        <meta content="This is a full HTML page having html, head and body tags" name="Description" />
                        <meta content="full html page, template file." name="Keywords" />
                    </head>
                    <body style="margin: 1px;">
                              <span style="font-size: 12px; font-family: arial;">RadEditor is frequently used in CMS systems where the content is exported to a database without <strong>&lt;html&gt;</strong>,<strong> &lt;head&gt; </strong>and <strong>&lt;body&gt;</strong> tags. Once saved the content could be imported inside some html container element and displayed on the public site.<br /><br/>
                                In some scenarios, however, it is needed to obtain the content along with the <strong>&lt;html&gt;</strong>,<strong> &lt;head&gt;</strong>,<strong> &lt;title&gt;</strong>,<strong> &lt;body&gt;</strong> and <strong>&lt;meta&gt;</strong> tags, for example when creating html template files or e-mails.<br/> RadEditor offers the ability to create and edit full HTML and the Page Properties dialog<img alt="" src="PageProperties.gif" /> can significantly facilitate the process of creation and formatting of such complete html content:<br/>
                              </span>
                        <br />
                        <div style="border: #7f9db9 1px solid; font-family: courier new; background-color: white;">
                        <table style="border-top-width: 0px; border-left-width: 0px; margin: 2px 0px; width: 99%; border-bottom: #eee 0px solid; border-collapse: collapse; background-color: #fff; border-right-width: 0px;" cellspacing="0" cellpadding="0">
                            <colgroup><col style="padding-left: 10px; font-size: 11px; border-bottom: #f7f7f7 1px solid; font-family: courier new; white-space: nowrap;" /></colgroup>
                            <tbody>
                                <tr>
                                    <td><span style="font-size: 11px;"></span><span style="color: blue;">&lt;</span><span style="font-size: 11px;">html</span><span style="color: blue;">&gt;</span><span style="font-size: 11px;"> </span></td>
                                </tr>
                                <tr>
                                    <td style="background-color: #f7f7f7;">&nbsp;&nbsp;&nbsp;<span style="color: blue;">&lt;</span><span style="font-size: 11px;">head</span><span style="color: blue;">&gt;</span><span style="font-size: 11px;"> </span></td>
                                </tr>
                                <tr>
                                    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">&lt;</span><span style="font-size: 11px;">title</span><span style="color: blue;">&gt;</span><span style="font-size: 11px;">Full HTML page</span><span style="color: blue;">&lt;/</span><span style="font-size: 11px;">title</span><span style="color: blue;">&gt;</span><span style="font-size: 11px;"> </span></td>
                                </tr>
                                <tr>
                                    <td style="background-color: #f7f7f7;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">&lt;</span><span style="font-size: 11px;">meta </span><span style="color: red;">content</span><span style="font-size: 11px;">=</span><span style="color: blue;">"This is a full HTML page having html, head and body tags"</span><span style="font-size: 11px;"> </span><span style="color: red;">name</span><span style="font-size: 11px;">=</span><span style="color: blue;">"Description"</span><span style="font-size: 11px;"> </span><span style="color: blue;">/&gt;</span><span style="font-size: 11px;"> </span></td>
                                </tr>
                                <tr>
                                    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">&lt;</span><span style="font-size: 11px;">meta </span><span style="color: red;">content</span><span style="font-size: 11px;">=</span><span style="color: blue;">"full html page, template file."</span><span style="font-size: 11px;"> </span><span style="color: red;">name</span><span style="font-size: 11px;">=</span><span style="color: blue;">"Keywords"</span><span style="font-size: 11px;"> </span><span style="color: blue;">/&gt;</span><span style="font-size: 11px;"> </span></td>
                                </tr>
                                <tr>
                                    <td style="background-color: #f7f7f7;">&nbsp;&nbsp;&nbsp;<span style="color: blue;">&lt;/</span><span style="font-size: 11px;">head</span><span style="color: blue;">&gt;</span><span style="font-size: 11px;"> </span></td>
                                </tr>
                                <tr>
                                    <td>&nbsp;&nbsp;&nbsp;<span style="color: blue;">&lt;</span><span style="font-size: 11px;">body </span><span style="color: red;">style</span><span style="font-size: 11px;">=</span><span style="color: blue;">"margin: 1px;"</span><span style="font-size: 11px;">&gt; </span></td>
                                </tr>
                                <tr>
                                    <td style="background-color: #f7f7f7;">test content </td>
                                </tr>
                                <tr>
                                    <td>&nbsp;&nbsp;&nbsp;<span style="color: blue;">&lt;/</span><span style="font-size: 11px;">body</span><span style="color: blue;">&gt;</span><span style="font-size: 11px;"> </span></td>
                                </tr>
                                <tr>
                                    <td style="background-color: #f7f7f7;"><span style="color: blue;">&lt;/</span><span style="font-size: 11px;">html</span><span style="color: blue;">&gt;</span><span style="font-size: 11px;"> </span></td>
                                </tr>
                            </tbody>
                        </table>
                        </div>
                    </body>
                </html>

         
                </Content>
            </telerik:RadEditor>
            <qsf:Footer runat="server" ID="Footer1" />
        </form>
    </body>
    </html>

Get more than expected!

 
 

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.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451