我试图检测用户何时离开tinyMCE编辑器窗口,但我无法这样做。这是我认为应该工作(但是,这不是)代码:TinyMCE:检测onLeave()
$('.mceEditor').blur(function(){
// I would expect this to fire when the user leaves the
// tinyMCE editor, but it never seems to fire
});
我也试过:
$('*')
.not('.mceEditor, .mceEditor *')
.click(function(){
// I would expect this to fire when anything but the tinyMCE editor
// has been clicked, but it seems to fire at every click
});
无论方法工作,我一直在这几个小时。任何帮助都会大大降低。
感谢, 西蒙
PS:我使用jQuery插件版本,在这里找到: http://tinymce.moxiecode.com/examples/example_23.php
感谢您的答复。其实,我做了一些'捅'与萤火虫,并找不到任何
我认为这是将您放入标记的textarea转换为带有html/css的iframe。尽管如此,我仍然会尝试将onblur事件绑定到iframe。值得一试。 – Calvin 2009-12-16 17:09:42