TinyMCE wpView: update the "update" method. Props iseulde. See #31412.
git-svn-id: https://develop.svn.wordpress.org/trunk@31586 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dc6246a548
commit
eb28f78cd3
|
@ -648,9 +648,17 @@ window.wp = window.wp || {};
|
|||
* @param {HTMLElement} node The view node to update.
|
||||
*/
|
||||
update: function( text, editor, node ) {
|
||||
$( node ).data( 'rendered', false );
|
||||
editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
|
||||
wp.mce.views.createInstance( this.type, text, this.match( text ).options ).render();
|
||||
_.find( views, function( view, type ) {
|
||||
var match = view.prototype.match( text );
|
||||
|
||||
if ( match ) {
|
||||
$( node ).data( 'rendered', false );
|
||||
editor.dom.setAttrib( node, 'data-wpview-text', encodeURIComponent( text ) );
|
||||
wp.mce.views.createInstance( type, text, match.options ).render();
|
||||
|
||||
return true;
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue