CKEDITOR 默认最大化

 createEditor("newsEditer"); //创建一个editer

//editer 最大化

 CKEDITOR.instances["newsEditer"].on('instanceReady', function (event) {
                var editor = event.editor;
                setTimeout(function () {
                    // Delay bit more if editor is still not ready.
                    if (!editor.element) {
                        setTimeout(arguments.callee, 100);
                        return;
                    }
                    event.removeListener('instanceReady', this.callee);
                    if (editor.name == 'newsEditer') {
                        var command = editor.getCommand('maximize');
                        command.exec();
                    }
                }, 0);
            }, null, null, 9999);

posted @ 2013-11-27 10:06  小川丶  阅读(828)  评论(0编辑  收藏  举报