Custom Widget screen doesn't resize correctly when using

Posted by Community Admin on 04-Aug-2018 12:17

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

All Replies

Posted by Community Admin on 08-Apr-2013 00:00

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?

Posted by Community Admin on 08-Apr-2013 00:00

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.

Posted by Community Admin on 09-Apr-2013 00:00

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?

Posted by Community Admin on 12-Apr-2013 00:00

Hello,

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">
       ....
</style>

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

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

http://www.sitefinity.com/blogs/josh-morales-blog/2011/10/05/selecting_sitefinity_4_content_inside_widget_designers

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

This thread is closed