Using RadEditor with custom Web Control

2 posts, 0 answers
  1. Henry
    Henry avatar
    8 posts
    Member since:
    Feb 2009

    Posted 06 Apr 2011 Link to this post

    Hello,

    I have both RadEditor features enable on a site. I confirmed that this work for the OTB editform.aspx and newform.aspx pages.

    I have a custom web control developed in C# using visual studio. There is a .CS file (compiled DLL is installed in the GAC), .ASCX web control file in the CONTROLTEMPLATE folder, and then the .ASPX page in a regular folder under the root.

    The web control (.ASCX) file has the following code for a description field:

     

    <tr>
            <td style="width:44%" class="ms-formlabel" valign="top">
                Description
            </td>
            <td style="width:53%" class="ms-formbody">
                <asp:HiddenField ID="hdnDescription" runat="server" />
                <span>
                    <span dir="ltr">
                        <textarea name="txtDescription" rows="6" cols="20" id="idDescription" title="Description" class="ms-long">
                          <%= Server.HtmlEncode(hdnDescription.Value)%>  
                        </textarea>
                        <script>if (browseris.ie5up && browseris.win32 && !IsAccessibilityFeatureEnabled()){RTE_ConvertTextAreaToRichEdit("idDescription", true, true, "", "1033", null, null, null, null, null,"FullHtml", "\u002f",null,null,null,null);}else{document.write(" <br><SPAN class=ms-formdescription><a href='javascript:HelpWindowKey(\"nsfullrichtext\")'>Click for help about adding HTML formatting.</a></SPAN> <br>");};</script>                    
                    </span>                                         
      
                </span>    
            </td>
            <td style="width:20%"> </td>
        </tr>

    The RadEditor will not load up. The page is displayed using the OTB HTML editor. Is there anyway to fix this issue?
  2. Stanimir
    Admin
    Stanimir avatar
    1654 posts

    Posted 11 Apr 2011 Link to this post

    Hi Henry,

    You should know that in general the code which replaces the OOB editor with RadEditor for MOSS is executed on the server and not on the client. Also It replaces server controls and not just a textarea field. Unfortunately there is not an easy way to achieve the desired functionality.

    Greetings,
    Stanimir
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top