我以这种方式宣布编辑:
CKEDITOR.replace( 'content',{
toolbar:'Basic'
});
编辑器不会更改为basic
样式。
我想使用editor.resize(x,y)
这样的函数,但是我得到错误Uncaught ReferenceError: editor is not defined
我如何引用我刚刚创建的textarea作为编辑器?
答案 0 :(得分:0)
因为您尚未定义config.toolbar_Basic
。
因为editor
变量不是全局变量。您可以从CKEDITOR.instances
对象或事件中获取编辑器实例:
CKEDITOR.on( 'instanceCreated', function( evt ) {
console.log( evt.editor );
} );