WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/01/2014 12:54:51 AM (7 years ago)
Author:
azaozz
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/press-this.php

    r29206 r29334  
    440440    }
    441441    jQuery(document).ready(function($) {
     442        var $contnet = $( '#content' );
     443
    442444        // Resize screen.
    443445        window.resizeTo(760,580);
     
    461463            $(this).siblings('.inside').toggle();
    462464        });
     465
     466        if ( $( '#wp-content-wrap' ).hasClass( 'html-active' ) && window.switchEditors &&
     467            ( tinyMCEPreInit.mceInit.content && tinyMCEPreInit.mceInit.content.wpautop ) ) {
     468            // The Text editor is default, run the initial content through pre_wpautop() to convert the paragraphs
     469            $contnet.text( window.switchEditors.pre_wpautop( $contnet.text() ) );
     470        }
    463471    });
    464472</script>
Note: See TracChangeset for help on using the changeset viewer.