+ if ( document.selection && wpLink.range ) {
+ // IE
+ // Note: If no text is selected, IE will not place the cursor
+ // inside the closing tag.
+ textarea.focus();
+ wpLink.range.text = html + wpLink.range.text + '</a>';
+ wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
+ wpLink.range.select();
+
+ wpLink.range = null;
+ } else if ( typeof textarea.selectionStart !== 'undefined' ) {
+ // W3C
+ begin = textarea.selectionStart;