Try Now
More in this section

Forums / Developing with Sitefinity / Custom Widget screen doesn't resize correctly when using a RadEditor

Custom Widget screen doesn't resize correctly when using a RadEditor

4 posts, 0 answered
  1. Jacques
    Jacques avatar
    427 posts
    28 Jun 2007
    08 Apr 2013
    Link to this post
    We've created a custom widget for SF5.4 with title and content fields. The title field is a normal textbox so that's easy, but the content section needs to be a RadEditor. It's displaying, but the dialog window isn't resizing correctly. See attached screenshot.

    Any ideas why this would happen?
  2. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    08 Apr 2013 in reply to Jacques
    Link to this post
    I would hazard a guess that the RadEditor is doing some stuff in pageLoad or post pageload perhaps and the dialog doesn't know it's new size?

    Try setting a timeout of like 1-2 seconds, then run this
    function resizeDesigner() {
        if (dialogBase != null){
            dialogBase.resizeToContent(); //Refresh

    If that works, you know that's the culprit and maybe can hook into the OnClientLoad load event of the radeditor to call the above.
  3. Jacques
    Jacques avatar
    427 posts
    28 Jun 2007
    09 Apr 2013 in reply to Steve
    Link to this post
    Thanks for the response Steve,

    Where would I put this code? I've tried putting it directly in the widget control, but raises a client side exception saying: Uncaught ReferenceError: dialogBase is not defined.

    This happens even if I take out the dialogBase.resizeToContent(); expression within the if statement block.

    Am I supposed to get a reference to the dialog window first somehow?
  4. Stefani Tacheva
    Stefani Tacheva avatar
    718 posts
    31 May 2017
    12 Apr 2013
    Link to this post

    You could use css to re-size the dialog for example using  width 100% !important in a style section of the template:
    <style type="text/css">

    Note that you need to use the id/class of the dialog.

    Furthermore, you could take a look at the following blog post:


    Stefani Tacheva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered