Ticket #24409: 24409.05.patch
File 24409.05.patch, 20.6 KB (added by , 11 years ago) |
---|
-
src/wp-includes/class-wp-editor.php
207 207 $ext_plugins = ''; 208 208 209 209 if ( $set['teeny'] ) { 210 self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'fullscreen', 'link', 'image', 'wordpress', 'wp link' ), $editor_id );210 self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'fullscreen', 'link', 'image', 'wordpress', 'wpeditimage', 'wplink' ), $editor_id ); 211 211 } else { 212 212 /** 213 213 * TinyMCE external plugins filter … … 335 335 self::$first_init['external_plugins'] = json_encode( $mce_external_plugins ); 336 336 } 337 337 338 // WordPress default stylesheet 339 $mce_css = array( self::$baseurl . '/skins/wordpress/wp-content.css' ); 338 $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 339 $version = 'ver=' . $GLOBALS['wp_version']; 340 $dashicons = includes_url( "css/dashicons$suffix.css?$version" ); 340 341 342 // WordPress default stylesheet and dashicons 343 $mce_css = array( $dashicons, self::$baseurl . '/skins/wordpress/wp-content.css' ); 344 341 345 // load editor_style.css if the current theme supports it 342 346 if ( ! empty( $GLOBALS['editor_styles'] ) && is_array( $GLOBALS['editor_styles'] ) ) { 343 347 $editor_styles = $GLOBALS['editor_styles']; -
src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
42 42 43 43 width = parseInt( w, 10 ) + 10; 44 44 45 return '<div class="mceTemp" draggable="true"><dl id="'+ id +'" class="wp-caption '+ cls +'" style="width: '+ width +'px">' +45 return '<div class="mceTemp"><dl id="'+ id +'" class="wp-caption '+ cls +'" style="width: '+ width +'px">' + 46 46 '<dt class="wp-caption-dt">'+ img +'</dt><dd class="wp-caption-dd">'+ cap +'</dd></dl></div>'; 47 47 }); 48 48 } … … 102 102 } 103 103 104 104 function extractImageData( imageNode ) { 105 var classes, metadata, captionBlock, caption; 105 var classes, metadata, captionBlock, caption, 106 dom = editor.dom; 106 107 107 108 // default attributes 108 109 metadata = { … … 118 119 linkUrl: '' 119 120 }; 120 121 121 metadata.url = editor.dom.getAttrib( imageNode, 'src' );122 metadata.alt = editor.dom.getAttrib( imageNode, 'alt' );123 metadata.width = parseInt( editor.dom.getAttrib( imageNode, 'width' ), 10 );124 metadata.height = parseInt( editor.dom.getAttrib( imageNode, 'height' ), 10 );122 metadata.url = dom.getAttrib( imageNode, 'src' ); 123 metadata.alt = dom.getAttrib( imageNode, 'alt' ); 124 metadata.width = parseInt( dom.getAttrib( imageNode, 'width' ), 10 ); 125 metadata.height = parseInt( dom.getAttrib( imageNode, 'height' ), 10 ); 125 126 126 //TODO: probably should capture attributes on both the <img /> and the <a /> so that they can be restored when the image and/or caption are updated 127 //TODO: probably should capture attributes on both the <img /> and the <a /> so that they can be restored 128 // when the image and/or caption are updated 127 129 // maybe use getAttribs() 128 130 129 131 // extract meta data from classes (candidate for turning into a method) … … 144 146 } ); 145 147 146 148 // extract caption 147 captionBlock = editor.dom.getParents( imageNode, '.wp-caption' );149 captionBlock = dom.getParents( imageNode, '.wp-caption' ); 148 150 149 151 if ( captionBlock.length ) { 150 152 captionBlock = captionBlock[0]; … … 155 157 metadata.align = name.replace( 'align', '' ); 156 158 } 157 159 } ); 158 caption = editor.dom.select( 'dd.wp-caption-dd', captionBlock ); 160 161 caption = dom.select( 'dd.wp-caption-dd', captionBlock ); 159 162 if ( caption.length ) { 160 163 caption = caption[0]; 161 164 // need to do some more thinking about this 162 165 metadata.caption = editor.serializer.serialize( caption ) 163 166 .replace( /<br[^>]*>/g, '$&\n' ).replace( /^<p>/, '' ).replace( /<\/p>$/, '' ); 164 165 167 } 166 168 } 167 169 168 170 // extract linkTo 169 if ( imageNode.parentNode .nodeName === 'A' ) {170 metadata.linkUrl = editor.dom.getAttrib( imageNode.parentNode, 'href' );171 if ( imageNode.parentNode && imageNode.parentNode.nodeName === 'A' ) { 172 metadata.linkUrl = dom.getAttrib( imageNode.parentNode, 'href' ); 171 173 } 172 174 173 175 return metadata; … … 174 176 } 175 177 176 178 function updateImage( imageNode, imageData ) { 177 var className, width, node, html, captionNode, nodeToReplace, uid ;179 var className, width, node, html, captionNode, nodeToReplace, uid, editedImg; 178 180 179 181 if ( imageData.caption ) { 180 182 … … 185 187 186 188 //TODO: shouldn't add the id attribute if it isn't an attachment 187 189 188 // should create a new function for gen rating the caption markup190 // should create a new function for generating the caption markup 189 191 html = '<dl id="'+ imageData.attachment_id +'" class="wp-caption '+ className +'" style="width: '+ width +'px">' + 190 192 '<dt class="wp-caption-dt">'+ html + '</dt><dd class="wp-caption-dd">'+ imageData.caption +'</dd></dl>'; 191 193 192 node = editor.dom.create( 'div', { 'class': 'mceTemp' , draggable: 'true'}, html );194 node = editor.dom.create( 'div', { 'class': 'mceTemp' }, html ); 193 195 } else { 194 196 node = createImageAndLink( imageData, 'node' ); 195 197 } … … 215 217 216 218 editor.dom.setAttrib( node, 'data-wp-replace-id', '' ); 217 219 218 if ( node.nodeName === 'IMG' ) { 219 editor.selection.select( node ); 220 } else { 221 editor.selection.select( editor.dom.select( 'img', node )[0] ); 220 editor.nodeChanged(); 221 222 editedImg = node.nodeName === 'IMG' ? node : editor.dom.select( 'img', node )[0]; 223 224 if ( editedImg ) { 225 editor.selection.select( editedImg ); 226 // refresh toolbar 227 addToolbar( editedImg ); 222 228 } 223 editor.nodeChanged();224 229 } 225 230 226 231 function createImageAndLink( imageData, mode ) { … … 264 269 } 265 270 } 266 271 272 function editImage( img ) { 273 var frame, callback; 274 275 if ( typeof wp === 'undefined' || ! wp.media ) { 276 editor.execCommand( 'mceImage' ); 277 return; 278 } 279 280 editor.undoManager.add(); 281 282 frame = wp.media({ 283 frame: 'image', 284 state: 'image-details', 285 metadata: extractImageData( img ) 286 } ); 287 288 callback = function( imageData ) { 289 updateImage( img, imageData ); 290 editor.focus(); 291 }; 292 293 frame.state('image-details').on( 'update', callback ); 294 frame.state('replace-image').on( 'replace', callback ); 295 frame.on( 'close', function() { 296 editor.focus(); 297 // editor.selection.select( img ); 298 // editor.nodeChanged(); 299 }); 300 301 frame.open(); 302 } 303 304 function removeImage( node ) { 305 var wrap; 306 307 if ( node.nodeName === 'DIV' && editor.dom.hasClass( node, 'mceTemp' ) ) { 308 wrap = node; 309 } else if ( node.nodeName === 'IMG' || node.nodeName === 'DT' || node.nodeName === 'A' ) { 310 wrap = editor.dom.getParent( node, 'div.mceTemp' ); 311 } 312 313 if ( wrap ) { 314 if ( wrap.nextSibling ) { 315 editor.selection.select( wrap.nextSibling ); 316 } else if ( wrap.previousSibling ) { 317 editor.selection.select( wrap.previousSibling ); 318 } else { 319 editor.selection.select( wrap.parentNode ); 320 } 321 322 editor.selection.collapse( true ); 323 editor.nodeChanged(); 324 editor.dom.remove( wrap ); 325 } else { 326 editor.dom.remove( node ); 327 } 328 } 329 330 function addToolbar( node ) { 331 var position, toolbarHtml, toolbar, 332 dom = editor.dom; 333 334 removeToolbar(); 335 336 // Don't add to placeholders 337 if ( ! node || node.nodeName !== 'IMG' || isPlaceholder( node ) ) { 338 return; 339 } 340 341 dom.setAttrib( node, 'data-wp-imgselect', 1 ); 342 position = dom.getPos( node, editor.getBody() ); 343 344 toolbarHtml = '<div class="overlay" data-mce-bogus="1"></div><div class="wrapper" data-mce-bogus="1">' + 345 '<div class="dashicons dashicons-format-image edit" data-mce-bogus="1"></div> ' + 346 '<div class="dashicons dashicons-no-alt remove" data-mce-bogus="1"></div></div>'; 347 348 toolbar = dom.create( 'div', { 349 'id': 'wp-image-toolbar', 350 'data-mce-bogus': '1', 351 'contenteditable': false 352 }, toolbarHtml ); 353 354 editor.getBody().appendChild( toolbar ); 355 356 dom.setStyles( toolbar, { 357 top: position.y, 358 left: position.x, 359 width: node.width, 360 height: ( tinymce.Env.ie ) ? null : node.height // && tinymce.Env.ie < 9 361 }); 362 } 363 364 function removeToolbar() { 365 var toolbar = editor.dom.get( 'wp-image-toolbar' ); 366 367 if ( toolbar ) { 368 editor.dom.remove( toolbar ); 369 } 370 371 editor.dom.setAttrib( editor.dom.select( 'img[data-wp-imgselect]' ), 'data-wp-imgselect', null ); 372 } 373 374 function isPlaceholder( node ) { 375 var dom = editor.dom; 376 377 if ( dom.hasClass( node, 'mceItem' ) || dom.getAttrib( node, 'data-mce-placeholder' ) || 378 dom.getAttrib( node, 'data-mce-object' ) ) { 379 380 return true; 381 } 382 383 return false; 384 } 385 267 386 editor.on( 'init', function() { 268 387 var dom = editor.dom; 269 388 270 389 // Add caption field to the default image dialog 271 editor.on( 'wpLoadImageForm', function( e ) {390 editor.on( 'wpLoadImageForm', function( event ) { 272 391 if ( editor.getParam( 'wpeditimage_disable_captions' ) ) { 273 392 return; 274 393 } … … 283 402 label: 'Image caption' 284 403 }; 285 404 286 e .data.splice( e.data.length - 1, 0, captionField );405 event.data.splice( event.data.length - 1, 0, captionField ); 287 406 }); 288 407 289 408 // Fix caption parent width for images added from URL 290 editor.on( 'wpNewImageRefresh', function( e ) {409 editor.on( 'wpNewImageRefresh', function( event ) { 291 410 var parent, captionWidth; 292 411 293 if ( parent = dom.getParent( e .node, 'dl.wp-caption' ) ) {412 if ( parent = dom.getParent( event.node, 'dl.wp-caption' ) ) { 294 413 if ( ! parent.style.width ) { 295 captionWidth = parseInt( e .node.clientWidth, 10 ) + 10;414 captionWidth = parseInt( event.node.clientWidth, 10 ) + 10; 296 415 captionWidth = captionWidth ? captionWidth + 'px' : '50%'; 297 416 dom.setStyle( parent, 'width', captionWidth ); 298 417 } … … 299 418 } 300 419 }); 301 420 302 editor.on( 'wpImageFormSubmit', function( e ) {303 var data = e .imgData.data,304 imgNode = e .imgData.node,305 caption = e .imgData.caption,421 editor.on( 'wpImageFormSubmit', function( event ) { 422 var data = event.imgData.data, 423 imgNode = event.imgData.node, 424 caption = event.imgData.caption, 306 425 captionId = '', 307 426 captionAlign = '', 308 427 captionWidth = '', … … 311 430 // Temp image id so we can find the node later 312 431 data.id = '__wp-temp-img-id'; 313 432 // Cancel the original callback 314 e .imgData.cancel = true;433 event.imgData.cancel = true; 315 434 316 435 if ( ! data.style ) { 317 436 data.style = null; … … 365 484 } 366 485 367 486 if ( parent && parent.nodeName === 'P' ) { 368 wrap = dom.create( 'div', { 'class': 'mceTemp' , 'draggable': 'true'}, html );487 wrap = dom.create( 'div', { 'class': 'mceTemp' }, html ); 369 488 dom.insertAfter( wrap, parent ); 370 489 editor.selection.select( wrap ); 371 490 editor.nodeChanged(); … … 374 493 dom.remove( parent ); 375 494 } 376 495 } else { 377 editor.selection.setContent( '<div class="mceTemp" draggable="true">' + html + '</div>' );496 editor.selection.setContent( '<div class="mceTemp">' + html + '</div>' ); 378 497 } 379 498 } else { 380 499 editor.selection.setContent( html ); … … 431 550 '<dt class="wp-caption-dt">'+ html +'</dt><dd class="wp-caption-dd">'+ caption +'</dd></dl>'; 432 551 433 552 if ( parent = dom.getParent( imgNode, 'p' ) ) { 434 wrap = dom.create( 'div', { 'class': 'mceTemp' , 'draggable': 'true'}, html );553 wrap = dom.create( 'div', { 'class': 'mceTemp' }, html ); 435 554 dom.insertAfter( wrap, parent ); 436 555 editor.selection.select( wrap ); 437 556 editor.nodeChanged(); … … 443 562 dom.remove( parent ); 444 563 } 445 564 } else { 446 editor.selection.setContent( '<div class="mceTemp" draggable="true">' + html + '</div>' );565 editor.selection.setContent( '<div class="mceTemp">' + html + '</div>' ); 447 566 } 448 567 } 449 568 } else { … … 466 585 467 586 imgNode = dom.get('__wp-temp-img-id'); 468 587 dom.setAttrib( imgNode, 'id', imgId ); 469 e .imgData.node = imgNode;588 event.imgData.node = imgNode; 470 589 }); 471 590 472 editor.on( 'wpLoadImageData', function( e ) {591 editor.on( 'wpLoadImageData', function( event ) { 473 592 var parent, 474 data = e .imgData.data,475 imgNode = e .imgData.node;593 data = event.imgData.data, 594 imgNode = event.imgData.node; 476 595 477 596 if ( parent = dom.getParent( imgNode, 'dl.wp-caption' ) ) { 478 597 parent = dom.select( 'dd.wp-caption-dd', parent )[0]; … … 492 611 event.preventDefault(); 493 612 } 494 613 }); 614 615 // Prevent IE11 from making dl.wp-caption resizable 616 if ( tinymce.Env.ie && tinymce.Env.ie > 10 ) { 617 // The 'mscontrolselect' event is supported only in IE11+ 618 dom.bind( editor.getBody(), 'mscontrolselect', function( event ) { 619 if ( event.target.nodeName === 'IMG' && dom.getParent( event.target, '.wp-caption' ) ) { 620 // Hide the thick border with resize handles around dl.wp-caption 621 editor.getBody().focus(); // :( 622 } else if ( event.target.nodeName === 'DL' && dom.hasClass( event.target, 'wp-caption' ) ) { 623 // Trigger the thick border with resize handles... 624 // This will make the caption text editable. 625 event.target.focus(); 626 } 627 }); 628 629 editor.on( 'click', function( event ) { 630 if ( event.target.nodeName === 'IMG' && dom.getAttrib( event.target, 'data-wp-imgselect' ) && 631 dom.getParent( event.target, 'dl.wp-caption' ) ) { 632 633 editor.getBody().focus(); 634 } 635 }); 636 } 495 637 }); 496 638 497 639 editor.on( 'ObjectResized', function( event ) { … … 498 640 var parent, width, 499 641 node = event.target; 500 642 501 if ( node.nodeName === 'IMG' && ( parent = editor.dom.getParent( node, '.wp-caption' ) ) ) { 502 width = event.width || editor.dom.getAttrib( node, 'width' ); 643 if ( node.nodeName === 'IMG' ) { 644 if ( parent = editor.dom.getParent( node, '.wp-caption' ) ) { 645 width = event.width || editor.dom.getAttrib( node, 'width' ); 503 646 504 if ( width ) { 505 width = parseInt( width, 10 ) + 10; 506 editor.dom.setStyle( parent, 'width', width + 'px' ); 647 if ( width ) { 648 width = parseInt( width, 10 ) + 10; 649 editor.dom.setStyle( parent, 'width', width + 'px' ); 650 } 507 651 } 652 // refresh toolbar 653 addToolbar( node ); 508 654 } 509 655 }); 510 656 511 editor.on( 'BeforeExecCommand', function( e ) {657 editor.on( 'BeforeExecCommand', function( event ) { 512 658 var node, p, DL, align, 513 cmd = e .command,659 cmd = event.command, 514 660 dom = editor.dom; 515 661 516 662 if ( cmd === 'mceInsertContent' ) { … … 525 671 if ( tinymce.Env.ie > 8 ) { 526 672 setTimeout( function() { 527 673 editor.selection.setCursorLocation( p, 0 ); 528 editor.selection.setContent( e .value );674 editor.selection.setContent( event.value ); 529 675 }, 500 ); 530 676 531 677 return false; … … 536 682 align = cmd.substr(7).toLowerCase(); 537 683 align = 'align' + align; 538 684 685 removeToolbar(); 686 539 687 if ( dom.is( node, 'dl.wp-caption' ) ) { 540 688 DL = node; 541 689 } else { … … 566 714 } 567 715 }); 568 716 569 editor.on( 'keydown', function( e ) {717 editor.on( 'keydown', function( event ) { 570 718 var node, wrap, P, spacer, 571 719 selection = editor.selection, 572 720 dom = editor.dom; 573 721 574 if ( e .keyCode === tinymce.util.VK.ENTER ) {722 if ( event.keyCode === tinymce.util.VK.ENTER ) { 575 723 // When pressing Enter inside a caption move the caret to a new parapraph under it 576 wrap = dom.getParent( editor.selection.getNode(), 'div.mceTemp' ); 724 node = selection.getNode(); 725 wrap = dom.getParent( node, 'div.mceTemp' ); 577 726 578 727 if ( wrap ) { 579 dom.events.cancel( e); // Doesn't cancel all :(728 dom.events.cancel( event ); // Doesn't cancel all :( 580 729 581 730 // Remove any extra dt and dd cleated on pressing Enter... 582 731 tinymce.each( dom.select( 'dt, dd', wrap ), function( element ) { … … 585 734 } 586 735 }); 587 736 588 spacer = tinymce.Env.ie ? '' : '<br data-mce-bogus="1" />';737 spacer = tinymce.Env.ie && tinymce.Env.ie < 11 ? '' : '<br data-mce-bogus="1" />'; 589 738 P = dom.create( 'p', null, spacer ); 590 dom.insertAfter( P, wrap ); 739 740 if ( node.nodeName === 'DD' ) { 741 dom.insertAfter( P, wrap ); 742 } else { 743 wrap.parentNode.insertBefore( P, wrap ); 744 } 745 746 editor.nodeChanged(); 591 747 selection.setCursorLocation( P, 0 ); 592 editor.nodeChanged();593 748 } 594 } else if ( e .keyCode === tinymce.util.VK.DELETE || e.keyCode === tinymce.util.VK.BACKSPACE ) {749 } else if ( event.keyCode === tinymce.util.VK.DELETE || event.keyCode === tinymce.util.VK.BACKSPACE ) { 595 750 node = selection.getNode(); 596 751 597 752 if ( node.nodeName === 'DIV' && dom.hasClass( node, 'mceTemp' ) ) { … … 601 756 } 602 757 603 758 if ( wrap ) { 604 dom.events.cancel(e); 605 606 if ( wrap.nextSibling ) { 607 selection.select( wrap.nextSibling ); 608 } else if ( wrap.previousSibling ) { 609 selection.select( wrap.previousSibling ); 610 } else { 611 selection.select( wrap.parentNode ); 612 } 613 614 selection.collapse( true ); 615 editor.nodeChanged(); 616 dom.remove( wrap ); 617 wrap = null; 759 dom.events.cancel( event ); 760 removeImage( node ); 618 761 return false; 619 762 } 620 763 } 621 764 }); 622 765 623 editor.on( 'mousedown', function( e ) { 624 var imageNode, frame, callback; 625 if ( e.target.nodeName === 'IMG' && editor.selection.getNode() === e.target ) { 626 // Don't trigger on right-click 627 if ( e.button !== 2 ) { 766 editor.on( 'mousedown', function( event ) { 767 var node = event.target; 628 768 629 // Don't attempt to edit placeholders630 if ( editor.dom.hasClass( e.target, 'mceItem' ) || '1' === editor.dom.getAttrib( e.target, 'data-mce-placeholder' ) ) {631 return;632 769 if ( tinymce.Env.ie && editor.dom.getParent( node, '#wp-image-toolbar' ) ) { 770 // Stop IE > 8 from making the wrapper resizable on mousedown 771 event.preventDefault(); 772 } 633 773 634 imageNode = e.target; 774 if ( node.nodeName === 'IMG' && ! editor.dom.getAttrib( node, 'data-wp-imgselect' ) && ! isPlaceholder( node ) ) { 775 addToolbar( node ); 776 } 777 }); 635 778 636 frame = wp.media({ 637 frame: 'image', 638 state: 'image-details', 639 metadata: extractImageData( imageNode ) 640 } ); 779 editor.on( 'mouseup', function( event ) { 780 var image, 781 node = event.target, 782 dom = editor.dom; 641 783 642 callback = function( imageData ) {643 updateImage( imageNode, imageData );644 editor.focus();645 };784 // Don't trigger on right-click 785 if ( event.button && event.button > 1 ) { 786 return; 787 } 646 788 647 frame.state('image-details').on( 'update', callback );648 frame.state('replace-image').on( 'replace', callback );789 if ( node.nodeName === 'DIV' && dom.getParent( node, '#wp-image-toolbar' ) ) { 790 image = dom.select( 'img[data-wp-imgselect]' )[0]; 649 791 650 frame.open(); 792 if ( image ) { 793 editor.selection.select( image ); 794 795 if ( dom.hasClass( node, 'remove' ) ) { 796 removeImage( image ); 797 removeToolbar(); 798 } else if ( dom.hasClass( node, 'edit' ) ) { 799 editImage( image ); 800 } 651 801 } 802 } else if ( node.nodeName !== 'IMG' ) { 803 removeToolbar(); 652 804 } 653 805 } ); 654 806 … … 660 812 return getShortcode( content ); 661 813 }; 662 814 663 editor.on( 'BeforeSetContent', function( e ) {664 e .content = editor.wpSetImgCaption( e.content );815 editor.on( 'BeforeSetContent', function( event ) { 816 event.content = editor.wpSetImgCaption( event.content ); 665 817 }); 666 818 667 editor.on( 'PostProcess', function( e ) { 668 if ( e.get ) { 669 e.content = editor.wpGetImgCaption( e.content ); 819 editor.on( 'PostProcess', function( event ) { 820 if ( event.get ) { 821 event.content = editor.wpGetImgCaption( event.content ); 822 event.content = event.content.replace( / data-wp-imgselect="1"/g, '' ); 670 823 } 671 824 }); 672 825 -
src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
117 117 cursor: pointer; 118 118 } 119 119 120 #wp-image-toolbar { 121 position: absolute; 122 } 123 124 #wp-image-toolbar .wrapper { 125 position: relative; 126 height: 33px; 127 background-color: rgba(0,0,0,0.3); 128 } 129 130 #wp-image-toolbar .overlay { 131 position: absolute; 132 top: 0; 133 left: 0; 134 height: 100%; 135 width: 100%; 136 background-color: #000; 137 opacity: 0.25; 138 filter: alpha(opacity=25); 139 } 140 141 #wp-image-toolbar .dashicons { 142 position: absolute; 143 color: white; 144 width: 36px; 145 height: 32px; 146 line-height: 32px; 147 cursor: pointer; 148 } 149 150 #wp-image-toolbar div.dashicons-no-alt { 151 top: 0; 152 right: 0; 153 } 154 155 #wp-image-toolbar div.dashicons-format-image { 156 top: 0; 157 left: 0; 158 } 159 160 /* Image resize handles */ 161 .mce-content-body div.mce-resizehandle { 162 border-color: #777; 163 width: 7px; 164 height: 7px; 165 } 166 167 .mce-content-body img[data-mce-selected] { 168 outline: 1px solid #777; 169 } 170 120 171 .mce-content-body img.wp-gallery:hover { 121 172 background-color: #ededed; 122 173 border-style: solid;