Changeset 18516 for trunk/wp-includes/class-wp-editor.php
- Timestamp:
- 08/06/2011 01:35:02 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/class-wp-editor.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-editor.php
r18511 r18516 430 430 431 431 add_thickbox(); 432 wp_enqueue_script('media-upload'); 432 433 } 433 434 … … 526 527 527 528 if ( mce ) 528 try {tinymce.init(init);}catch(e){}529 try { tinymce.init(init); } catch(e){} 529 530 } 530 531 } … … 532 533 if ( typeof(QTags) == 'function' ) { 533 534 for ( qt in tinyMCEPreInit.qtInit ) { 534 try {quicktags(tinyMCEPreInit.qtInit[qt]);}catch(e){}535 try { quicktags( tinyMCEPreInit.qtInit[qt] ); } catch(e){} 535 536 } 536 537 } … … 539 540 var wpActiveEditor; 540 541 541 jQuery('.wp-editor-wrap'). click(function(e){542 jQuery('.wp-editor-wrap').mousedown(function(e){ 542 543 wpActiveEditor = this.id.slice(3, -5); 543 544 }); 544 545 545 function send_to_editor(h) {546 var ed;547 548 if ( typeof(tinymce) != 'undefined' && wpActiveEditor )549 ed = tinymce.get(wpActiveEditor);550 551 if ( ed && !ed.isHidden() ) {552 // restore caret position on IE553 if ( tinymce.isIE && ed.windowManager.insertimagebookmark )554 ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);555 556 if ( h.indexOf('[caption') === 0 ) {557 if ( ed.plugins.wpeditimage )558 h = ed.plugins.wpeditimage._do_shcode(h);559 } else if ( h.indexOf('[gallery') === 0 ) {560 if ( ed.plugins.wpgallery )561 h = ed.plugins.wpgallery._do_gallery(h);562 } else if ( h.indexOf('[embed') === 0 ) {563 if ( ed.plugins.wordpress )564 h = ed.plugins.wordpress._setEmbed(h);565 }566 567 ed.execCommand('mceInsertContent', false, h);568 } else if ( typeof quicktags != 'undefined' ) {569 QTags.insertContent(wpActiveEditor, h);570 } else {571 jQuery('#'+wpActiveEditor).val( jQuery('#'+wpActiveEditor).val() + h );572 }573 574 tb_remove();575 }576 546 <?php 577 547
Note: See TracChangeset
for help on using the changeset viewer.