0

我以这种方式声明了编辑器:

CKEDITOR.replace( 'content',{
    toolbar:'Basic'
});
  1. 编辑器不会更改basic样式。

  2. 我想使用一个函数,例如,editor.resize(x,y)但我得到了Uncaught ReferenceError: editor is not defined如何引用我刚刚创建的文本区域作为编辑器的错误?

4

1 回答 1

0
  1. 因为你没有定义config.toolbar_Basic.

  2. 因为editor变量不是全局的。CKEDITOR.instances例如,您可以从对象或事件中获取编辑器的实例:

    CKEDITOR.on( 'instanceCreated', function( evt ) {
        console.log( evt.editor );
    } );
    
于 2013-10-14T06:16:02.137 回答