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:
Andrew Ozz 2015-03-11 22:39:29 +00:00
parent 82ac76c0a7
commit 976e548ef7
1 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ window.wp = window.wp || {};
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.
*/
getText: function( node ) {
return decodeURIComponent( $( node ).data( 'wpview-text' ) || '' );
return decodeURIComponent( $( node ).attr( 'data-wpview-text' ) || '' );
},
/**