Use tinymce.dom.bind wrapper, not the horrific element.onclick. Also, rm a swap file.