mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 15:31:42 +01:00
Remove redundant declaration ofedInsertContent. Props Viper007Bond. fixes #4902
git-svn-id: http://svn.automattic.com/wordpress/trunk@6045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b5a2f7431e
commit
827ed61968
@ -887,30 +887,6 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
|
|||||||
// <![CDATA[
|
// <![CDATA[
|
||||||
if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 )
|
if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0 )
|
||||||
document.getElementById("quicktags").style.display="none";
|
document.getElementById("quicktags").style.display="none";
|
||||||
|
|
||||||
function edInsertContent(myField, myValue) {
|
|
||||||
//IE support
|
|
||||||
if (document.selection) {
|
|
||||||
myField.focus();
|
|
||||||
sel = document.selection.createRange();
|
|
||||||
sel.text = myValue;
|
|
||||||
myField.focus();
|
|
||||||
}
|
|
||||||
//MOZILLA/NETSCAPE support
|
|
||||||
else if (myField.selectionStart || myField.selectionStart == "0") {
|
|
||||||
var startPos = myField.selectionStart;
|
|
||||||
var endPos = myField.selectionEnd;
|
|
||||||
myField.value = myField.value.substring(0, startPos)
|
|
||||||
+ myValue
|
|
||||||
+ myField.value.substring(endPos, myField.value.length);
|
|
||||||
myField.focus();
|
|
||||||
myField.selectionStart = startPos + myValue.length;
|
|
||||||
myField.selectionEnd = startPos + myValue.length;
|
|
||||||
} else {
|
|
||||||
myField.value += myValue;
|
|
||||||
myField.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
|
Loading…
Reference in New Issue
Block a user