Fork me on GitHub
Current releases are 2.1.4 (30 Oct 2014) and 2.0.18.13 (5 Aug 2014)

Ready for 2.1? Find out if your plugins are compatible. 2.0 will no longer be updated after Dec 2014.

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.