html not being saved

5 posts, 0 answers
  1. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 20 Jan 2011 Link to this post

    I have a RADEditor setup to allow the usual text formatting.  Ive set a header (H1) andf a hyperlink, yet when I save the contents, just the normal text is being saved.  Ive checked the HTML and it does have the H1 tag along with the ,a. tag for the link, yet when I check this

    this.RadEditor1.Content;

    Content has no tags in it, just the normal text, subsequently this is not being saved.  How can I solve this problem ?
  2. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 20 Jan 2011 Link to this post

    this is my editor


    <telerik:RadEditor runat="server" ID="RadEditor1" DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.aspx" Height="350px" SkinID="DefaultSetOfTools" Skin="Vista" Width="715px" Language="en-GB" ToolsFile="ArtistToolsFile.xml">
                <Tools>
                    <telerik:EditorToolGroup Tag="FileManagers">
                        <telerik:EditorTool Name="ImageManager" />
                        <telerik:EditorTool Name="FlashManager" />
                        <telerik:EditorTool Name="MediaManager" />
                        <telerik:EditorTool Name="DocumentManager" />
                        <telerik:EditorTool Name="TemplateManager" />
                    </telerik:EditorToolGroup>
                    <telerik:EditorToolGroup>
                        <telerik:EditorTool Name="Bold" />
                        <telerik:EditorTool Name="Italic" />
                        <telerik:EditorTool Name="Underline" />
                        <telerik:EditorSeparator />
                        <telerik:EditorTool Name="ForeColor" />
                        <telerik:EditorTool Name="BackColor" />
                        <telerik:EditorSeparator />
                        <telerik:EditorTool Name="FontName" />
                        <telerik:EditorTool Name="RealFontSize" />
                    </telerik:EditorToolGroup>
                </Tools>
                <ImageManager
                    ViewPaths="~/Uploads"
                    DeletePaths="~/Uploads"
                    UploadPaths="~/Uploads" />
                 
                <Content>
                    
                 
     
             
     
     
    </Content>
            </telerik:RadEditor>


    and the ArtistTools file




    <root
        <modules>
            <module name="RadEditorStatistics" dockingZone="Bottom" enabled="true" visible="true"/>    
            <module name="RadEditorDomInspector" dockingZone="Module" enabled="true" visible="true" />
            <module name="RadEditorNodeInspector" dockingZone="Module" enabled="true" visible="true" dockable="false" />
            <module name="RadEditorHtmlInspector" dockingZone="Module" enabled="true" visible="false" />
            <module name="RadEditorXhtmlValidator" dockingZone="Module" enabled="true" visible="true" dockable="true" />
        </modules>
        <tools name="MainToolbar" isribbon="false" dockable="true">                    
            <tool name="AjaxSpellCheck"/>      
            <tool name="FindAndReplace" shortcut="CTRL+F"/>    
            <tool name="Copy" shortcut="CTRL+C"/>
            <tool name="Paste" shortcut="CTRL+V"/>
            <tool name="PasteFromWord" />
            <tool name="PasteFromWordNoFontsNoSizes" />
            <tool name="PastePlainText" />
            <tool name="PasteAsHtml"  />
            <tool separator="true"/>
            <tool name="Undo" shortcut="CTRL+Z"/>
            <tool name="Redo" shortcut="CTRL+Y"/>
        </tools>
        <tools name="InsertToolbar" isribbon="false">      
            <tool name="LinkManager" shortcut="CTRL+K"/>
            <tool name="Unlink" shortcut="CTRL+SHIFT+K"/>                  
        </tools>
        <tools isribbon = "false">
            <tool name="Bold" shortcut="CTRL+B"/>
            <tool name="Italic" shortcut="CTRL+I"/>
            <tool name="Underline" shortcut="CTRL+U"/>
            <tool name="StrikeThrough" />
            <tool separator="true"/>
            <tool name="JustifyLeft" />
            <tool name="JustifyCenter" />
            <tool name="JustifyRight" />
            <tool name="JustifyFull" />
            <tool name="JustifyNone" />
            <tool separator="true"/>
            <tool name="Indent" />
            <tool name="Outdent" />
            <tool name="InsertOrderedList" />
            <tool name="InsertUnorderedList" />
        </tools>
        <tools isribbon="false">   
            <tool name="ConvertToLower" />
            <tool name="ConvertToUpper" />     
            <tool separator="true"/>       
             
             
            <tool name="InsertSnippet" />
            <tool name="InsertFormElement" />
            <tool name="InsertSymbol" />           
        </tools>
        <tools name="DropdownToolbar" isribbon="false">
        <tool name="FormatBlock"/>
            <tool name="FontName"/>
            <tool name="FontSize"/>
            <tool separator="true"/>
            <tool name="FormatStripper"/>      
            <tool name="ApplyClass"/>              
            <tool name="InsertCustomLink"/>            
            <tool name="ForeColor"/>
            <tool name="BackColor"/>       
        </tools>   
        <tools name="DialogToolbar" dockingZone="Top" enabled="true" isribbon="false">
            <tool name="IncreaseSize" shortcut="F10"/>     
            <tool name="DecreaseSize" shortcut="F9"/>  
            <tool name="Print" shortcut="CTRL+P"/> 
            <tool name="Superscript" />
            <tool name="Subscript" />      
            <tool name="InsertParagraph" />
            <tool name="InsertHorizontalRule" />
            <tool name="InsertDate" />
            <tool name="InsertTime" />     
            <tool separator="true"/>       
            <tool name="AboutDialog" />
            <tool name="Help" shortcut="F1"/>
        </tools>   
        <tools name="EnhancedEditToolbar" dockingZone="Bottom" dockable="true">
             
            <tool name="Zoom" />
             
            <tool name="RepeatLastCommand" shortcut="F4"/>     
        </tools>   
        <links>
             
            <link name="Microsoft">
                <link name="Main Site" href="http://www.microsoft.com" />
                <link name="MSDN Online" href="http://msdn.microsoft.com" />
                <link name="Windows Update" href="http://windowsupdate.microsoft.com" />
            </link>
            <link name="Search Engines">
                <link name="Google" href="http://www.google.com" />
                <link name="Yahoo" href="http://www.yahoo.com" />
                <link name="AltaVista" href="http://www.altavista.com" />
            </link>
        </links>
        <snippets>
            <snippet name="Order Confirmation">
                    <![CDATA[
                        <div style="width:300px;border:2px outset #D8D2BD;padding:34px;font-family:Arial, Verdana; font-size:11px;background-color:#F1EFE6;">
                        Dear ____________________,<br />
                        Thank you for inquiring about ____________. Your request will be processed in 48 hours and shipped at the address you have provided.
                        <br /><br />
                            <b>Please, contact us if you have any problems.</b>
                        </div>
                    ]]>
                </snippet>
                <snippet name="Email Signature">
                    <![CDATA[
                        <div style="margin-top:30px;width:80%;border-top:1px dotted gray;padding-top:4px;font-family:Arial, Verdana; font-size:11px;">
                        <b>John Wigham</b><br />
                        Senior Web Developer<br />
                            <a href="#">john@mysite.com</a>
                            <br />
                                <br />
                                    <i>Disclaimer: The contents of this e-mail are privileged and confidential and intended for the addressees at the specified e-mail addresses only.</i>
                        </div>
                    ]]>
                </snippet>
                <snippet name="Problem Report Feedback">
                    <![CDATA[
                        <div style="width:300px;border:2px outset #D8D2BD;padding:34px;font-family:Arial, Verdana; font-size:11px;background-color:#F1EFE6;">
                        Hi ____________________,<br />
                        Thank you for reporting this issue. We have verified the problem and it is logged in our system. We will notify you once we have a solution.
                        <br /><br />
                            <b>Please, contact us if you have any problems.</b>
                        </div>
                    ]]>
                </snippet>
        </snippets>
        <symbols></symbols>
        <fontNames> </fontNames>   
        <fontSizes></fontSizes>
        <colors></colors>  
        <paragraphs></paragraphs>
        <classes></classes>
        <dialogParameters></dialogParameters>
        <languages></languages>
        <contextMenus></contextMenus>
    </root>
    <!-- ==============================================================================================
    The ToolsFile must have a valid structure as shown below
    All attributes and their values are case sensitive!
    <root>
      <modules>
        <module />
        <module/>
      </modules>
      <tools>
        <tool />
        <tool />
         ...
      </tools>
        ...
      <colors>
        <color/>
        <color/>
      </colors>
    </root>
     
    <tool> element valid attributes:
      
    name (required): Bold Italic Underline StrikeThrough Superscript Subscript
    JustifyLeft JustifyCenter JustifyRight JustifyFull InsertOrderedList InsertUnorderedList
    Outdent Indent Cut Copy Paste PasteFromWord
    PastePlainText PasteAsHtml Print Undo Redo ImageManager
    AbsolutePosition LinkManager Unlink InsertBoldHorizontalRule InsertTable ToggleTableBorder
    FormatBlock ApplyClass FontName  FontSize InsertCustomLink Custom
    InsertSymbol BackColor ForeColor FlashManager MediaManager SpellCheck
    FormatStripper InsertParagraph InsertSnippet Help FindAndReplace DocumentManager
    PasteFromWordNoFontsNoSizes InsertFormElement InsertDate InsertTime TemplateManager ToggleScreenMode
    Zoom ModuleManager ToggleDocking RepeatLastCommand AboutDialog 
      
    shortcut
    (not required):
     The key combination for the specific tool. Examples:
        <tool name="TemplateManager" shortcut="Ctrl+Shift+Alt+N"/>
        <tool name="LinkManager" shortcut="Ctrl+L" />
     
     
    <separator> element
    true/false Indicates whether a separator should appear at current position.
     
    <tools> element valid attributes:
    name (required): This string will identify the toolbar.
    enabled (not required): true/false (Indicates whether the tool will be available on the client or not)
    visible (not required):
     true/false (Indicates whether the tool should appear in the toolbar or not. This toolbar will be available client-side - the property defines only the visibility of the tool.)
    dockable (not required):
     true/false (Indicates whether you will be able to drag&drop the toolbar to the docking zones)
     
    <module> element valid attributes:
    (module elements should appear as child elements of an element "modules")
    name (required):
     The friendly name of the module. When in floating mode the name will appear in the tool's titlebar.
    dockable (not required):
     (Indicates whether you will be able to drag&drop the tool to the docking zones)
    enabled (not required):
     (Indicates whether the module will be available on the client or not)
    visible (not required):
     (Indicates whether the module should appear in the toolbar or not. This module will be available client-side - the property defines only the visibility of the module. )
     
    <link> element valid attributes:
    (link elements should appear as child elements of an element "links")
    name (required):
     Link/Category Name/Alias
    href (not required):
     URL of the link/category
    target (not required):
     The target window of the link
    tooltip (not required):
     The tooltip for the link
      
    <symbol> element valid attributes:
    (symbol elements should appear as child elements of an element "symbols")
    value (required):
     The symbol to be displayed
     
    <font> element valid attributes:
    (font elements should appear as child elements of a tool element with "name" attribute set to "fontNames")
    name (required):
     Font Name
      
    <class> element valid attributes:
    (class elements should appear as child elements of an element "classes")
    name (required):
     Class Alias
    value (required):
     Class Name
     
    <paragraph> element valid attributes:
    (paragraph elements should appear as child elements of an element "paragraphs")
      
    name (required):
     Paragraph Alias
    value (required):
     Paragraph Name
     
    <color> element valid attributes:
    (color elements should appear as child elements of an element "colors")
    value (not required):
     Hex value of the color
     
    <snippet> element valid attributes:
    (snippet elements should appear as child elements of an element "snippets")
    name (required):
     Snippet Alias
      
    <language> element valid attributes:
    (language elements should appear as child elements of an element "Languages")
    code (required):
     Language code
    title (required):
     Language Title
      
    The contextMenus tag in the Tools file allows you to change the default or specify custom context menus for different HTML elements.
    <contextMenu > element valid attributes:
    (contextMenu elements should appear as child elements of an element "contextMenus")
    forElement (required):
     The HTML element that will call this menu.
    enabled (required):
     Defines if this context menu is switched.
     
    The example below shows how to attach custom context menus for <A> and <P> elements.
     
    <contextMenus>
       <contextMenu forElement="A" enabled="false">
       </contextMenu>
       <contextMenu forElement="P">
           <tool name="JustifyLeft" />
           <tool name="JustifyCenter" />
           <tool name="JustifyRight" />
           <tool name="JustifyFull" />
       </contextMenu>
    </contextMenus>            
    =============================================================================================== -->
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 20 Jan 2011 Link to this post

    This gets weirder, Ive deleted ALL the text in the RADEditor and when I step through the code and check the Contents property, the original text is still there !

    is this a bug with the editor ??  it just doesnt work.  Can anyone help ?
  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 20 Jan 2011 Link to this post

    Hi,

    The case could be that the editor's original value overwrites the one submitted from the browser. This happens, for example, if you did not put the initial value setting in a if block checking whether the page is postback. Here is what you should do in your Page_Load method:

      If Not Page.IsPostBack Then
                 
      End If

    If this is not the reason for the problem, we ask you to open a support ticket and send us a sample working project including your aspx page with its codebehind. We will review your code and provide a solution.

    Best regards,
    Rumen
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. mww
    mww avatar
    257 posts
    Member since:
    Sep 2012

    Posted 20 Jan 2011 Link to this post

    thats exactly what had happened, I usually put the loading code inside an !IsPostBack check, Id forgotton to do that this time.  doh !

    thank you.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017