Resize the radEditor when window is resized

2 posts, 0 answers
  1. Sasireka
    Sasireka avatar
    2 posts
    Member since:
    Dec 2011

    Posted 06 Jan 2012 Link to this post

    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

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 06 Jan 2012 Link to this post

    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.
Back to Top