admin管理员组

文章数量:1394099

I'm using CKEditor 3.2, trying to change the width and height of the ckeditor from javascript, i have used several methods, all unsuccesful:

// doesnt work 1:
CKEDITOR.instances.myinstance.width = 500;

// doesnt work 2:
CKEDITOR.instances.myinstance.width = 500;
CKEDITOR.instances.myinstance.updateElement();

// doesnt work 3:
CKEDITOR.instances.myinstance.config.width = 500;

// doesnt work 4:
CKEDITOR.instances.myinstance.config.width = 500;
CKEDITOR.instances.myinstance.updateElement();

Anyone has any idea how to do this?

I'm using CKEditor 3.2, trying to change the width and height of the ckeditor from javascript, i have used several methods, all unsuccesful:

// doesnt work 1:
CKEDITOR.instances.myinstance.width = 500;

// doesnt work 2:
CKEDITOR.instances.myinstance.width = 500;
CKEDITOR.instances.myinstance.updateElement();

// doesnt work 3:
CKEDITOR.instances.myinstance.config.width = 500;

// doesnt work 4:
CKEDITOR.instances.myinstance.config.width = 500;
CKEDITOR.instances.myinstance.updateElement();

Anyone has any idea how to do this?

Share Improve this question edited Apr 21, 2010 at 10:12 Eytan Levit asked Apr 21, 2010 at 9:04 Eytan LevitEytan Levit 4739 silver badges27 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Use CKEDITOR.instances.myinstance.resize(500, 400)

本文标签: How to change size of CKEditor from javascriptStack Overflow