Make WordPress Core

Ticket #28242: 28242.patch

File 28242.patch, 2.7 KB (added by azaozz, 12 years ago)
  • src/wp-admin/js/editor.js

     
    6060                        if ( ed ) {
    6161                                ed.show();
    6262
    63                                 if ( editorHeight ) {
     63                                if ( ! tinymce.Env.iOS && editorHeight ) {
    6464                                        toolbarHeight = getToolbarHeight();
    6565                                        editorHeight = editorHeight - toolbarHeight + 14;
    6666
     
    8484                        }
    8585
    8686                        if ( ed ) {
    87                                 iframe = DOM.get( id + '_ifr' );
    88                                 editorHeight = iframe ? parseInt( iframe.style.height, 10 ) : 0;
     87                                if ( ! tinymce.Env.iOS ) {
     88                                        iframe = DOM.get( id + '_ifr' );
     89                                        editorHeight = iframe ? parseInt( iframe.style.height, 10 ) : 0;
    8990
    90                                 if ( editorHeight ) {
    91                                         toolbarHeight = getToolbarHeight();
    92                                         editorHeight = editorHeight + toolbarHeight - 14;
     91                                        if ( editorHeight ) {
     92                                                toolbarHeight = getToolbarHeight();
     93                                                editorHeight = editorHeight + toolbarHeight - 14;
    9394
    94                                         // height cannot be under 50 or over 5000
    95                                         if ( editorHeight > 50 && editorHeight < 5000 ) {
    96                                                 txtarea_el.style.height = editorHeight + 'px';
     95                                                // height cannot be under 50 or over 5000
     96                                                if ( editorHeight > 50 && editorHeight < 5000 ) {
     97                                                        txtarea_el.style.height = editorHeight + 'px';
     98                                                }
    9799                                        }
    98100                                }
    99101
  • src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

     
    292292                        }
    293293                }
    294294
     295                if ( tinymce.Env.iOS ) {
     296                        bodyClass.push('ios');
     297                }
     298
    295299                bodyClass.push('wp-editor');
    296300
    297301                tinymce.each( bodyClass, function( cls ) {
     
    358362        editor.on( 'preInit', function() {
    359363                // Don't replace <i> with <em> and <b> with <strong> and don't remove them when empty
    360364                editor.schema.addValidElements( '@[id|accesskey|class|dir|lang|style|tabindex|title|contenteditable|draggable|dropzone|hidden|spellcheck|translate],i,b' );
     365
     366                if ( tinymce.Env.iOS ) {
     367                        editor.settings.height = 300;
     368                }
    361369        });
    362370
    363371        // Add custom shortcuts
  • src/wp-includes/js/tinymce/skins/wordpress/wp-content.css

     
    11/* Additional default styles for the editor */
     2
     3html {
     4        height: 100%;
     5}
     6
     7body#tinymce.ios {
     8        height: 200%;
     9        max-width: none;
     10}
     11
    212body {
    313        font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
    414        font-size: 13px;