How can you set the height using JavaScript after CuteEditor has been loaded.

Last post 01-05-2009, 9:26 AM by Adam. 4 replies.
Sort Posts: Previous Next
  •  12-27-2008, 12:41 AM 47234

    How can you set the height using JavaScript after CuteEditor has been loaded.

    I am banging my head against the wall here.
     
    What I am trying to do is detect the browser area, and then do a bit of math to get the exact size minus other controls that I want CuteEdit to be.
     
    For example:
     

    <script type=Javascript>
    function resizefunction() {
       document.getElementById('textarea1').style.height = (document.body.offsetHeight - 40)+"px";
     
    }
    </script>
     
     
    <body onLoad="BLOCKED SCRIPTresizefunction();" onResize="BLOCKED SCRIPTresizefunction();">
    $editor->....
    </body>


    As you can see, I am having no problems getting the browser dimensions, or with setting the style of an object. However, this code refuses to resize CuteEdit and I am going nuts trying to figure this out.
     
     
    Could someone please help me identify what exactly I am missing or what I am doing wrong ?. I do not want to use the auto-resize feature as it would make the editor roll off the screen for large files.
     
     
    Thank you.
     

     

    Custom Software Developent at MicroVB INC
  •  12-27-2008, 2:19 AM 47235 in reply to 47234

    Re: How can you set the height using JavaScript after CuteEditor has been loaded.

    Ok, now this is really cracked out......
     
    Why on earth would this work ...
             function setboxheight() {
                alert("Resizing WYSIWYG");
                document.getElementById('CE_editsource_ID').SetHeight((parent.frames["main"].innerHeight - 60)+"px");
            }
     
    While this FAILS!!!!!!!!!!!!!!!!!!!!!!!!!!
             function setboxheight() {
                document.getElementById('CE_editsource_ID').SetHeight((parent.frames["main"].innerHeight - 60)+"px");
            }
     
     
    ??????????????????????????????????????????????????
     
    It would be nice to receive a timely response as I am a paying customer for this product. (your $500 license).
     
    Thank you


    Custom Software Developent at MicroVB INC
  •  12-28-2008, 10:18 PM 47254 in reply to 47234

    Re: How can you set the height using JavaScript after CuteEditor has been loaded.

    Please use the Editor JavaScript API:
     
    SetWidth() This method is used for setting the width of CuteEditor

    Example:

    // get the cute editor instance
    var editor1 = document.getElementById('CE_Editor1_ID);

    // setting the width of CuteEditor
    editor1.SetWidth("1000");
    editor1.SetWidth("1000px");
    SetHeight() This method is used for setting the height of CuteEditor

    Example:

    // get the cute editor instance
    var editor1 = document.getElementById('CE_Editor1_ID);

    // setting the height of CuteEditor
    editor1.SetHeight("1000");
    editor1.SetHeight("1000px");
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  01-01-2009, 4:12 AM 47341 in reply to 47235

    Re: How can you set the height using JavaScript after CuteEditor has been loaded.

    I have already tried that, and it doesn't do anything for the height of the object.
    Custom Software Developent at MicroVB INC
  •  01-05-2009, 9:26 AM 47409 in reply to 47341

    Re: How can you set the height using JavaScript after CuteEditor has been loaded.

    This function works fine.
     
    Please check the following example (fourth button):
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  • View as RSS news feed in XML