[英]in ckEditor (wysiwyg) how to set the default clicked button
Upon execution of the ckEditor I want a particular button be already clicked (programmatically). 在执行ckEditor时,我想要一个特定的按钮被点击(以编程方式)。 For example i want the button blockquote be already clicked:
例如,我想要点击按钮blockquote:
so that when the user opens the ckEditor that function related to blockquote button is already fired.
这样当用户打开ckEditor时,与blockquote按钮相关的功能已被触发。 I saw it somewhere, but I don't remember it.
我在某个地方看到了它,但我不记得了。 It was something like
它就像是
dialoge.click ='blockquote ' or something
in Config.js add the following: 在Config.js中添加以下内容:
CKEDITOR.on( 'instanceReady',function(ev) {
ev.editor.execCommand( 'blockquote' );
} );
note: The command is always in lower case. 注意:该命令始终为小写。 It's 'blockquote' or 'bulletedlist' rather than 'BlackQuote' or 'BulletedList'.
它是'blockquote'或'bulletedlist'而不是'BlackQuote'或'BulletedList'。
Try this: 尝试这个:
CKEDITOR.replace( 'editor1', {
on: {
instanceReady: function() {
this.execCommand( 'blockquote' );
}
}
} );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.