- function resetViews( rootNode ) {
- // Replace view nodes
- $( 'div[data-wpview-text]', rootNode ).each( function( i, node ) {
- var $node = $( node ),
- text = window.decodeURIComponent( $node.attr( 'data-wpview-text' ) || '' );
-
- if ( text && node.parentNode ) {
- $node.replaceWith( $( editor.dom.create('p') ).text( text ) );
- }
+ // Empty the wpview wrap and marker nodes
+ function emptyViewNodes( rootNode ) {
+ $( 'div[data-wpview-text], p[data-wpview-marker]', rootNode ).each( function( i, node ) {
+ node.innerHTML = '.';