Fork me on GitHub
Current release is 2.1.6 (21 Nov 2014).

Users who have not yet upgraded to 2.1 should get security release 2.0.18.14 (1 Nov 2014). We will stop providing these security releases to 2.0 at the end of this year.

Resizing of Frame in cleditor

edited April 2012 in Vanilla 2.0 Help
This discussion is related to the CLEditor jQuery WYSIWYG addon.
  function ResizeEditor (editor)
  {

       //editor=$("div.cleditorMain>textarea").cleditor()[0];
       var size = 0; 

       f=editor.$frame[0];         
       temp_size = f.contentWindow.document.body.scrollHeight + 25;

       if (temp_size!=size)
       {
          size=temp_size;
          defaultsize=$.cleditor.defaultOptions.height;
          if (size<=defaultsize) size=defaultsize;

          f.style.height = size + "px";

       }   
  } 

i'm not good in javascript - but may be this code would be useful for somebody else.

    $doc.click(hidePopups)
      .bind("keypress", function(e) {
 ResizeEditor (editor)
});

Answers

Sign In or Register to comment.