mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
TinyMCE wpView: remove unused code, props avryl, see #28595
Built from https://develop.svn.wordpress.org/trunk@29182 git-svn-id: http://core.svn.wordpress.org/trunk@28966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f2adf04025
commit
5f54195855
@ -266,22 +266,6 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
selection.collapse( true );
|
||||
});
|
||||
|
||||
// When the selection's content changes, scan any new content for matching views.
|
||||
// Runs on paste and on inserting nodes/html.
|
||||
editor.on( 'SetContent', function( e ) {
|
||||
if ( ! e.context ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var node = selection.getNode();
|
||||
|
||||
if ( ! node.innerHTML ) {
|
||||
return;
|
||||
}
|
||||
|
||||
node.innerHTML = wp.mce.views.toViews( node.innerHTML );
|
||||
});
|
||||
|
||||
editor.dom.bind( editor.getBody().parentNode, 'mousedown mouseup click', function( event ) {
|
||||
var view = getView( event.target ),
|
||||
deselectEventType;
|
||||
@ -327,14 +311,9 @@ tinymce.PluginManager.add( 'wpview', function( editor ) {
|
||||
});
|
||||
|
||||
editor.on( 'PreProcess', function( event ) {
|
||||
// Replace the wpview node with the wpview string/shortcode?
|
||||
// Empty the wpview wrap nodes
|
||||
tinymce.each( editor.dom.select( 'div[data-wpview-text]', event.node ), function( node ) {
|
||||
// Empty the wrap node
|
||||
if ( 'textContent' in node ) {
|
||||
node.textContent = '\u00a0';
|
||||
} else {
|
||||
node.innerText = '\u00a0';
|
||||
}
|
||||
node.textContent = node.innerText = '\u00a0';
|
||||
});
|
||||
});
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user