Changeset 11515
- Timestamp:
- Apr 28, 2009, 3:02:19 PM (13 years ago)
- Location:
- OpenPNE/trunk/public_html/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE/trunk/public_html/js/pne_decoration.js
r10549 r11515 20 20 table.style.display='none';Event.stopObserving(document,'mousedown',pne_mce_hide_color_table);} 21 21 function pne_insert_str_to_selection(elm,str) 22 {var selection =new Selection(elm);var pos=selection.create();elm.focus();var head=elm.value.substring(0,pos.start);var tail=elm.value.substring(pos.end,elm.value.length);elm.value=head+str+tail;}22 {var selection;elm.focus();if(undefined!==window.execScript){selection=window.opener.document.selection.createRange();selection.text=str+selection.text;}else{selection=new Selection(elm);var pos=selection.create();var head=elm.value.substring(0,pos.start);var tail=elm.value.substring(pos.end,elm.value.length);elm.value=head+str+tail;}} -
OpenPNE/trunk/public_html/js/pne_decoration.js.src
r10549 r11515 180 180 function pne_insert_str_to_selection(elm, str) 181 181 { 182 var selection = new Selection(elm); 183 var pos = selection.create(); 182 var selection; 184 183 elm.focus(); 184 if (undefined !== window.execScript) { 185 selection = window.opener.document.selection.createRange(); 186 selection.text = str + selection.text; 187 } else { 188 selection = new Selection(elm); 189 var pos = selection.create(); 185 190 186 var head = elm.value.substring(0, pos.start); 187 var tail = elm.value.substring(pos.end, elm.value.length); 188 elm.value = head + str + tail; 191 var head = elm.value.substring(0, pos.start); 192 var tail = elm.value.substring(pos.end, elm.value.length); 193 elm.value = head + str + tail; 194 } 189 195 } 190
Note: See TracChangeset
for help on using the changeset viewer.