<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[22007] trunk: Main editor: maintain the height when switching Visual to Text and back, save the height when resizing as user state, output the height in the textarea tag when loading, (thanks @nacin for the help), fixes #21718</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/22007">22007</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2012-09-26 03:30:21 +0000 (Wed, 26 Sep 2012)</dd>
</dl>
<h3>Log Message</h3>
<pre>Main editor: maintain the height when switching Visual to Text and back, save the height when resizing as user state, output the height in the textarea tag when loading, (thanks @nacin for the help), fixes <a href="http://core.trac.wordpress.org/ticket/21718">#21718</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincsswpadmincss">trunk/wp-admin/css/wp-admin.css</a></li>
<li><a href="#trunkwpadmineditformadvancedphp">trunk/wp-admin/edit-form-advanced.php</a></li>
<li><a href="#trunkwpadminjseditorjs">trunk/wp-admin/js/editor.js</a></li>
<li><a href="#trunkwpadminjspostjs">trunk/wp-admin/js/post.js</a></li>
<li><a href="#trunkwpadminpressthisphp">trunk/wp-admin/press-this.php</a></li>
<li><a href="#trunkwpincludesclasswpeditorphp">trunk/wp-includes/class-wp-editor.php</a></li>
<li><a href="#trunkwpincludescsseditorcss">trunk/wp-includes/css/editor.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincsswpadmincss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.css (22006 => 22007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.css        2012-09-26 03:17:28 UTC (rev 22006)
+++ trunk/wp-admin/css/wp-admin.css        2012-09-26 03:30:21 UTC (rev 22007)
</span><span class="lines">@@ -3107,7 +3107,7 @@
</span><span class="cx">         background: transparent url(../images/resize.gif) no-repeat scroll right bottom;
</span><span class="cx">         width: 12px;
</span><span class="cx">         cursor: se-resize;
</span><del>-        margin: 0 2px;
</del><ins>+        margin: 0 1px;
</ins><span class="cx">         position: relative;
</span><span class="cx">         top: -2px;
</span><span class="cx"> }
</span><span class="lines">@@ -3116,6 +3116,23 @@
</span><span class="cx">         top: 20px;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#content-resize-handle {
+        background: transparent url(../images/resize.gif) no-repeat scroll right bottom;
+        width: 12px;
+        cursor: se-resize;
+        position: absolute;
+        right: 2px;
+        height: 19px;
+}
+
+.press-this #content-resize-handle {
+        bottom: 2px;
+}
+
+.tmce-active #content-resize-handle {
+        display: none;
+}
+
</ins><span class="cx"> #wp-word-count {
</span><span class="cx">         display: block;
</span><span class="cx">         padding: 2px 10px;
</span><span class="lines">@@ -4309,6 +4326,10 @@
</span><span class="cx">         box-shadow: none;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.comment-php .wp-editor-area {
+        height: 200px;
+}
+
</ins><span class="cx"> .comment-ays {
</span><span class="cx">         margin-bottom: 0;
</span><span class="cx">         border-style: solid;
</span><span class="lines">@@ -7320,6 +7341,7 @@
</span><span class="cx"> /* Editor/Main Column */
</span><span class="cx"> .press-this #poststuff {
</span><span class="cx">         margin: 0 10px 10px;
</span><ins>+        padding: 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #poststuff #editor-toolbar {
</span><span class="lines">@@ -7415,7 +7437,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .press-this #extra-fields .actions {
</span><del>-        margin: -25px -7px 0 0;
</del><ins>+        margin: -32px -7px 0 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .press-this .actions li {
</span><span class="lines">@@ -7515,7 +7537,7 @@
</span><span class="cx">         margin: 5px 0;
</span><span class="cx">         padding: 0 5px;
</span><span class="cx">         border: 0 none;
</span><del>-        height: 357px;
</del><ins>+        height: 345px;
</ins><span class="cx">         font-family: Consolas, Monaco, monospace;
</span><span class="cx">         font-size: 13px;
</span><span class="cx">         line-height: 19px;
</span></span></pre></div>
<a id="trunkwpadmineditformadvancedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-form-advanced.php (22006 => 22007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-form-advanced.php        2012-09-26 03:17:28 UTC (rev 22006)
+++ trunk/wp-admin/edit-form-advanced.php        2012-09-26 03:30:21 UTC (rev 22007)
</span><span class="lines">@@ -347,7 +347,7 @@
</span><span class="cx"> ?>
</span><span class="cx"> <div id="postdivrich" class="postarea">
</span><span class="cx">
</span><del>-<?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabfocus_elements' => 'sample-permalink,post-preview') ); ?>
</del><ins>+<?php wp_editor($post->post_content, 'content', array('dfw' => true, 'tabfocus_elements' => 'sample-permalink,post-preview', 'editor_height' => 360) ); ?>
</ins><span class="cx">
</span><span class="cx"> <table id="post-status-info" cellspacing="0"><tbody><tr>
</span><span class="cx">         <td id="wp-word-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></td>
</span></span></pre></div>
<a id="trunkwpadminjseditorjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/editor.js (22006 => 22007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/editor.js        2012-09-26 03:17:28 UTC (rev 22006)
+++ trunk/wp-admin/js/editor.js        2012-09-26 03:30:21 UTC (rev 22007)
</span><span class="lines">@@ -49,10 +49,8 @@
</span><span class="cx">                         if ( ed && ed.isHidden() )
</span><span class="cx">                                 return false;
</span><span class="cx">
</span><del>-                        if ( ed ) {
-                                txtarea_el.style.height = ed.getContentAreaContainer().offsetHeight + 20 + 'px';
</del><ins>+                        if ( ed )
</ins><span class="cx">                                 ed.hide();
</span><del>-                        }
</del><span class="cx">
</span><span class="cx">                         dom.removeClass(wrap_id, 'tmce-active');
</span><span class="cx">                         dom.addClass(wrap_id, 'html-active');
</span></span></pre></div>
<a id="trunkwpadminjspostjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/post.js (22006 => 22007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/post.js        2012-09-26 03:17:28 UTC (rev 22006)
+++ trunk/wp-admin/js/post.js        2012-09-26 03:30:21 UTC (rev 22007)
</span><span class="lines">@@ -667,4 +667,83 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         wptitlehint();
</span><ins>+
+        // resizable textarea#content
+        (function() {
+                var textarea = $('textarea#content'), offset = null, el;
+
+                function dragging(e) {
+                        textarea.height( Math.max(50, offset + e.pageY) + 'px' );
+                        return false;
+                }
+
+                function endDrag(e) {
+                        var height = $('#wp-content-editor-container').height();
+
+                        textarea.focus();
+                        $(document).unbind('mousemove', dragging).unbind('mouseup', endDrag);
+
+                        if ( height > 83 ) {
+                                height -= 33; // compensate for toolbars, padding...
+                                setUserSetting( 'ed_size', height );
+                        }
+                }
+
+                textarea.css('resize', 'none');
+                el = $('<div id="content-resize-handle"><br></div>');
+                $('#wp-content-wrap').append(el);
+                el.on('mousedown', function(e) {
+                        offset = textarea.height() - e.pageY;
+                        textarea.blur();
+                        $(document).mousemove(dragging).mouseup(endDrag);
+                        return false;
+                });
+        })();
+
+        tinymce.onAddEditor.add(function(mce, ed){
+                if ( ed.id != 'content' )
+                        return;
+
+                // resize TinyMCE to match the textarea height when switching Text -> Visual
+                ed.onLoadContent.add( function(ed, o) {
+                        var ifr_height, height = parseInt( $('#content').css('height'), 10 ),
+                                tb_height = $('#content_tbl tr.mceFirst').height();
+
+                        if ( height && !isNaN(height) && tb_height ) {
+                                ifr_height = (height - tb_height) + 12; // compensate for padding in the textarea
+
+                                $('#content_tbl').css('height', '' );
+                                $('#content_ifr').css('height', ifr_height + 'px' );
+                                setUserSetting( 'ed_size', height );
+                        }
+                });
+
+                // resize the textarea to match TinyMCE's height when switching Visual -> Text
+                ed.onSaveContent.add( function(ed, o) {
+                        var height = $('#content_tbl').height();
+
+                        if ( height && height > 83 ) {
+                                height -= 33;
+
+                                $('#content').css( 'height', height + 'px' );
+                                setUserSetting( 'ed_size', height );
+                        }
+                });
+
+                // save on resizing TinyMCE
+                ed.onPostRender.add(function() {
+                        $('#content_resize').on('mousedown.wp-mce-resize', function(e){
+                                $(document).on('mouseup.wp-mce-resize', function(e){
+                                        var height = $('#wp-content-editor-container').height();
+
+                                        height -= 33;
+                                        if ( height > 50 && height != getUserSetting( 'ed_size' ) )
+                                                setUserSetting( 'ed_size', height );
+
+                                        $(document).off('mouseup.wp-mce-resize');
+                                });
+                        });
+                });
+        });
+
</ins><span class="cx"> });
</span></span></pre></div>
<a id="trunkwpadminpressthisphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/press-this.php (22006 => 22007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/press-this.php        2012-09-26 03:17:28 UTC (rev 22006)
+++ trunk/wp-admin/press-this.php        2012-09-26 03:30:21 UTC (rev 22007)
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx">                         return false;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                jQuery('#extra-fields').html('<div class="postbox"><h2><?php _e( 'Add Photos' ); ?> <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');
</del><ins>+                jQuery('#extra-fields').html('<div class="postbox"><h2><?php _e( 'Add Photos' ); ?> <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="button button-small"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');
</ins><span class="cx">                 jQuery('#img_container').html(strtoappend);
</span><span class="cx">                 <?php break;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpincludesclasswpeditorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-editor.php (22006 => 22007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-editor.php        2012-09-26 03:17:28 UTC (rev 22006)
+++ trunk/wp-includes/class-wp-editor.php        2012-09-26 03:30:21 UTC (rev 22007)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">                         'wpautop' => true, // use wpautop?
</span><span class="cx">                         'media_buttons' => true, // show insert/upload button(s)
</span><span class="cx">                         'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here
</span><del>-                        'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
</del><ins>+                        'textarea_rows' => 20,
</ins><span class="cx">                         'tabindex' => '',
</span><span class="cx">                         'tabfocus_elements' => ':prev,:next', // the previous and next element ID to move the focus to when pressing the Tab key in TinyMCE
</span><span class="cx">                         'editor_css' => '', // intended for extra styles for both visual and Text editors buttons, needs to include the <style> tags, can use "scoped".
</span><span class="lines">@@ -52,6 +52,26 @@
</span><span class="cx">                 if ( self::$this_quicktags )
</span><span class="cx">                         self::$has_quicktags = true;
</span><span class="cx">
</span><ins>+                if ( empty( $set['editor_height'] ) )
+                        return $set;
+
+                if ( 'content' === $editor_id ) {
+                        // A cookie (set when a user resizes the editor) overrides the height.
+                        $cookie = (int) get_user_setting( 'ed_size' );
+
+                        // Upgrade an old TinyMCE cookie if it is still around, and the new one isn't.
+                        if ( ! $cookie && isset( $_COOKIE['TinyMCE_content_size'] ) ) {
+                                parse_str( $_COOKIE['TinyMCE_content_size'], $cookie );
+                                 $cookie = $cookie['ch'];
+                        }
+
+                        if ( $cookie )
+                                $set['editor_height'] = $cookie;
+                }
+
+                if ( $set['editor_height'] < 50 )
+                        $set['editor_height'] = 50;
+
</ins><span class="cx">                 return $set;
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -67,10 +87,14 @@
</span><span class="cx">                 $set = self::parse_settings($editor_id, $settings);
</span><span class="cx">                 $editor_class = ' class="' . trim( $set['editor_class'] . ' wp-editor-area' ) . '"';
</span><span class="cx">                 $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
</span><del>-                $rows = ' rows="' . (int) $set['textarea_rows'] . '"';
</del><span class="cx">                 $switch_class = 'html-active';
</span><span class="cx">                 $toolbar = $buttons = '';
</span><span class="cx">
</span><ins>+                if ( ! empty( $set['editor_height'] ) )
+                        $height = ' style="height: ' . $set['editor_height'] . 'px"';
+                else
+                        $height = ' rows="' . $set['textarea_rows'] . '"';
+
</ins><span class="cx">                 if ( !current_user_can( 'upload_files' ) )
</span><span class="cx">                         $set['media_buttons'] = false;
</span><span class="cx">
</span><span class="lines">@@ -116,7 +140,7 @@
</span><span class="cx">                         echo "</div>\n";
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                $the_editor = apply_filters('the_editor', '<div id="wp-' . $editor_id . '-editor-container" class="wp-editor-container"><textarea' . $editor_class . $rows . $tabindex . ' cols="40" name="' . $set['textarea_name'] . '" id="' . $editor_id . '">%s</textarea></div>');
</del><ins>+                $the_editor = apply_filters('the_editor', '<div id="wp-' . $editor_id . '-editor-container" class="wp-editor-container"><textarea' . $editor_class . $height . $tabindex . ' cols="40" name="' . $set['textarea_name'] . '" id="' . $editor_id . '">%s</textarea></div>');
</ins><span class="cx">                 $content = apply_filters('the_editor_content', $content);
</span><span class="cx">
</span><span class="cx">                 printf($the_editor, $content);
</span><span class="lines">@@ -403,6 +427,9 @@
</span><span class="cx">                                 'body_class' => $body_class
</span><span class="cx">                         );
</span><span class="cx">
</span><ins>+                        // The main editor doesn't use the TinyMCE resizing cookie.
+                        $mceInit['theme_advanced_resizing_use_cookie'] = 'content' !== $editor_id || empty( $set['editor_height'] );
+
</ins><span class="cx">                         if ( $first_run )
</span><span class="cx">                                 $mceInit = array_merge(self::$first_init, $mceInit);
</span><span class="cx">
</span><span class="lines">@@ -550,16 +577,26 @@
</span><span class="cx">                         else
</span><span class="cx">                                 echo "<script type='text/javascript' src='{$baseurl}/langs/wp-langs-en.js?$version'></script>\n";
</span><span class="cx">                 }
</span><ins>+
+                $mce = ( self::$has_tinymce && wp_default_editor() == 'tinymce' ) || ! self::$has_quicktags;
</ins><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx">         <script type="text/javascript">
</span><ins>+                var wpActiveEditor;
+
</ins><span class="cx">                 (function(){
</span><del>-                        var init, ed, qt, first_init, mce = <?php echo wp_default_editor() == 'tinymce' ? 'true' : 'false'; ?>;
</del><ins>+                        var init, ed, qt, first_init, DOM, el, i, mce = <?php echo (int) $mce; ?>;
</ins><span class="cx">
</span><span class="cx">                         if ( typeof(tinymce) == 'object' ) {
</span><ins>+                                DOM = tinymce.DOM;
</ins><span class="cx">                                 // mark wp_theme/ui.css as loaded
</span><del>-                                tinymce.DOM.files[tinymce.baseURI.getURI() + '/themes/advanced/skins/wp_theme/ui.css'] = true;
</del><ins>+                                DOM.files[tinymce.baseURI.getURI() + '/themes/advanced/skins/wp_theme/ui.css'] = true;
</ins><span class="cx">
</span><ins>+                                DOM.events.add( DOM.select('.wp-editor-wrap'), 'mousedown', function(e){
+                                        if ( this.id )
+                                                wpActiveEditor = this.id.slice(3, -5);
+                                });
+
</ins><span class="cx">                                 for ( ed in tinyMCEPreInit.mceInit ) {
</span><span class="cx">                                         if ( first_init ) {
</span><span class="cx">                                                 init = tinyMCEPreInit.mceInit[ed] = tinymce.extend( {}, first_init, tinyMCEPreInit.mceInit[ed] );
</span><span class="lines">@@ -570,6 +607,12 @@
</span><span class="cx">                                         if ( mce )
</span><span class="cx">                                                 try { tinymce.init(init); } catch(e){}
</span><span class="cx">                                 }
</span><ins>+                        } else {
+                                el = document.getElementsByClassName('wp-editor-wrap');
+                                for ( i in el ) {
+                                        if ( typeof(el[i]) == 'object' )
+                                                el[i].onmousedown = function(){ wpActiveEditor = this.id.slice(3, -5); }
+                                }
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         if ( typeof(QTags) == 'function' ) {
</span><span class="lines">@@ -578,30 +621,24 @@
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 })();
</span><ins>+                <?php
</ins><span class="cx">
</span><del>-                var wpActiveEditor;
-
-                jQuery('.wp-editor-wrap').mousedown(function(e){
-                        wpActiveEditor = this.id.slice(3, -5);
-                });
-
-<?php
-
</del><span class="cx">                 if ( self::$ext_plugins )
</span><span class="cx">                         echo self::$ext_plugins . "\n";
</span><span class="cx">
</span><span class="cx">                 if ( ! $compressed && $tmce_on ) {
</span><del>-?>
-                (function(){var t=tinyMCEPreInit,sl=tinymce.ScriptLoader,ln=t.ref.language,th=t.ref.theme,pl=t.ref.plugins;sl.markDone(t.base+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'_dlg.js');sl.markDone(t.base+'/themes/advanced/skins/wp_theme/ui.css');tinymce.each(pl.split(','),function(n){if(n&&n.charAt(0)!='-'){sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'.js');sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'_dlg.js');}});})();
-<?php
</del><ins>+                        ?>
+                        (function(){var t=tinyMCEPreInit,sl=tinymce.ScriptLoader,ln=t.ref.language,th=t.ref.theme,pl=t.ref.plugins;sl.markDone(t.base+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'_dlg.js');sl.markDone(t.base+'/themes/advanced/skins/wp_theme/ui.css');tinymce.each(pl.split(','),function(n){if(n&&n.charAt(0)!='-'){sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'.js');sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'_dlg.js');}});})();
+                        <?php
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if ( !is_admin() )
</span><span class="cx">                         echo 'var ajaxurl = "' . admin_url( 'admin-ajax.php', 'relative' ) . '";';
</span><del>-?>
-        </script>
-<?php
</del><span class="cx">
</span><ins>+                ?>
+                </script>
+                <?php
+
</ins><span class="cx">                 if ( in_array('wplink', self::$plugins, true) || in_array('link', self::$qt_buttons, true) )
</span><span class="cx">                         self::wp_link_dialog();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludescsseditorcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/editor.css (22006 => 22007)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/editor.css        2012-09-26 03:17:28 UTC (rev 22006)
+++ trunk/wp-includes/css/editor.css        2012-09-26 03:30:21 UTC (rev 22007)
</span><span class="lines">@@ -1018,12 +1018,18 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* WP specific */
</span><ins>+.wp-editor-wrap {
+        position: relative;
+}
+
</ins><span class="cx"> .wp-editor-area {
</span><span class="cx">         font-family: Consolas, Monaco, monospace;
</span><span class="cx">         padding: 10px;
</span><ins>+        margin: 1px 0 0;
</ins><span class="cx">         line-height: 150%;
</span><span class="cx">         border: 0 none;
</span><span class="cx">         outline: none;
</span><ins>+        display: block;
</ins><span class="cx">         resize: vertical;
</span><span class="cx">         -moz-box-sizing: border-box;
</span><span class="cx">         -webkit-box-sizing: border-box;
</span></span></pre>
</div>
</div>
</body>
</html>