TinyMCE wpViews: use the real attribute value instead of the cached jQuery data. Fixes updating of the wpView text strings.
Props iseulde. Fixes #31601. git-svn-id: https://develop.svn.wordpress.org/trunk@31731 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
82ac76c0a7
commit
976e548ef7
|
@ -181,7 +181,7 @@ window.wp = window.wp || {};
|
||||||
return instances[ encodeURIComponent( object ) ];
|
return instances[ encodeURIComponent( object ) ];
|
||||||
}
|
}
|
||||||
|
|
||||||
return instances[ $( object ).data( 'wpview-text' ) ];
|
return instances[ $( object ).attr( 'data-wpview-text' ) ];
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -192,7 +192,7 @@ window.wp = window.wp || {};
|
||||||
* @return {String} The textual representation of the view.
|
* @return {String} The textual representation of the view.
|
||||||
*/
|
*/
|
||||||
getText: function( node ) {
|
getText: function( node ) {
|
||||||
return decodeURIComponent( $( node ).data( 'wpview-text' ) || '' );
|
return decodeURIComponent( $( node ).attr( 'data-wpview-text' ) || '' );
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue