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

Resize the radEditor when window is resized

1 Answer 88 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Sasireka
Top achievements
Rank 1
Sasireka asked on 06 Jan 2012, 07:27 AM
Hi Team,
How can I resize a radeditor to fit the screen when a window is resized. I have used the setSize() property and i have used the below coding but i didn't get the result as expected. Anybody help me on how to resize the radEditor?. Is any possible way to do this via .css?


function
OnClientLoad(editor, args) {

//set the editor size

editor.setSize( 

"100%", document.body.offsetHeight - 90);

window.onresize = ResizeEditor(editor);
}

var resizeFlag = true;

function ResizeEditor(editor)  

if (resizeFlag) {  

editor.setSize( 

"100%", document.body.offsetHeight - 90);  

resizeFlag = false;  

window.setTimeout(function()  

{

resizeFlag = true;  

},100);

}

}

Thanks in advance
Sasireka

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 06 Jan 2012, 10:05 AM
Hello,

Try to use editor's Toggle Screen Mode mode functionality.
<script type="text/javascript"
    function OnClientLoad(editor, args) 
    
        editor.fire("ToggleScreenMode"); 
    
</script>
Also take a look into the following documentation.
setSize

Thanks,
Princy.
Tags
Editor
Asked by
Sasireka
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or