This is a migrated thread and some comments may be shown as answers.

Resize Editor Lite (WebPart) Content in Edit Mode

3 Answers 51 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
tatjana
Top achievements
Rank 1
tatjana asked on 10 May 2010, 09:32 AM
 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

3 Answers, 1 is accepted

Sort by
0
Accepted
Stanimir
Telerik team
answered on 13 May 2010, 09:35 AM
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.
0
tatjana
Top achievements
Rank 1
answered on 19 May 2010, 02:55 PM
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
0
Stanimir
Telerik team
answered on 19 May 2010, 03:05 PM
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.
Tags
WebParts for SharePoint
Asked by
tatjana
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
tatjana
Top achievements
Rank 1
Share this question
or