WordPress.org

Make WordPress Core

Changeset 6045


Ignore:
Timestamp:
09/05/2007 11:14:39 PM (11 years ago)
Author:
ryan
Message:

Remove redundant declaration ofedInsertContent. Props Viper007Bond. fixes #4902

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r6026 r6045  
    888888        if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 )
    889889            document.getElementById("quicktags").style.display="none";
    890 
    891         function edInsertContent(myField, myValue) {
    892             //IE support
    893             if (document.selection) {
    894                 myField.focus();
    895                 sel = document.selection.createRange();
    896                 sel.text = myValue;
    897                 myField.focus();
    898             }
    899             //MOZILLA/NETSCAPE support
    900             else if (myField.selectionStart || myField.selectionStart == "0") {
    901                 var startPos = myField.selectionStart;
    902                 var endPos = myField.selectionEnd;
    903                 myField.value = myField.value.substring(0, startPos)
    904                               + myValue
    905                               + myField.value.substring(endPos, myField.value.length);
    906                 myField.focus();
    907                 myField.selectionStart = startPos + myValue.length;
    908                 myField.selectionEnd = startPos + myValue.length;
    909             } else {
    910                 myField.value += myValue;
    911                 myField.focus();
    912             }
    913         }
    914890    // ]]>
    915891    </script>
Note: See TracChangeset for help on using the changeset viewer.