当我们点击编辑器外面时如何隐藏ckeditor?
这是我的代码:
我想要它,以便当用户点击此ckEditor
之外的任何地方时,我可以隐藏它。
$('body').click(function(event){ if($(event.target).parents('#articleEditor').length <= 0) $('#articleEditor').hide(); })
由于对话框小部件中的点击,类似问题的解决方案对我不起作用。 我最终使用了
$('body').click(function(event){ if($(event.target).parents('#articleEditor').length <= 0 && $(event.target).parents('.cke_dialog').length <= 0) $('#articleEditor').hide(); })