PressThis: when the Text editor is the default, run the initial textarea content through pre_wpautop() to convert the paragraph tags. Fixes #29081.

git-svn-id: https://develop.svn.wordpress.org/trunk@29334 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-08-01 00:54:51 +00:00
parent 0ef495da6a
commit c3f712ac63
1 changed files with 8 additions and 0 deletions

View File

@ -439,6 +439,8 @@ var photostorage = false;
}
}
jQuery(document).ready(function($) {
var $contnet = $( '#content' );
// Resize screen.
window.resizeTo(760,580);
@ -460,6 +462,12 @@ var photostorage = false;
$('#tagsdiv-post_tag, #categorydiv').children('h3, .handlediv').click(function(){
$(this).siblings('.inside').toggle();
});
if ( $( '#wp-content-wrap' ).hasClass( 'html-active' ) && window.switchEditors &&
( tinyMCEPreInit.mceInit.content && tinyMCEPreInit.mceInit.content.wpautop ) ) {
// The Text editor is default, run the initial content through pre_wpautop() to convert the paragraphs
$contnet.text( window.switchEditors.pre_wpautop( $contnet.text() ) );
}
});
</script>
</head>