diff -r 51386f1852b8 -r f26a69c40431 includes/clientside/tinymce/plugins/safari/editor_plugin_src.js --- a/includes/clientside/tinymce/plugins/safari/editor_plugin_src.js Thu Mar 06 20:45:46 2008 -0500 +++ b/includes/clientside/tinymce/plugins/safari/editor_plugin_src.js Thu Mar 06 20:47:11 2008 -0500 @@ -25,6 +25,19 @@ ed.execCommand("mceInsertContent", false, '' + ed.selection.getContent() + ''); });*/ + ed.onKeyUp.add(function(ed, e) { + var h; + + // If backspace or delete key + if (e.keyCode == 46 || e.keyCode == 8) { + h = ed.getBody().innerHTML; + + // If there is no text content or images or hr elements then remove everything + if (!/<(img|hr)/.test(h) && tinymce.trim(h.replace(/<[^>]+>/g, '')).length == 0) + ed.setContent('', {format : 'raw'}); + } + }); + // Workaround for FormatBlock bug, http://bugs.webkit.org/show_bug.cgi?id=16004 ed.addCommand('FormatBlock', function(u, v) { var dom = ed.dom, e = dom.getParent(ed.selection.getNode(), dom.isBlock);