TinyMCE wpView: remove unused code, props avryl, see #28595

git-svn-id: https://develop.svn.wordpress.org/trunk@29182 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-07-15 23:38:33 +00:00
parent aa163fdee3
commit e7b7e3fa44
1 changed files with 2 additions and 23 deletions

View File

@ -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';
});
});