Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 134 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 135 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 31 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 49 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 15 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 256 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 257 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 256 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 257 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -389,6 +389,10 @@ |
390 | 390 | context.$content.addClass( 'pasting' ); |
391 | 391 | } |
392 | 392 | setTimeout( function() { |
| 393 | + // Unwrap the span found in webkit copies |
| 394 | + context.$content.find( 'span.Apple-style-span' ).each( function() { |
| 395 | + $( this.childNodes ).insertBefore( this ); |
| 396 | + } ).remove(); |
393 | 397 | var $selection = context.$content.find( ':not(.wikiEditor)' ); |
394 | 398 | while ( $selection.length && $selection.length > 0 ) { |
395 | 399 | var $currentElement = $selection.eq( 0 ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6822,6 +6822,10 @@ |
6823 | 6823 | context.$content.addClass( 'pasting' ); |
6824 | 6824 | } |
6825 | 6825 | setTimeout( function() { |
| 6826 | + // Unwrap the span found in webkit copies |
| 6827 | + context.$content.find( 'span.Apple-style-span' ).each( function() { |
| 6828 | + $( this.childNodes ).insertBefore( this ); |
| 6829 | + } ).remove(); |
6826 | 6830 | var $selection = context.$content.find( ':not(.wikiEditor)' ); |
6827 | 6831 | while ( $selection.length && $selection.length > 0 ) { |
6828 | 6832 | var $currentElement = $selection.eq( 0 ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -456,7 +456,7 @@ |
457 | 457 | switch(event.which){case 8:break;} |
458 | 458 | return true;},'delayedChange':function(event){event.data.scope='division';var newHTML=context.$content.html();if(context.oldDelayedHTML!=newHTML){context.oldDelayedHTML=newHTML;event.data.scope='realchange';} |
459 | 459 | context.fn.updateHistory(event.data.scope=='realchange');return true;},'paste':function(event){context.$content.find(':not(.wikiEditor)').addClass('wikiEditor');if($.layout.name!=='webkit'){context.$content.addClass('pasting');} |
460 | | -setTimeout(function(){var $selection=context.$content.find(':not(.wikiEditor)');while($selection.length&&$selection.length>0){var $currentElement=$selection.eq(0);while(!$currentElement.parent().is('body')&&!$currentElement.parent().is('.wikiEditor')){$currentElement=$currentElement.parent();} |
| 460 | +setTimeout(function(){context.$content.find('span.Apple-style-span').each(function(){$(this.childNodes).insertBefore(this);}).remove();var $selection=context.$content.find(':not(.wikiEditor)');while($selection.length&&$selection.length>0){var $currentElement=$selection.eq(0);while(!$currentElement.parent().is('body')&&!$currentElement.parent().is('.wikiEditor')){$currentElement=$currentElement.parent();} |
461 | 461 | var text=$currentElement.text();if($currentElement.is('br')){$currentElement.addClass('wikiEditor');}else if($currentElement.is('span')&&text.length==0){$currentElement.remove();}else{$newElement=$('<p></p>').addClass('wikiEditor').insertAfter($currentElement);if(text.length){$newElement.text(text);}else{$newElement.append($('<br>').addClass('wikiEditor'));} |
462 | 462 | $currentElement.remove();} |
463 | 463 | $selection=context.$content.find(':not(.wikiEditor)');} |