最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to change size of CKEditor from javascript - Stack Overflow

programmeradmin2浏览0评论

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)

发布评论

评论列表(0)

  1. 暂无评论