Fork me on GitHub
Current Releases are 2.1 stable (major release) and 2.0.18.11 (security patch for 2.0)
We've also rebooted our GitHub repo, docs, and more!

Resizing of Frame in cleditor

edited April 2012 in Questions
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.