How to resize CKEditor to fit its parent div

ckeditor, javascript, jquery

Solution

var editor = CKEDITOR.replace( 'editor' );

...

And then, in event of your choice, do this:

editor.resize($("#elem").width(),$("#elem").height());

Hope this helped.

Problem

I have a CKeditor which is placed in a parent div. What is the best way to have the CKEditor exactly fit the div and resize when the div resizes? If possible I would prefer solutions which don't involve jQuery. If this is not possible solutions using jQuery would be fine to.

Original source