尝试用ckeditor和jquery做一个简单的焦点命令。
var foo = // what can i do here to signal ckeditor?
$(foo).focus(function(){
$(".class1").hide();
$(".class2").show();
});
也许这很简单,我只是忽略它,但任何建议或链接都非常感激。
尝试过:
CKEditor on focus remove default value
How to listen to basic events in CKEditor?
http://docs.ckeditor.com/#!/api/CKEDITOR.focusManager-method-constructor
http://www.mytechlogy.com/professionals/questions/forum-details/158/how-to-make-focus-in-ckeditor-using-js/?ref=related_posts#.U2EgUv3z3eI
http://ckeditor.com/forums/Support/jquery-click-event-not-working-textarea-ckeditor
答案 0 :(得分:3)
CKEditor活动的基本理念
CKEDITOR.on('instanceCreated', function (event) {
event.editor.on("focus", function () { //nothing to do with jQuery, this is CKEDITOR's on
$(".class1").hide();
$(".class2").show();
}
);
或
CKEDITOR.instances["editorID"].on("focus", function(){ //CKEDITOR's ON
$(".class1").hide();
$(".class2").show();
} );