Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resize CKEditor to fit its parent div

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.

like image 415
Christian Hager Avatar asked Jan 04 '13 10:01

Christian Hager


1 Answers

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

...

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

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

Hope this helped.

like image 93
semir.babajic Avatar answered Sep 18 '22 23:09

semir.babajic