function getCurrentElement() { if (window.getSelection){ return window.getSelection().anchorNode.parentNode; } return false; }