Make WordPress Core

Ticket #28037: 28037.patch

File 28037.patch, 829 bytes (added by azaozz, 11 years ago)
  • src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

     
    356356        });
    357357
    358358        editor.on( 'preInit', function() {
     359                var element;
     360
     361                if ( tinymce.Env.webkit && editor.getParam( 'wpautop', true ) ) {
     362                        element = editor.getElement();
     363
     364                        if ( element.nodeName === 'TEXTAREA' ) {
     365                                element.value = element.textContent;
     366                        }
     367                }
     368
    359369                // Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty
    360370                editor.schema.addValidElements( '@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b' );
    361371        });