Resize Editor Lite (WebPart) Content in Edit Mode

4 posts, 1 answers
  1. tatjana
    tatjana avatar
    3 posts
    Member since:
    Mar 2010

    Posted 10 May 2010 Link to this post

     Hi
    The Editor Lite breaks our Page Layout in Edit Mode (while in Display Mode it fits fine into the width of the surrounding div).
    We tried suggested Javascript solution for resizing the Web Parts in Edit Mode and it seems to work fine with Firefox, but not with IE7 and IE8.

    On the Pagelayout I added the following:

    <asp:Content ContentPlaceholderID="PlaceHolderAdditionalPageHead" runat="server" >
    <script type="text/javascript"> 
                    function OnClientLoadResize(editor) 
                    { 
                      //set the width and height of the RadEditor 
                      editor.SetSize("200","200"); 
                    } 
                    </script>
    </asp:Content>

    The script is called and it seems as if the settings get respected for a second, but then the default size is applied to the  editor.
    Any hints?

    Thanks
    Tatjana

  2. Answer
    Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 13 May 2010 Link to this post

    Hello tatjana,

    Try the following javascript code:
    function OnClientLoadResize(editor)
    {
      //set the width and height of the RadEditor
      window.setTimeout(function(){
        editor.SetSize("200","200");                  
      }, 500)
    }


    Regards,
    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.

  3. tatjana
    tatjana avatar
    3 posts
    Member since:
    Mar 2010

    Posted 19 May 2010 Link to this post

    Hello Stanimir!

    Thanks a lot, this works, I can now resize the editor. Is there a possibility to constrain this to only a part of the editors on a page if you have multiple instances?

    Thanks
    Tatjana
  4. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 19 May 2010 Link to this post

    Hello tatjana,

    Try the following javascript code:
    function OnClientLoadResize(editor)
    {
        //set the width and height of the RadEditor
        window.setTimeout(function()
        {
            var oArray = RadEditorGlobalArray;
            if (oArray && oArray.length > 1)
            {
                editor.SetSize("200", "200");
            }
        }, 500);
    }


    Regards,
    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