我試圖檢測用戶何時離開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