<!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>[19945] trunk/wp-includes: Load TinyMCE's non-minified &quot;*src.js&quot; plugin files when SCRIPT_DEBUG is defined, part props ericlewis, fixes #20055</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/19945">19945</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2012-02-18 06:43:47 +0000 (Sat, 18 Feb 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Load TinyMCE's non-minified &quot;*src.js&quot; plugin files when SCRIPT_DEBUG is defined, part props ericlewis, fixes <a href="http://core.trac.wordpress.org/ticket/20055">#20055</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesclasswpeditorphp">trunk/wp-includes/class-wp-editor.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkwpincludesjstinymcemark_loaded_srcjs">trunk/wp-includes/js/tinymce/mark_loaded_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginsdirectionalityeditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginsfullscreeneditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginsinlinepopupseditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginsmediaeditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginspasteeditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginsspellcheckereditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginstabfocuseditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswordpresseditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpdialogseditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpeditimageeditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpfullscreeneditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpgalleryeditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswplinkeditor_plugin_srcjs">trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js</a></li>
<li><a href="#trunkwpincludesjstinymcethemesadvancededitor_template_srcjs">trunk/wp-includes/js/tinymce/themes/advanced/editor_template_src.js</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpincludesjstinymcepluginswordpresseditor_plugindevjs">trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpdialogseditor_plugindevjs">trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpeditimageeditor_plugindevjs">trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpfullscreeneditor_plugindevjs">trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswpgalleryeditor_plugindevjs">trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js</a></li>
<li><a href="#trunkwpincludesjstinymcepluginswplinkeditor_plugindevjs">trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesclasswpeditorphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-editor.php (19944 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-editor.php        2012-02-17 23:40:02 UTC (rev 19944)
+++ trunk/wp-includes/class-wp-editor.php        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -517,13 +517,15 @@
</span><span class="cx">                         'language' =&gt; self::$mce_locale
</span><span class="cx">                 );
</span><span class="cx"> 
</span><ins>+                $suffix = ( defined('SCRIPT_DEBUG') &amp;&amp; SCRIPT_DEBUG ) ? '_src' : '';
+
</ins><span class="cx">                 do_action('before_wp_tiny_mce', self::$mce_settings);
</span><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;script type=&quot;text/javascript&quot;&gt;
</span><span class="cx">                 tinyMCEPreInit = {
</span><span class="cx">                         base : &quot;&lt;?php echo self::$baseurl; ?&gt;&quot;,
</span><del>-                        suffix : &quot;&quot;,
</del><ins>+                        suffix : &quot;&lt;?php echo $suffix; ?&gt;&quot;,
</ins><span class="cx">                         query : &quot;&lt;?php echo $version; ?&gt;&quot;,
</span><span class="cx">                         mceInit : &lt;?php echo $mceInit; ?&gt;,
</span><span class="cx">                         qtInit : &lt;?php echo $qtInit; ?&gt;,
</span></span></pre></div>
<a id="trunkwpincludesjstinymcemark_loaded_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/mark_loaded_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/mark_loaded_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/mark_loaded_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+(function(){
+        if ( 'undefined' == tinyMCEPreInit )
+                return;
+
+        var baseurl = tinyMCEPreInit.base, sl = tinymce.ScriptLoader, lang = tinyMCEPreInit.ref.language,
+                theme = tinyMCEPreInit.ref.theme, plugins = tinyMCEPreInit.ref.plugins, suffix = tinyMCEPreInit.suffix;
+
+        sl.markDone( baseurl+'/langs/'+lang+'.js' );
+        sl.markDone( baseurl+'/themes/'+theme+'/editor_template'+suffix+'.js' );
+        sl.markDone( baseurl+'/themes/'+theme+'/langs/'+lang+'.js' );
+        sl.markDone( baseurl+'/themes/'+theme+'/langs/'+lang+'_dlg.js' );
+
+        tinymce.each( plugins.split(','), function(plugin){
+                if ( plugin &amp;&amp; plugin.charAt(0) != '-' ) {
+                        sl.markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' );
+                        sl.markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' );
+                        sl.markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' )
+                }
+        });
+})();
</ins><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/mark_loaded_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwpincludesjstinymcepluginsdirectionalityeditor_plugin_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+        tinymce.create('tinymce.plugins.Directionality', {
+                init : function(ed, url) {
+                        var t = this;
+
+                        t.editor = ed;
+
+                        ed.addCommand('mceDirectionLTR', function() {
+                                var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
+
+                                if (e) {
+                                        if (ed.dom.getAttrib(e, &quot;dir&quot;) != &quot;ltr&quot;)
+                                                ed.dom.setAttrib(e, &quot;dir&quot;, &quot;ltr&quot;);
+                                        else
+                                                ed.dom.setAttrib(e, &quot;dir&quot;, &quot;&quot;);
+                                }
+
+                                ed.nodeChanged();
+                        });
+
+                        ed.addCommand('mceDirectionRTL', function() {
+                                var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
+
+                                if (e) {
+                                        if (ed.dom.getAttrib(e, &quot;dir&quot;) != &quot;rtl&quot;)
+                                                ed.dom.setAttrib(e, &quot;dir&quot;, &quot;rtl&quot;);
+                                        else
+                                                ed.dom.setAttrib(e, &quot;dir&quot;, &quot;&quot;);
+                                }
+
+                                ed.nodeChanged();
+                        });
+
+                        ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
+                        ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
+
+                        ed.onNodeChange.add(t._nodeChange, t);
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'Directionality',
+                                author : 'Moxiecode Systems AB',
+                                authorurl : 'http://tinymce.moxiecode.com',
+                                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
+                                version : tinymce.majorVersion + &quot;.&quot; + tinymce.minorVersion
+                        };
+                },
+
+                // Private methods
+
+                _nodeChange : function(ed, cm, n) {
+                        var dom = ed.dom, dir;
+
+                        n = dom.getParent(n, dom.isBlock);
+                        if (!n) {
+                                cm.setDisabled('ltr', 1);
+                                cm.setDisabled('rtl', 1);
+                                return;
+                        }
+
+                        dir = dom.getAttrib(n, 'dir');
+                        cm.setActive('ltr', dir == &quot;ltr&quot;);
+                        cm.setDisabled('ltr', 0);
+                        cm.setActive('rtl', dir == &quot;rtl&quot;);
+                        cm.setDisabled('rtl', 0);
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
+})();
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwpincludesjstinymcepluginsfullscreeneditor_plugin_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,159 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+        var DOM = tinymce.DOM;
+
+        tinymce.create('tinymce.plugins.FullScreenPlugin', {
+                init : function(ed, url) {
+                        var t = this, s = {}, vp, posCss;
+
+                        t.editor = ed;
+
+                        // Register commands
+                        ed.addCommand('mceFullScreen', function() {
+                                var win, de = DOM.doc.documentElement;
+
+                                if (ed.getParam('fullscreen_is_enabled')) {
+                                        if (ed.getParam('fullscreen_new_window'))
+                                                closeFullscreen(); // Call to close in new window
+                                        else {
+                                                DOM.win.setTimeout(function() {
+                                                        tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
+                                                        tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
+                                                        tinyMCE.remove(ed);
+                                                        DOM.remove('mce_fullscreen_container');
+                                                        de.style.overflow = ed.getParam('fullscreen_html_overflow');
+                                                        DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
+                                                        DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
+                                                        tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
+                                                }, 10);
+                                        }
+
+                                        return;
+                                }
+
+                                if (ed.getParam('fullscreen_new_window')) {
+                                        win = DOM.win.open(url + &quot;/fullscreen.htm&quot;, &quot;mceFullScreenPopup&quot;, &quot;fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=&quot; + screen.availWidth + &quot;,height=&quot; + screen.availHeight);
+                                        try {
+                                                win.resizeTo(screen.availWidth, screen.availHeight);
+                                        } catch (e) {
+                                                // Ignore
+                                        }
+                                } else {
+                                        tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
+                                        s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
+                                        s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
+                                        vp = DOM.getViewPort();
+                                        s.fullscreen_scrollx = vp.x;
+                                        s.fullscreen_scrolly = vp.y;
+
+                                        // Fixes an Opera bug where the scrollbars doesn't reappear
+                                        if (tinymce.isOpera &amp;&amp; s.fullscreen_overflow == 'visible')
+                                                s.fullscreen_overflow = 'auto';
+
+                                        // Fixes an IE bug where horizontal scrollbars would appear
+                                        if (tinymce.isIE &amp;&amp; s.fullscreen_overflow == 'scroll')
+                                                s.fullscreen_overflow = 'auto';
+
+                                        // Fixes an IE bug where the scrollbars doesn't reappear
+                                        if (tinymce.isIE &amp;&amp; (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
+                                                s.fullscreen_html_overflow = 'auto'; 
+
+                                        if (s.fullscreen_overflow == '0px')
+                                                s.fullscreen_overflow = '';
+
+                                        DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
+                                        de.style.overflow = 'hidden'; //Fix for IE6/7
+                                        vp = DOM.getViewPort();
+                                        DOM.win.scrollTo(0, 0);
+
+                                        if (tinymce.isIE)
+                                                vp.h -= 1;
+
+                                        // Use fixed position if it exists
+                                        if (tinymce.isIE6)
+                                                posCss = 'absolute;top:' + vp.y;
+                                        else
+                                                posCss = 'fixed;top:0';
+
+                                        n = DOM.add(DOM.doc.body, 'div', {
+                                                id : 'mce_fullscreen_container', 
+                                                style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
+                                        DOM.add(n, 'div', {id : 'mce_fullscreen'});
+
+                                        tinymce.each(ed.settings, function(v, n) {
+                                                s[n] = v;
+                                        });
+
+                                        s.id = 'mce_fullscreen';
+                                        s.width = n.clientWidth;
+                                        s.height = n.clientHeight - 15;
+                                        s.fullscreen_is_enabled = true;
+                                        s.fullscreen_editor_id = ed.id;
+                                        s.theme_advanced_resizing = false;
+                                        s.save_onsavecallback = function() {
+                                                ed.setContent(tinyMCE.get(s.id).getContent());
+                                                ed.execCommand('mceSave');
+                                        };
+
+                                        tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
+                                                s[k] = v;
+                                        });
+
+                                        if (s.theme_advanced_toolbar_location === 'external')
+                                                s.theme_advanced_toolbar_location = 'top';
+
+                                        t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
+                                        t.fullscreenEditor.onInit.add(function() {
+                                                t.fullscreenEditor.setContent(ed.getContent());
+                                                t.fullscreenEditor.focus();
+                                        });
+
+                                        t.fullscreenEditor.render();
+
+                                        t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
+                                        t.fullscreenElement.update();
+                                        //document.body.overflow = 'hidden';
+
+                                        t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
+                                                var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
+
+                                                // Get outer/inner size to get a delta size that can be used to calc the new iframe size
+                                                outerSize = fed.dom.getSize(fed.getContainer().firstChild);
+                                                innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
+
+                                                fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
+                                        });
+                                }
+                        });
+
+                        // Register buttons
+                        ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
+
+                        ed.onNodeChange.add(function(ed, cm) {
+                                cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
+                        });
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'Fullscreen',
+                                author : 'Moxiecode Systems AB',
+                                authorurl : 'http://tinymce.moxiecode.com',
+                                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
+                                version : tinymce.majorVersion + &quot;.&quot; + tinymce.minorVersion
+                        };
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
+})();
</ins><span class="cx">\ No newline at end of file
</span><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwpincludesjstinymcepluginsinlinepopupseditor_plugin_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,699 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+        var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
+
+        tinymce.create('tinymce.plugins.InlinePopups', {
+                init : function(ed, url) {
+                        // Replace window manager
+                        ed.onBeforeRenderUI.add(function() {
+                                ed.windowManager = new tinymce.InlineWindowManager(ed);
+                                DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + &quot;/window.css&quot;);
+                        });
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'InlinePopups',
+                                author : 'Moxiecode Systems AB',
+                                authorurl : 'http://tinymce.moxiecode.com',
+                                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
+                                version : tinymce.majorVersion + &quot;.&quot; + tinymce.minorVersion
+                        };
+                }
+        });
+
+        tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
+                InlineWindowManager : function(ed) {
+                        var t = this;
+
+                        t.parent(ed);
+                        t.zIndex = 300000;
+                        t.count = 0;
+                        t.windows = {};
+                },
+
+                open : function(f, p) {
+                        var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
+
+                        f = f || {};
+                        p = p || {};
+
+                        // Run native windows
+                        if (!f.inline)
+                                return t.parent(f, p);
+
+                        parentWindow = t._frontWindow();
+                        if (parentWindow &amp;&amp; DOM.get(parentWindow.id + '_ifr')) {
+                                parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
+                        }
+                        
+                        // Only store selection if the type is a normal window
+                        if (!f.type)
+                                t.bookmark = ed.selection.getBookmark(1);
+
+                        id = DOM.uniqueId();
+                        vp = DOM.getViewPort();
+                        f.width = parseInt(f.width || 320);
+                        f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
+                        f.min_width = parseInt(f.min_width || 150);
+                        f.min_height = parseInt(f.min_height || 100);
+                        f.max_width = parseInt(f.max_width || 2000);
+                        f.max_height = parseInt(f.max_height || 2000);
+                        f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
+                        f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
+                        f.movable = f.resizable = true;
+                        p.mce_width = f.width;
+                        p.mce_height = f.height;
+                        p.mce_inline = true;
+                        p.mce_window_id = id;
+                        p.mce_auto_focus = f.auto_focus;
+
+                        // Transpose
+//                        po = DOM.getPos(ed.getContainer());
+//                        f.left -= po.x;
+//                        f.top -= po.y;
+
+                        t.features = f;
+                        t.params = p;
+                        t.onOpen.dispatch(t, f, p);
+
+                        if (f.type) {
+                                opt += ' mceModal';
+
+                                if (f.type)
+                                        opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
+
+                                f.resizable = false;
+                        }
+
+                        if (f.statusbar)
+                                opt += ' mceStatusbar';
+
+                        if (f.resizable)
+                                opt += ' mceResizable';
+
+                        if (f.minimizable)
+                                opt += ' mceMinimizable';
+
+                        if (f.maximizable)
+                                opt += ' mceMaximizable';
+
+                        if (f.movable)
+                                opt += ' mceMovable';
+
+                        // Create DOM objects
+                        t._addAll(DOM.doc.body, 
+                                ['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE &amp;&amp; window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'}, 
+                                        ['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
+                                                ['div', {id : id + '_top', 'class' : 'mceTop'}, 
+                                                        ['div', {'class' : 'mceLeft'}],
+                                                        ['div', {'class' : 'mceCenter'}],
+                                                        ['div', {'class' : 'mceRight'}],
+                                                        ['span', {id : id + '_title'}, f.title || '']
+                                                ],
+
+                                                ['div', {id : id + '_middle', 'class' : 'mceMiddle'}, 
+                                                        ['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
+                                                        ['span', {id : id + '_content'}],
+                                                        ['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
+                                                ],
+
+                                                ['div', {id : id + '_bottom', 'class' : 'mceBottom'},
+                                                        ['div', {'class' : 'mceLeft'}],
+                                                        ['div', {'class' : 'mceCenter'}],
+                                                        ['div', {'class' : 'mceRight'}],
+                                                        ['span', {id : id + '_status'}, 'Content']
+                                                ],
+
+                                                ['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
+                                                ['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
+                                                ['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
+                                                ['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
+                                                ['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
+                                                ['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
+                                                ['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
+                                                ['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
+                                                ['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
+                                                ['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
+                                                ['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
+                                                ['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
+                                                ['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
+                                        ]
+                                ]
+                        );
+
+                        DOM.setStyles(id, {top : -10000, left : -10000});
+
+                        // Fix gecko rendering bug, where the editors iframe messed with window contents
+                        if (tinymce.isGecko)
+                                DOM.setStyle(id, 'overflow', 'auto');
+
+                        // Measure borders
+                        if (!f.type) {
+                                dw += DOM.get(id + '_left').clientWidth;
+                                dw += DOM.get(id + '_right').clientWidth;
+                                dh += DOM.get(id + '_top').clientHeight;
+                                dh += DOM.get(id + '_bottom').clientHeight;
+                        }
+
+                        // Resize window
+                        DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
+
+                        u = f.url || f.file;
+                        if (u) {
+                                if (tinymce.relaxedDomain)
+                                        u += (u.indexOf('?') == -1 ? '?' : '&amp;') + 'mce_rdomain=' + tinymce.relaxedDomain;
+
+                                u = tinymce._addVer(u);
+                        }
+
+                        if (!f.type) {
+                                DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:&quot;&quot;', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
+                                DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
+                                DOM.setAttrib(id + '_ifr', 'src', u);
+                        } else {
+                                DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
+
+                                if (f.type == 'confirm')
+                                        DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
+
+                                DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
+                                DOM.setHTML(id + '_content', f.content.replace('\n', '&lt;br /&gt;'));
+                                
+                                Event.add(id, 'keyup', function(evt) {
+                                        var VK_ESCAPE = 27;
+                                        if (evt.keyCode === VK_ESCAPE) {
+                                                f.button_func(false);
+                                                return Event.cancel(evt);
+                                        }
+                                });
+
+                                Event.add(id, 'keydown', function(evt) {
+                                        var cancelButton, VK_TAB = 9;
+                                        if (evt.keyCode === VK_TAB) {
+                                                cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
+                                                if (cancelButton &amp;&amp; cancelButton !== evt.target) {
+                                                        cancelButton.focus();
+                                                } else {
+                                                        DOM.get(id + '_ok').focus();
+                                                }
+                                                return Event.cancel(evt);
+                                        }
+                                });
+                        }
+
+                        // Register events
+                        mdf = Event.add(id, 'mousedown', function(e) {
+                                var n = e.target, w, vp;
+
+                                w = t.windows[id];
+                                t.focus(id);
+
+                                if (n.nodeName == 'A' || n.nodeName == 'a') {
+                                        if (n.className == 'mceClose') {
+                                                t.close(null, id);
+                                                return Event.cancel(e);
+                                        } else if (n.className == 'mceMax') {
+                                                w.oldPos = w.element.getXY();
+                                                w.oldSize = w.element.getSize();
+
+                                                vp = DOM.getViewPort();
+
+                                                // Reduce viewport size to avoid scrollbars
+                                                vp.w -= 2;
+                                                vp.h -= 2;
+
+                                                w.element.moveTo(vp.x, vp.y);
+                                                w.element.resizeTo(vp.w, vp.h);
+                                                DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
+                                                DOM.addClass(id + '_wrapper', 'mceMaximized');
+                                        } else if (n.className == 'mceMed') {
+                                                // Reset to old size
+                                                w.element.moveTo(w.oldPos.x, w.oldPos.y);
+                                                w.element.resizeTo(w.oldSize.w, w.oldSize.h);
+                                                w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
+
+                                                DOM.removeClass(id + '_wrapper', 'mceMaximized');
+                                        } else if (n.className == 'mceMove')
+                                                return t._startDrag(id, e, n.className);
+                                        else if (DOM.hasClass(n, 'mceResize'))
+                                                return t._startDrag(id, e, n.className.substring(13));
+                                }
+                        });
+
+                        clf = Event.add(id, 'click', function(e) {
+                                var n = e.target;
+
+                                t.focus(id);
+
+                                if (n.nodeName == 'A' || n.nodeName == 'a') {
+                                        switch (n.className) {
+                                                case 'mceClose':
+                                                        t.close(null, id);
+                                                        return Event.cancel(e);
+
+                                                case 'mceButton mceOk':
+                                                case 'mceButton mceCancel':
+                                                        f.button_func(n.className == 'mceButton mceOk');
+                                                        return Event.cancel(e);
+                                        }
+                                }
+                        });
+                        
+                        // Make sure the tab order loops within the dialog.
+                        Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
+                                var iframe = DOM.get(id + '_ifr');
+                                if (iframe) {
+                                        var body = iframe.contentWindow.document.body;
+                                        var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
+                                        if (evt.target.id === (id + '_left')) {
+                                                focusable[focusable.length - 1].focus();
+                                        } else {
+                                                focusable[0].focus();
+                                        }
+                                } else {
+                                        DOM.get(id + '_ok').focus();
+                                }
+                        });
+                        
+                        // Add window
+                        w = t.windows[id] = {
+                                id : id,
+                                mousedown_func : mdf,
+                                click_func : clf,
+                                element : new Element(id, {blocker : 1, container : ed.getContainer()}),
+                                iframeElement : new Element(id + '_ifr'),
+                                features : f,
+                                deltaWidth : dw,
+                                deltaHeight : dh
+                        };
+
+                        w.iframeElement.on('focus', function() {
+                                t.focus(id);
+                        });
+
+                        // Setup blocker
+                        if (t.count == 0 &amp;&amp; t.editor.getParam('dialog_type', 'modal') == 'modal') {
+                                DOM.add(DOM.doc.body, 'div', {
+                                        id : 'mceModalBlocker',
+                                        'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
+                                        style : {zIndex : t.zIndex - 1}
+                                });
+
+                                DOM.show('mceModalBlocker'); // Reduces flicker in IE
+                                DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
+                        } else
+                                DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
+
+                        if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE &amp;&amp; !DOM.boxModel))
+                                DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
+
+                        DOM.setAttrib(id, 'aria-hidden', 'false');
+                        t.focus(id);
+                        t._fixIELayout(id, 1);
+
+                        // Focus ok button
+                        if (DOM.get(id + '_ok'))
+                                DOM.get(id + '_ok').focus();
+                        t.count++;
+
+                        return w;
+                },
+
+                focus : function(id) {
+                        var t = this, w;
+
+                        if (w = t.windows[id]) {
+                                w.zIndex = this.zIndex++;
+                                w.element.setStyle('zIndex', w.zIndex);
+                                w.element.update();
+
+                                id = id + '_wrapper';
+                                DOM.removeClass(t.lastId, 'mceFocus');
+                                DOM.addClass(id, 'mceFocus');
+                                t.lastId = id;
+                                
+                                if (w.focussedElement) {
+                                        w.focussedElement.focus();
+                                } else if (DOM.get(id + '_ok')) {
+                                        DOM.get(w.id + '_ok').focus();
+                                } else if (DOM.get(w.id + '_ifr')) {
+                                        DOM.get(w.id + '_ifr').focus();
+                                }
+                        }
+                },
+
+                _addAll : function(te, ne) {
+                        var i, n, t = this, dom = tinymce.DOM;
+
+                        if (is(ne, 'string'))
+                                te.appendChild(dom.doc.createTextNode(ne));
+                        else if (ne.length) {
+                                te = te.appendChild(dom.create(ne[0], ne[1]));
+
+                                for (i=2; i&lt;ne.length; i++)
+                                        t._addAll(te, ne[i]);
+                        }
+                },
+
+                _startDrag : function(id, se, ac) {
+                        var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
+
+                        // Get positons and sizes
+//                        cp = DOM.getPos(t.editor.getContainer());
+                        cp = {x : 0, y : 0};
+                        vp = DOM.getViewPort();
+
+                        // Reduce viewport size to avoid scrollbars while dragging
+                        vp.w -= 2;
+                        vp.h -= 2;
+
+                        sex = se.screenX;
+                        sey = se.screenY;
+                        dx = dy = dw = dh = 0;
+
+                        // Handle mouse up
+                        mu = Event.add(d, 'mouseup', function(e) {
+                                Event.remove(d, 'mouseup', mu);
+                                Event.remove(d, 'mousemove', mm);
+
+                                if (eb)
+                                        eb.remove();
+
+                                we.moveBy(dx, dy);
+                                we.resizeBy(dw, dh);
+                                sz = we.getSize();
+                                DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
+                                t._fixIELayout(id, 1);
+
+                                return Event.cancel(e);
+                        });
+
+                        if (ac != 'Move')
+                                startMove();
+
+                        function startMove() {
+                                if (eb)
+                                        return;
+
+                                t._fixIELayout(id, 0);
+
+                                // Setup event blocker
+                                DOM.add(d.body, 'div', {
+                                        id : 'mceEventBlocker',
+                                        'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
+                                        style : {zIndex : t.zIndex + 1}
+                                });
+
+                                if (tinymce.isIE6 || (tinymce.isIE &amp;&amp; !DOM.boxModel))
+                                        DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
+
+                                eb = new Element('mceEventBlocker');
+                                eb.update();
+
+                                // Setup placeholder
+                                p = we.getXY();
+                                sz = we.getSize();
+                                sx = cp.x + p.x - vp.x;
+                                sy = cp.y + p.y - vp.y;
+                                DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
+                                ph = new Element('mcePlaceHolder');
+                        };
+
+                        // Handle mouse move/drag
+                        mm = Event.add(d, 'mousemove', function(e) {
+                                var x, y, v;
+
+                                startMove();
+
+                                x = e.screenX - sex;
+                                y = e.screenY - sey;
+
+                                switch (ac) {
+                                        case 'ResizeW':
+                                                dx = x;
+                                                dw = 0 - x;
+                                                break;
+
+                                        case 'ResizeE':
+                                                dw = x;
+                                                break;
+
+                                        case 'ResizeN':
+                                        case 'ResizeNW':
+                                        case 'ResizeNE':
+                                                if (ac == &quot;ResizeNW&quot;) {
+                                                        dx = x;
+                                                        dw = 0 - x;
+                                                } else if (ac == &quot;ResizeNE&quot;)
+                                                        dw = x;
+
+                                                dy = y;
+                                                dh = 0 - y;
+                                                break;
+
+                                        case 'ResizeS':
+                                        case 'ResizeSW':
+                                        case 'ResizeSE':
+                                                if (ac == &quot;ResizeSW&quot;) {
+                                                        dx = x;
+                                                        dw = 0 - x;
+                                                } else if (ac == &quot;ResizeSE&quot;)
+                                                        dw = x;
+
+                                                dh = y;
+                                                break;
+
+                                        case 'mceMove':
+                                                dx = x;
+                                                dy = y;
+                                                break;
+                                }
+
+                                // Boundary check
+                                if (dw &lt; (v = w.features.min_width - sz.w)) {
+                                        if (dx !== 0)
+                                                dx += dw - v;
+
+                                        dw = v;
+                                }
+        
+                                if (dh &lt; (v = w.features.min_height - sz.h)) {
+                                        if (dy !== 0)
+                                                dy += dh - v;
+
+                                        dh = v;
+                                }
+
+                                dw = Math.min(dw, w.features.max_width - sz.w);
+                                dh = Math.min(dh, w.features.max_height - sz.h);
+                                dx = Math.max(dx, vp.x - (sx + vp.x));
+                                dy = Math.max(dy, vp.y - (sy + vp.y));
+                                dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
+                                dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
+
+                                // Move if needed
+                                if (dx + dy !== 0) {
+                                        if (sx + dx &lt; 0)
+                                                dx = 0;
+        
+                                        if (sy + dy &lt; 0)
+                                                dy = 0;
+
+                                        ph.moveTo(sx + dx, sy + dy);
+                                }
+
+                                // Resize if needed
+                                if (dw + dh !== 0)
+                                        ph.resizeTo(sz.w + dw, sz.h + dh);
+
+                                return Event.cancel(e);
+                        });
+
+                        return Event.cancel(se);
+                },
+
+                resizeBy : function(dw, dh, id) {
+                        var w = this.windows[id];
+
+                        if (w) {
+                                w.element.resizeBy(dw, dh);
+                                w.iframeElement.resizeBy(dw, dh);
+                        }
+                },
+
+                close : function(win, id) {
+                        var t = this, w, d = DOM.doc, fw, id;
+
+                        id = t._findId(id || win);
+
+                        // Probably not inline
+                        if (!t.windows[id]) {
+                                t.parent(win);
+                                return;
+                        }
+
+                        t.count--;
+
+                        if (t.count == 0) {
+                                DOM.remove('mceModalBlocker');
+                                DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
+                                t.editor.focus();
+                        }
+
+                        if (w = t.windows[id]) {
+                                t.onClose.dispatch(t);
+                                Event.remove(d, 'mousedown', w.mousedownFunc);
+                                Event.remove(d, 'click', w.clickFunc);
+                                Event.clear(id);
+                                Event.clear(id + '_ifr');
+
+                                DOM.setAttrib(id + '_ifr', 'src', 'javascript:&quot;&quot;'); // Prevent leak
+                                w.element.remove();
+                                delete t.windows[id];
+
+                                fw = t._frontWindow();
+
+                                if (fw)
+                                        t.focus(fw.id);
+                        }
+                },
+                
+                // Find front most window
+                _frontWindow : function() {
+                        var fw, ix = 0;
+                        // Find front most window and focus that
+                        each (this.windows, function(w) {
+                                if (w.zIndex &gt; ix) {
+                                        fw = w;
+                                        ix = w.zIndex;
+                                }
+                        });
+                        return fw;
+                },
+
+                setTitle : function(w, ti) {
+                        var e;
+
+                        w = this._findId(w);
+
+                        if (e = DOM.get(w + '_title'))
+                                e.innerHTML = DOM.encode(ti);
+                },
+
+                alert : function(txt, cb, s) {
+                        var t = this, w;
+
+                        w = t.open({
+                                title : t,
+                                type : 'alert',
+                                button_func : function(s) {
+                                        if (cb)
+                                                cb.call(s || t, s);
+
+                                        t.close(null, w.id);
+                                },
+                                content : DOM.encode(t.editor.getLang(txt, txt)),
+                                inline : 1,
+                                width : 400,
+                                height : 130
+                        });
+                },
+
+                confirm : function(txt, cb, s) {
+                        var t = this, w;
+
+                        w = t.open({
+                                title : t,
+                                type : 'confirm',
+                                button_func : function(s) {
+                                        if (cb)
+                                                cb.call(s || t, s);
+
+                                        t.close(null, w.id);
+                                },
+                                content : DOM.encode(t.editor.getLang(txt, txt)),
+                                inline : 1,
+                                width : 400,
+                                height : 130
+                        });
+                },
+
+                // Internal functions
+
+                _findId : function(w) {
+                        var t = this;
+
+                        if (typeof(w) == 'string')
+                                return w;
+
+                        each(t.windows, function(wo) {
+                                var ifr = DOM.get(wo.id + '_ifr');
+
+                                if (ifr &amp;&amp; w == ifr.contentWindow) {
+                                        w = wo.id;
+                                        return false;
+                                }
+                        });
+
+                        return w;
+                },
+
+                _fixIELayout : function(id, s) {
+                        var w, img;
+
+                        if (!tinymce.isIE6)
+                                return;
+
+                        // Fixes the bug where hover flickers and does odd things in IE6
+                        each(['n','s','w','e','nw','ne','sw','se'], function(v) {
+                                var e = DOM.get(id + '_resize_' + v);
+
+                                DOM.setStyles(e, {
+                                        width : s ? e.clientWidth : '',
+                                        height : s ? e.clientHeight : '',
+                                        cursor : DOM.getStyle(e, 'cursor', 1)
+                                });
+
+                                DOM.setStyle(id + &quot;_bottom&quot;, 'bottom', '-1px');
+
+                                e = 0;
+                        });
+
+                        // Fixes graphics glitch
+                        if (w = this.windows[id]) {
+                                // Fixes rendering bug after resize
+                                w.element.hide();
+                                w.element.show();
+
+                                // Forced a repaint of the window
+                                //DOM.get(id).style.filter = '';
+
+                                // IE has a bug where images used in CSS won't get loaded
+                                // sometimes when the cache in the browser is disabled
+                                // This fix tries to solve it by loading the images using the image object
+                                each(DOM.select('div,a', id), function(e, i) {
+                                        if (e.currentStyle.backgroundImage != 'none') {
+                                                img = new Image();
+                                                img.src = e.currentStyle.backgroundImage.replace(/url\(\&quot;(.+)\&quot;\)/, '$1');
+                                        }
+                                });
+
+                                DOM.get(id).style.filter = '';
+                        }
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
+})();
+
</ins><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwpincludesjstinymcepluginsmediaeditor_plugin_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,890 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+        var rootAttributes = tinymce.explode('id,name,width,height,style,align,class,hspace,vspace,bgcolor,type'), excludedAttrs = tinymce.makeMap(rootAttributes.join(',')), Node = tinymce.html.Node,
+                mediaTypes, scriptRegExp, JSON = tinymce.util.JSON, mimeTypes;
+
+        // Media types supported by this plugin
+        mediaTypes = [
+                // Type, clsid:s, mime types, codebase
+                [&quot;Flash&quot;, &quot;d27cdb6e-ae6d-11cf-96b8-444553540000&quot;, &quot;application/x-shockwave-flash&quot;, &quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;],
+                [&quot;ShockWave&quot;, &quot;166b1bca-3f9c-11cf-8075-444553540000&quot;, &quot;application/x-director&quot;, &quot;http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0&quot;],
+                [&quot;WindowsMedia&quot;, &quot;6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a&quot;, &quot;application/x-mplayer2&quot;, &quot;http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701&quot;],
+                [&quot;QuickTime&quot;, &quot;02bf25d5-8c17-4b23-bc80-d3488abddc6b&quot;, &quot;video/quicktime&quot;, &quot;http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0&quot;],
+                [&quot;RealMedia&quot;, &quot;cfcdaa03-8be4-11cf-b84b-0020afbbccfa&quot;, &quot;audio/x-pn-realaudio-plugin&quot;, &quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot;],
+                [&quot;Java&quot;, &quot;8ad9c840-044e-11d1-b3e9-00805f499d93&quot;, &quot;application/x-java-applet&quot;, &quot;http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0&quot;],
+                [&quot;Silverlight&quot;, &quot;dfeaf541-f3e1-4c24-acac-99c30715084a&quot;, &quot;application/x-silverlight-2&quot;],
+                [&quot;Iframe&quot;],
+                [&quot;Video&quot;],
+                [&quot;EmbeddedAudio&quot;],
+                [&quot;Audio&quot;]
+        ];
+
+        function toArray(obj) {
+                var undef, out, i;
+
+                if (obj &amp;&amp; !obj.splice) {
+                        out = [];
+
+                        for (i = 0; true; i++) {
+                                if (obj[i])
+                                        out[i] = obj[i];
+                                else
+                                        break;
+                        }
+
+                        return out;
+                }
+
+                return obj;
+        };
+
+        tinymce.create('tinymce.plugins.MediaPlugin', {
+                init : function(ed, url) {
+                        var self = this, lookup = {}, i, y, item, name;
+
+                        function isMediaImg(node) {
+                                return node &amp;&amp; node.nodeName === 'IMG' &amp;&amp; ed.dom.hasClass(node, 'mceItemMedia');
+                        };
+
+                        self.editor = ed;
+                        self.url = url;
+
+                        // Parse media types into a lookup table
+                        scriptRegExp = '';
+                        for (i = 0; i &lt; mediaTypes.length; i++) {
+                                name = mediaTypes[i][0];
+
+                                item = {
+                                        name : name,
+                                        clsids : tinymce.explode(mediaTypes[i][1] || ''),
+                                        mimes : tinymce.explode(mediaTypes[i][2] || ''),
+                                        codebase : mediaTypes[i][3]
+                                };
+
+                                for (y = 0; y &lt; item.clsids.length; y++)
+                                        lookup['clsid:' + item.clsids[y]] = item;
+
+                                for (y = 0; y &lt; item.mimes.length; y++)
+                                        lookup[item.mimes[y]] = item;
+
+                                lookup['mceItem' + name] = item;
+                                lookup[name.toLowerCase()] = item;
+
+                                scriptRegExp += (scriptRegExp ? '|' : '') + name;
+                        }
+
+                        // Handle the media_types setting
+                        tinymce.each(ed.getParam(&quot;media_types&quot;,
+                                &quot;video=mp4,m4v,ogv,webm;&quot; +
+                                &quot;silverlight=xap;&quot; +
+                                &quot;flash=swf,flv;&quot; +
+                                &quot;shockwave=dcr;&quot; +
+                                &quot;quicktime=mov,qt,mpg,mpeg;&quot; +
+                                &quot;shockwave=dcr;&quot; +
+                                &quot;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;&quot; +
+                                &quot;realmedia=rm,ra,ram;&quot; +
+                                &quot;java=jar;&quot; +
+                                &quot;audio=mp3,ogg&quot;
+                        ).split(';'), function(item) {
+                                var i, extensions, type;
+
+                                item = item.split(/=/);
+                                extensions = tinymce.explode(item[1].toLowerCase());
+                                for (i = 0; i &lt; extensions.length; i++) {
+                                        type = lookup[item[0].toLowerCase()];
+
+                                        if (type)
+                                                lookup[extensions[i]] = type;
+                                }
+                        });
+
+                        scriptRegExp = new RegExp('write(' + scriptRegExp + ')\\(([^)]+)\\)');
+                        self.lookup = lookup;
+
+                        ed.onPreInit.add(function() {
+                                // Allow video elements
+                                ed.schema.addValidElements('object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]');
+
+                                // Convert video elements to image placeholder
+                                ed.parser.addNodeFilter('object,embed,video,audio,script,iframe', function(nodes) {
+                                        var i = nodes.length;
+
+                                        while (i--)
+                                                self.objectToImg(nodes[i]);
+                                });
+
+                                // Convert image placeholders to video elements
+                                ed.serializer.addNodeFilter('img', function(nodes, name, args) {
+                                        var i = nodes.length, node;
+
+                                        while (i--) {
+                                                node = nodes[i];
+                                                if ((node.attr('class') || '').indexOf('mceItemMedia') !== -1)
+                                                        self.imgToObject(node, args);
+                                        }
+                                });
+                        });
+
+                        ed.onInit.add(function() {
+                                // Display &quot;media&quot; instead of &quot;img&quot; in element path
+                                if (ed.theme &amp;&amp; ed.theme.onResolveName) {
+                                        ed.theme.onResolveName.add(function(theme, path_object) {
+                                                if (path_object.name === 'img' &amp;&amp; ed.dom.hasClass(path_object.node, 'mceItemMedia'))
+                                                        path_object.name = 'media';
+                                        });
+                                }
+
+                                // Add contect menu if it's loaded
+                                if (ed &amp;&amp; ed.plugins.contextmenu) {
+                                        ed.plugins.contextmenu.onContextMenu.add(function(plugin, menu, element) {
+                                                if (element.nodeName === 'IMG' &amp;&amp; element.className.indexOf('mceItemMedia') !== -1)
+                                                        menu.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
+                                        });
+                                }
+                        });
+
+                        // Register commands
+                        ed.addCommand('mceMedia', function() {
+                                var data, img;
+
+                                img = ed.selection.getNode();
+                                if (isMediaImg(img)) {
+                                        data = ed.dom.getAttrib(img, 'data-mce-json');
+                                        if (data) {
+                                                data = JSON.parse(data);
+
+                                                // Add some extra properties to the data object
+                                                tinymce.each(rootAttributes, function(name) {
+                                                        var value = ed.dom.getAttrib(img, name);
+
+                                                        if (value)
+                                                                data[name] = value;
+                                                });
+
+                                                data.type = self.getType(img.className).name.toLowerCase();
+                                        }
+                                }
+
+                                if (!data) {
+                                        data = {
+                                                type : 'flash',
+                                                video: {sources:[]},
+                                                params: {}
+                                        };
+                                }
+
+                                ed.windowManager.open({
+                                        file : url + '/media.htm',
+                                        width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
+                                        height : 500 + parseInt(ed.getLang('media.delta_height', 0)),
+                                        inline : 1
+                                }, {
+                                        plugin_url : url,
+                                        data : data
+                                });
+                        });
+
+                        // Register buttons
+                        ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
+
+                        // Update media selection status
+                        ed.onNodeChange.add(function(ed, cm, node) {
+                                cm.setActive('media', isMediaImg(node));
+                        });
+                },
+
+                convertUrl : function(url, force_absolute) {
+                        var self = this, editor = self.editor, settings = editor.settings,
+                                urlConverter = settings.url_converter,
+                                urlConverterScope = settings.url_converter_scope || self;
+
+                        if (!url)
+                                return url;
+
+                        if (force_absolute)
+                                return editor.documentBaseURI.toAbsolute(url);
+
+                        return urlConverter.call(urlConverterScope, url, 'src', 'object');
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'Media',
+                                author : 'Moxiecode Systems AB',
+                                authorurl : 'http://tinymce.moxiecode.com',
+                                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
+                                version : tinymce.majorVersion + &quot;.&quot; + tinymce.minorVersion
+                        };
+                },
+
+                /**
+                 * Converts the JSON data object to an img node.
+                 */
+                dataToImg : function(data, force_absolute) {
+                        var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i;
+
+                        data.params.src = self.convertUrl(data.params.src, force_absolute);
+
+                        attrs = data.video.attrs;
+                        if (attrs)
+                                attrs.src = self.convertUrl(attrs.src, force_absolute);
+
+                        if (attrs)
+                                attrs.poster = self.convertUrl(attrs.poster, force_absolute);
+
+                        sources = toArray(data.video.sources);
+                        if (sources) {
+                                for (i = 0; i &lt; sources.length; i++)
+                                        sources[i].src = self.convertUrl(sources[i].src, force_absolute);
+                        }
+
+                        img = self.editor.dom.create('img', {
+                                id : data.id,
+                                style : data.style,
+                                align : data.align,
+                                hspace : data.hspace,
+                                vspace : data.vspace,
+                                src : self.editor.theme.url + '/img/trans.gif',
+                                'class' : 'mceItemMedia mceItem' + self.getType(data.type).name,
+                                'data-mce-json' : JSON.serialize(data, &quot;'&quot;)
+                        });
+
+                        img.width = data.width || (data.type == 'audio' ? &quot;300&quot; : &quot;320&quot;);
+                        img.height = data.height || (data.type == 'audio' ? &quot;32&quot; : &quot;240&quot;);
+
+                        return img;
+                },
+
+                /**
+                 * Converts the JSON data object to a HTML string.
+                 */
+                dataToHtml : function(data, force_absolute) {
+                        return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute});
+                },
+
+                /**
+                 * Converts the JSON data object to a HTML string.
+                 */
+                htmlToData : function(html) {
+                        var fragment, img, data;
+
+                        data = {
+                                type : 'flash',
+                                video: {sources:[]},
+                                params: {}
+                        };
+
+                        fragment = this.editor.parser.parse(html);
+                        img = fragment.getAll('img')[0];
+
+                        if (img) {
+                                data = JSON.parse(img.attr('data-mce-json'));
+                                data.type = this.getType(img.attr('class')).name.toLowerCase();
+
+                                // Add some extra properties to the data object
+                                tinymce.each(rootAttributes, function(name) {
+                                        var value = img.attr(name);
+
+                                        if (value)
+                                                data[name] = value;
+                                });
+                        }
+
+                        return data;
+                },
+
+                /**
+                 * Get type item by extension, class, clsid or mime type.
+                 *
+                 * @method getType
+                 * @param {String} value Value to get type item by.
+                 * @return {Object} Type item object or undefined.
+                 */
+                getType : function(value) {
+                        var i, values, typeItem;
+
+                        // Find type by checking the classes
+                        values = tinymce.explode(value, ' ');
+                        for (i = 0; i &lt; values.length; i++) {
+                                typeItem = this.lookup[values[i]];
+
+                                if (typeItem)
+                                        return typeItem;
+                        }
+                },
+
+                /**
+                 * Converts a tinymce.html.Node image element to video/object/embed.
+                 */
+                imgToObject : function(node, args) {
+                        var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
+                                source, sources, params, param, typeItem, i, item, mp4Source, replacement,
+                                posterSrc, style, audio;
+
+                        // Adds the flash player
+                        function addPlayer(video_src, poster_src) {
+                                var baseUri, flashVars, flashVarsOutput, params, flashPlayer;
+
+                                flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf'));
+                                if (flashPlayer) {
+                                        baseUri = editor.documentBaseURI;
+                                        data.params.src = flashPlayer;
+
+                                        // Convert the movie url to absolute urls
+                                        if (editor.getParam('flash_video_player_absvideourl', true)) {
+                                                video_src = baseUri.toAbsolute(video_src || '', true);
+                                                poster_src = baseUri.toAbsolute(poster_src || '', true);
+                                        }
+
+                                        // Generate flash vars
+                                        flashVarsOutput = '';
+                                        flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'});
+                                        tinymce.each(flashVars, function(value, name) {
+                                                // Replace $url and $poster variables in flashvars value
+                                                value = value.replace(/\$url/, video_src || '');
+                                                value = value.replace(/\$poster/, poster_src || '');
+
+                                                if (value.length &gt; 0)
+                                                        flashVarsOutput += (flashVarsOutput ? '&amp;' : '') + name + '=' + escape(value);
+                                        });
+
+                                        if (flashVarsOutput.length)
+                                                data.params.flashvars = flashVarsOutput;
+
+                                        params = editor.getParam('flash_video_player_params', {
+                                                allowfullscreen: true,
+                                                allowscriptaccess: true
+                                        });
+
+                                        tinymce.each(params, function(value, name) {
+                                                data.params[name] = &quot;&quot; + value;
+                                        });
+                                }
+                        };
+
+                        data = node.attr('data-mce-json');
+                        if (!data)
+                                return;
+
+                        data = JSON.parse(data);
+                        typeItem = this.getType(node.attr('class'));
+
+                        style = node.attr('data-mce-style')
+                        if (!style) {
+                                style = node.attr('style');
+
+                                if (style)
+                                        style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
+                        }
+
+                        // Handle iframe
+                        if (typeItem.name === 'Iframe') {
+                                replacement = new Node('iframe', 1);
+
+                                tinymce.each(rootAttributes, function(name) {
+                                        var value = node.attr(name);
+
+                                        if (name == 'class' &amp;&amp; value)
+                                                value = value.replace(/mceItem.+ ?/g, '');
+
+                                        if (value &amp;&amp; value.length &gt; 0)
+                                                replacement.attr(name, value);
+                                });
+
+                                for (name in data.params)
+                                        replacement.attr(name, data.params[name]);
+
+                                replacement.attr({
+                                        style: style,
+                                        src: data.params.src
+                                });
+
+                                node.replace(replacement);
+
+                                return;
+                        }
+
+                        // Handle scripts
+                        if (this.editor.settings.media_use_script) {
+                                replacement = new Node('script', 1).attr('type', 'text/javascript');
+
+                                value = new Node('#text', 3);
+                                value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, {
+                                        width: node.attr('width'),
+                                        height: node.attr('height')
+                                })) + ');';
+
+                                replacement.append(value);
+                                node.replace(replacement);
+
+                                return;
+                        }
+
+                        // Add HTML5 video element
+                        if (typeItem.name === 'Video' &amp;&amp; data.video.sources[0]) {
+                                // Create new object element
+                                video = new Node('video', 1).attr(tinymce.extend({
+                                        id : node.attr('id'),
+                                        width: node.attr('width'),
+                                        height: node.attr('height'),
+                                        style : style
+                                }, data.video.attrs));
+
+                                // Get poster source and use that for flash fallback
+                                if (data.video.attrs)
+                                        posterSrc = data.video.attrs.poster;
+
+                                sources = data.video.sources = toArray(data.video.sources);
+                                for (i = 0; i &lt; sources.length; i++) {
+                                        if (/\.mp4$/.test(sources[i].src))
+                                                mp4Source = sources[i].src;
+                                }
+
+                                if (!sources[0].type) {
+                                        video.attr('src', sources[0].src);
+                                        sources.splice(0, 1);
+                                }
+
+                                for (i = 0; i &lt; sources.length; i++) {
+                                        source = new Node('source', 1).attr(sources[i]);
+                                        source.shortEnded = true;
+                                        video.append(source);
+                                }
+
+                                // Create flash fallback for video if we have a mp4 source
+                                if (mp4Source) {
+                                        addPlayer(mp4Source, posterSrc);
+                                        typeItem = self.getType('flash');
+                                } else
+                                        data.params.src = '';
+                        }
+
+                        // Add HTML5 audio element
+                        if (typeItem.name === 'Audio' &amp;&amp; data.video.sources[0]) {
+                                // Create new object element
+                                audio = new Node('audio', 1).attr(tinymce.extend({
+                                        id : node.attr('id'),
+                                        width: node.attr('width'),
+                                        height: node.attr('height'),
+                                        style : style
+                                }, data.video.attrs));
+
+                                // Get poster source and use that for flash fallback
+                                if (data.video.attrs)
+                                        posterSrc = data.video.attrs.poster;
+
+                                sources = data.video.sources = toArray(data.video.sources);
+                                if (!sources[0].type) {
+                                        audio.attr('src', sources[0].src);
+                                        sources.splice(0, 1);
+                                }
+
+                                for (i = 0; i &lt; sources.length; i++) {
+                                        source = new Node('source', 1).attr(sources[i]);
+                                        source.shortEnded = true;
+                                        audio.append(source);
+                                }
+
+                                data.params.src = '';
+                        }
+
+                        if (typeItem.name === 'EmbeddedAudio') {
+                                embed = new Node('embed', 1);
+                                embed.shortEnded = true;
+                                embed.attr({
+                                        id: node.attr('id'),
+                                        width: node.attr('width'),
+                                        height: node.attr('height'),
+                                        style : style,
+                                        type: node.attr('type')
+                                });
+
+                                for (name in data.params)
+                                        embed.attr(name, data.params[name]);
+
+                                tinymce.each(rootAttributes, function(name) {
+                                        if (data[name] &amp;&amp; name != 'type')
+                                                embed.attr(name, data[name]);
+                                });
+
+                                data.params.src = '';
+                        }
+
+                        // Do we have a params src then we can generate object
+                        if (data.params.src) {
+                                // Is flv movie add player for it
+                                if (/\.flv$/i.test(data.params.src))
+                                        addPlayer(data.params.src, '');
+
+                                if (args &amp;&amp; args.force_absolute)
+                                        data.params.src = editor.documentBaseURI.toAbsolute(data.params.src);
+
+                                // Create new object element
+                                object = new Node('object', 1).attr({
+                                        id : node.attr('id'),
+                                        width: node.attr('width'),
+                                        height: node.attr('height'),
+                                        style : style
+                                });
+
+                                tinymce.each(rootAttributes, function(name) {
+                                        var value = data[name];
+
+                                        if (name == 'class' &amp;&amp; value)
+                                                value = value.replace(/mceItem.+ ?/g, '');
+
+                                        if (value &amp;&amp; name != 'type')
+                                                object.attr(name, value);
+                                });
+
+                                // Add params
+                                for (name in data.params) {
+                                        param = new Node('param', 1);
+                                        param.shortEnded = true;
+                                        value = data.params[name];
+
+                                        // Windows media needs to use url instead of src for the media URL
+                                        if (name === 'src' &amp;&amp; typeItem.name === 'WindowsMedia')
+                                                name = 'url';
+
+                                        param.attr({name: name, value: value});
+                                        object.append(param);
+                                }
+
+                                // Setup add type and classid if strict is disabled
+                                if (this.editor.getParam('media_strict', true)) {
+                                        object.attr({
+                                                data: data.params.src,
+                                                type: typeItem.mimes[0]
+                                        });
+                                } else {
+                                        object.attr({
+                                                classid: &quot;clsid:&quot; + typeItem.clsids[0],
+                                                codebase: typeItem.codebase
+                                        });
+
+                                        embed = new Node('embed', 1);
+                                        embed.shortEnded = true;
+                                        embed.attr({
+                                                id: node.attr('id'),
+                                                width: node.attr('width'),
+                                                height: node.attr('height'),
+                                                style : style,
+                                                type: typeItem.mimes[0]
+                                        });
+
+                                        for (name in data.params)
+                                                embed.attr(name, data.params[name]);
+
+                                        tinymce.each(rootAttributes, function(name) {
+                                                if (data[name] &amp;&amp; name != 'type')
+                                                        embed.attr(name, data[name]);
+                                        });
+
+                                        object.append(embed);
+                                }
+
+                                // Insert raw HTML
+                                if (data.object_html) {
+                                        value = new Node('#text', 3);
+                                        value.raw = true;
+                                        value.value = data.object_html;
+                                        object.append(value);
+                                }
+
+                                // Append object to video element if it exists
+                                if (video)
+                                        video.append(object);
+                        }
+
+                        if (video) {
+                                // Insert raw HTML
+                                if (data.video_html) {
+                                        value = new Node('#text', 3);
+                                        value.raw = true;
+                                        value.value = data.video_html;
+                                        video.append(value);
+                                }
+                        }
+
+                        if (audio) {
+                                // Insert raw HTML
+                                if (data.video_html) {
+                                        value = new Node('#text', 3);
+                                        value.raw = true;
+                                        value.value = data.video_html;
+                                        audio.append(value);
+                                }
+                        }
+
+                        var n = video || audio || object || embed;
+                        if (n)
+                                node.replace(n);
+                        else
+                                node.remove();
+                },
+
+                /**
+                 * Converts a tinymce.html.Node video/object/embed to an img element.
+                 *
+                 * The video/object/embed will be converted into an image placeholder with a JSON data attribute like this:
+                 * &lt;img class=&quot;mceItemMedia mceItemFlash&quot; width=&quot;100&quot; height=&quot;100&quot; data-mce-json=&quot;{..}&quot; /&gt;
+                 *
+                 * The JSON structure will be like this:
+                 * {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}}
+                 */
+                objectToImg : function(node) {
+                        var object, embed, video, iframe, img, name, id, width, height, style, i, html,
+                                param, params, source, sources, data, type, lookup = this.lookup,
+                                matches, attrs, urlConverter = this.editor.settings.url_converter,
+                                urlConverterScope = this.editor.settings.url_converter_scope,
+                                hspace, vspace, align, bgcolor;
+
+                        function getInnerHTML(node) {
+                                return new tinymce.html.Serializer({
+                                        inner: true,
+                                        validate: false
+                                }).serialize(node);
+                        };
+
+                        function lookupAttribute(o, attr) {
+                                return lookup[(o.attr(attr) || '').toLowerCase()];
+                        }
+
+                        function lookupExtension(src) {
+                                var ext = src.replace(/^.*\.([^.]+)$/, '$1');
+                                return lookup[ext.toLowerCase() || ''];
+                        }
+
+                        // If node isn't in document
+                        if (!node.parent)
+                                return;
+
+                        // Handle media scripts
+                        if (node.name === 'script') {
+                                if (node.firstChild)
+                                        matches = scriptRegExp.exec(node.firstChild.value);
+
+                                if (!matches)
+                                        return;
+
+                                type = matches[1];
+                                data = {video : {}, params : JSON.parse(matches[2])};
+                                width = data.params.width;
+                                height = data.params.height;
+                        }
+
+                        // Setup data objects
+                        data = data || {
+                                video : {},
+                                params : {}
+                        };
+
+                        // Setup new image object
+                        img = new Node('img', 1);
+                        img.attr({
+                                src : this.editor.theme.url + '/img/trans.gif'
+                        });
+
+                        // Video element
+                        name = node.name;
+                        if (name === 'video' || name == 'audio') {
+                                video = node;
+                                object = node.getAll('object')[0];
+                                embed = node.getAll('embed')[0];
+                                width = video.attr('width');
+                                height = video.attr('height');
+                                id = video.attr('id');
+                                data.video = {attrs : {}, sources : []};
+
+                                // Get all video attributes
+                                attrs = data.video.attrs;
+                                for (name in video.attributes.map)
+                                        attrs[name] = video.attributes.map[name];
+
+                                source = node.attr('src');
+                                if (source)
+                                        data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)});
+
+                                // Get all sources
+                                sources = video.getAll(&quot;source&quot;);
+                                for (i = 0; i &lt; sources.length; i++) {
+                                        source = sources[i].remove();
+
+                                        data.video.sources.push({
+                                                src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'),
+                                                type: source.attr('type'),
+                                                media: source.attr('media')
+                                        });
+                                }
+
+                                // Convert the poster URL
+                                if (attrs.poster)
+                                        attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name);
+                        }
+
+                        // Object element
+                        if (node.name === 'object') {
+                                object = node;
+                                embed = node.getAll('embed')[0];
+                        }
+
+                        // Embed element
+                        if (node.name === 'embed')
+                                embed = node;
+
+                        // Iframe element
+                        if (node.name === 'iframe') {
+                                iframe = node;
+                                type = 'Iframe';
+                        }
+
+                        if (object) {
+                                // Get width/height
+                                width = width || object.attr('width');
+                                height = height || object.attr('height');
+                                style = style || object.attr('style');
+                                id = id || object.attr('id');
+                                hspace = hspace || object.attr('hspace');
+                                vspace = vspace || object.attr('vspace');
+                                align = align || object.attr('align');
+                                bgcolor = bgcolor || object.attr('bgcolor');
+                                data.name = object.attr('name');
+
+                                // Get all object params
+                                params = object.getAll(&quot;param&quot;);
+                                for (i = 0; i &lt; params.length; i++) {
+                                        param = params[i];
+                                        name = param.remove().attr('name');
+
+                                        if (!excludedAttrs[name])
+                                                data.params[name] = param.attr('value');
+                                }
+
+                                data.params.src = data.params.src || object.attr('data');
+                        }
+
+                        if (embed) {
+                                // Get width/height
+                                width = width || embed.attr('width');
+                                height = height || embed.attr('height');
+                                style = style || embed.attr('style');
+                                id = id || embed.attr('id');
+                                hspace = hspace || embed.attr('hspace');
+                                vspace = vspace || embed.attr('vspace');
+                                align = align || embed.attr('align');
+                                bgcolor = bgcolor || embed.attr('bgcolor');
+
+                                // Get all embed attributes
+                                for (name in embed.attributes.map) {
+                                        if (!excludedAttrs[name] &amp;&amp; !data.params[name])
+                                                data.params[name] = embed.attributes.map[name];
+                                }
+                        }
+
+                        if (iframe) {
+                                // Get width/height
+                                width = iframe.attr('width');
+                                height = iframe.attr('height');
+                                style = style || iframe.attr('style');
+                                id = iframe.attr('id');
+                                hspace = iframe.attr('hspace');
+                                vspace = iframe.attr('vspace');
+                                align = iframe.attr('align');
+                                bgcolor = iframe.attr('bgcolor');
+
+                                tinymce.each(rootAttributes, function(name) {
+                                        img.attr(name, iframe.attr(name));
+                                });
+
+                                // Get all iframe attributes
+                                for (name in iframe.attributes.map) {
+                                        if (!excludedAttrs[name] &amp;&amp; !data.params[name])
+                                                data.params[name] = iframe.attributes.map[name];
+                                }
+                        }
+
+                        // Use src not movie
+                        if (data.params.movie) {
+                                data.params.src = data.params.src || data.params.movie;
+                                delete data.params.movie;
+                        }
+
+                        // Convert the URL to relative/absolute depending on configuration
+                        if (data.params.src)
+                                data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object');
+
+                        if (video) {
+                                if (node.name === 'video')
+                                        type = lookup.video.name;
+                                else if (node.name === 'audio')
+                                        type = lookup.audio.name;
+                        }
+
+                        if (object &amp;&amp; !type)
+                                type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
+
+                        if (embed &amp;&amp; !type)
+                                type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
+
+                        // for embedded audio we preserve the original specified type
+                        if (embed &amp;&amp; type == 'EmbeddedAudio') {
+                                data.params.type = embed.attr('type');
+                        }
+
+                        // Replace the video/object/embed element with a placeholder image containing the data
+                        node.replace(img);
+
+                        // Remove embed
+                        if (embed)
+                                embed.remove();
+
+                        // Serialize the inner HTML of the object element
+                        if (object) {
+                                html = getInnerHTML(object.remove());
+
+                                if (html)
+                                        data.object_html = html;
+                        }
+
+                        // Serialize the inner HTML of the video element
+                        if (video) {
+                                html = getInnerHTML(video.remove());
+
+                                if (html)
+                                        data.video_html = html;
+                        }
+
+                        data.hspace = hspace;
+                        data.vspace = vspace;
+                        data.align = align;
+                        data.bgcolor = bgcolor;
+
+                        // Set width/height of placeholder
+                        img.attr({
+                                id : id,
+                                'class' : 'mceItemMedia mceItem' + (type || 'Flash'),
+                                style : style,
+                                width : width || (node.name == 'audio' ? &quot;300&quot; : &quot;320&quot;),
+                                height : height || (node.name == 'audio' ? &quot;32&quot; : &quot;240&quot;),
+                                hspace : hspace,
+                                vspace : vspace,
+                                align : align,
+                                bgcolor : bgcolor,
+                                &quot;data-mce-json&quot; : JSON.serialize(data, &quot;'&quot;)
+                        });
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
+})();
</ins><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/plugins/media/editor_plugin_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwpincludesjstinymcepluginspasteeditor_plugin_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,871 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+        var each = tinymce.each,
+                defs = {
+                        paste_auto_cleanup_on_paste : true,
+                        paste_enable_default_filters : true,
+                        paste_block_drop : false,
+                        paste_retain_style_properties : &quot;none&quot;,
+                        paste_strip_class_attributes : &quot;mso&quot;,
+                        paste_remove_spans : false,
+                        paste_remove_styles : false,
+                        paste_remove_styles_if_webkit : true,
+                        paste_convert_middot_lists : true,
+                        paste_convert_headers_to_strong : false,
+                        paste_dialog_width : &quot;450&quot;,
+                        paste_dialog_height : &quot;400&quot;,
+                        paste_text_use_dialog : false,
+                        paste_text_sticky : false,
+                        paste_text_sticky_default : false,
+                        paste_text_notifyalways : false,
+                        paste_text_linebreaktype : &quot;combined&quot;,
+                        paste_text_replacements : [
+                                [/\u2026/g, &quot;...&quot;],
+                                [/[\x93\x94\u201c\u201d]/g, '&quot;'],
+                                [/[\x60\x91\x92\u2018\u2019]/g, &quot;'&quot;]
+                        ]
+                };
+
+        function getParam(ed, name) {
+                return ed.getParam(name, defs[name]);
+        }
+
+        tinymce.create('tinymce.plugins.PastePlugin', {
+                init : function(ed, url) {
+                        var t = this;
+
+                        t.editor = ed;
+                        t.url = url;
+
+                        // Setup plugin events
+                        t.onPreProcess = new tinymce.util.Dispatcher(t);
+                        t.onPostProcess = new tinymce.util.Dispatcher(t);
+
+                        // Register default handlers
+                        t.onPreProcess.add(t._preProcess);
+                        t.onPostProcess.add(t._postProcess);
+
+                        // Register optional preprocess handler
+                        t.onPreProcess.add(function(pl, o) {
+                                ed.execCallback('paste_preprocess', pl, o);
+                        });
+
+                        // Register optional postprocess
+                        t.onPostProcess.add(function(pl, o) {
+                                ed.execCallback('paste_postprocess', pl, o);
+                        });
+
+                        ed.onKeyDown.addToTop(function(ed, e) {
+                                // Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that
+                                if (((tinymce.isMac ? e.metaKey : e.ctrlKey) &amp;&amp; e.keyCode == 86) || (e.shiftKey &amp;&amp; e.keyCode == 45))
+                                        return false; // Stop other listeners
+                        });
+
+                        // Initialize plain text flag
+                        ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default');
+
+                        // This function executes the process handlers and inserts the contents
+                        // force_rich overrides plain text mode set by user, important for pasting with execCommand
+                        function process(o, force_rich) {
+                                var dom = ed.dom, rng;
+
+                                // Execute pre process handlers
+                                t.onPreProcess.dispatch(t, o);
+
+                                // Create DOM structure
+                                o.node = dom.create('div', 0, o.content);
+
+                                // If pasting inside the same element and the contents is only one block
+                                // remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element
+                                if (tinymce.isGecko) {
+                                        rng = ed.selection.getRng(true);
+                                        if (rng.startContainer == rng.endContainer &amp;&amp; rng.startContainer.nodeType == 3) {
+                                                // Is only one block node and it doesn't contain word stuff
+                                                if (o.node.childNodes.length === 1 &amp;&amp; /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) &amp;&amp; o.content.indexOf('__MCE_ITEM__') === -1)
+                                                        dom.remove(o.node.firstChild, true);
+                                        }
+                                }
+
+                                // Execute post process handlers
+                                t.onPostProcess.dispatch(t, o);
+
+                                // Serialize content
+                                o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''});
+
+                                // Plain text option active?
+                                if ((!force_rich) &amp;&amp; (ed.pasteAsPlainText)) {
+                                        t._insertPlainText(o.content);
+
+                                        if (!getParam(ed, &quot;paste_text_sticky&quot;)) {
+                                                ed.pasteAsPlainText = false;
+                                                ed.controlManager.setActive(&quot;pastetext&quot;, false);
+                                        }
+                                } else {
+                                        t._insert(o.content);
+                                }
+                        }
+
+                        // Add command for external usage
+                        ed.addCommand('mceInsertClipboardContent', function(u, o) {
+                                process(o, true);
+                        });
+
+                        if (!getParam(ed, &quot;paste_text_use_dialog&quot;)) {
+                                ed.addCommand('mcePasteText', function(u, v) {
+                                        var cookie = tinymce.util.Cookie;
+
+                                        ed.pasteAsPlainText = !ed.pasteAsPlainText;
+                                        ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
+
+                                        if ((ed.pasteAsPlainText) &amp;&amp; (!cookie.get(&quot;tinymcePasteText&quot;))) {
+                                                if (getParam(ed, &quot;paste_text_sticky&quot;)) {
+                                                        ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
+                                                } else {
+                                                        ed.windowManager.alert(ed.translate('paste.plaintext_mode'));
+                                                }
+
+                                                if (!getParam(ed, &quot;paste_text_notifyalways&quot;)) {
+                                                        cookie.set(&quot;tinymcePasteText&quot;, &quot;1&quot;, new Date(new Date().getFullYear() + 1, 12, 31))
+                                                }
+                                        }
+                                });
+                        }
+
+                        ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
+                        ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
+
+                        // This function grabs the contents from the clipboard by adding a
+                        // hidden div and placing the caret inside it and after the browser paste
+                        // is done it grabs that contents and processes that
+                        function grabContent(e) {
+                                var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
+
+                                // Check if browser supports direct plaintext access
+                                if (e.clipboardData || dom.doc.dataTransfer) {
+                                        textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text');
+
+                                        if (ed.pasteAsPlainText) {
+                                                e.preventDefault();
+                                                process({content : dom.encode(textContent).replace(/\r?\n/g, '&lt;br /&gt;')});
+                                                return;
+                                        }
+                                }
+
+                                if (dom.get('_mcePaste'))
+                                        return;
+
+                                // Create container to paste into
+                                n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF');
+
+                                // If contentEditable mode we need to find out the position of the closest element
+                                if (body != ed.getDoc().body)
+                                        posY = dom.getPos(ed.selection.getStart(), body).y;
+                                else
+                                        posY = body.scrollTop + dom.getViewPort(ed.getWin()).y;
+
+                                // Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
+                                // If also needs to be in view on IE or the paste would fail
+                                dom.setStyles(n, {
+                                        position : 'absolute',
+                                        left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div
+                                        top : posY - 25,
+                                        width : 1,
+                                        height : 1,
+                                        overflow : 'hidden'
+                                });
+
+                                if (tinymce.isIE) {
+                                        // Store away the old range
+                                        oldRng = sel.getRng();
+
+                                        // Select the container
+                                        rng = dom.doc.body.createTextRange();
+                                        rng.moveToElementText(n);
+                                        rng.execCommand('Paste');
+
+                                        // Remove container
+                                        dom.remove(n);
+
+                                        // Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
+                                        // to IE security settings so we pass the junk though better than nothing right
+                                        if (n.innerHTML === '\uFEFF\uFEFF') {
+                                                ed.execCommand('mcePasteWord');
+                                                e.preventDefault();
+                                                return;
+                                        }
+
+                                        // Restore the old range and clear the contents before pasting
+                                        sel.setRng(oldRng);
+                                        sel.setContent('');
+
+                                        // For some odd reason we need to detach the the mceInsertContent call from the paste event
+                                        // It's like IE has a reference to the parent element that you paste in and the selection gets messed up
+                                        // when it tries to restore the selection
+                                        setTimeout(function() {
+                                                // Process contents
+                                                process({content : n.innerHTML});
+                                        }, 0);
+
+                                        // Block the real paste event
+                                        return tinymce.dom.Event.cancel(e);
+                                } else {
+                                        function block(e) {
+                                                e.preventDefault();
+                                        };
+
+                                        // Block mousedown and click to prevent selection change
+                                        dom.bind(ed.getDoc(), 'mousedown', block);
+                                        dom.bind(ed.getDoc(), 'keydown', block);
+
+                                        or = ed.selection.getRng();
+
+                                        // Move select contents inside DIV
+                                        n = n.firstChild;
+                                        rng = ed.getDoc().createRange();
+                                        rng.setStart(n, 0);
+                                        rng.setEnd(n, 2);
+                                        sel.setRng(rng);
+
+                                        // Wait a while and grab the pasted contents
+                                        window.setTimeout(function() {
+                                                var h = '', nl;
+
+                                                // Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit
+                                                if (!dom.select('div.mcePaste &gt; div.mcePaste').length) {
+                                                        nl = dom.select('div.mcePaste');
+
+                                                        // WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
+                                                        each(nl, function(n) {
+                                                                var child = n.firstChild;
+
+                                                                // WebKit inserts a DIV container with lots of odd styles
+                                                                if (child &amp;&amp; child.nodeName == 'DIV' &amp;&amp; child.style.marginTop &amp;&amp; child.style.backgroundColor) {
+                                                                        dom.remove(child, 1);
+                                                                }
+
+                                                                // Remove apply style spans
+                                                                each(dom.select('span.Apple-style-span', n), function(n) {
+                                                                        dom.remove(n, 1);
+                                                                });
+
+                                                                // Remove bogus br elements
+                                                                each(dom.select('br[data-mce-bogus]', n), function(n) {
+                                                                        dom.remove(n);
+                                                                });
+
+                                                                // WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV
+                                                                if (n.parentNode.className != 'mcePaste')
+                                                                        h += n.innerHTML;
+                                                        });
+                                                } else {
+                                                        // Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc
+                                                        // So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same
+                                                        h = '&lt;p&gt;' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '&lt;/p&gt;&lt;p&gt;').replace(/\r?\n/g, '&lt;br /&gt;') + '&lt;/p&gt;';
+                                                }
+
+                                                // Remove the nodes
+                                                each(dom.select('div.mcePaste'), function(n) {
+                                                        dom.remove(n);
+                                                });
+
+                                                // Restore the old selection
+                                                if (or)
+                                                        sel.setRng(or);
+
+                                                process({content : h});
+
+                                                // Unblock events ones we got the contents
+                                                dom.unbind(ed.getDoc(), 'mousedown', block);
+                                                dom.unbind(ed.getDoc(), 'keydown', block);
+                                        }, 0);
+                                }
+                        }
+
+                        // Check if we should use the new auto process method                        
+                        if (getParam(ed, &quot;paste_auto_cleanup_on_paste&quot;)) {
+                                // Is it's Opera or older FF use key handler
+                                if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
+                                        ed.onKeyDown.addToTop(function(ed, e) {
+                                                if (((tinymce.isMac ? e.metaKey : e.ctrlKey) &amp;&amp; e.keyCode == 86) || (e.shiftKey &amp;&amp; e.keyCode == 45))
+                                                        grabContent(e);
+                                        });
+                                } else {
+                                        // Grab contents on paste event on Gecko and WebKit
+                                        ed.onPaste.addToTop(function(ed, e) {
+                                                return grabContent(e);
+                                        });
+                                }
+                        }
+
+                        ed.onInit.add(function() {
+                                ed.controlManager.setActive(&quot;pastetext&quot;, ed.pasteAsPlainText);
+
+                                // Block all drag/drop events
+                                if (getParam(ed, &quot;paste_block_drop&quot;)) {
+                                        ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
+                                                e.preventDefault();
+                                                e.stopPropagation();
+
+                                                return false;
+                                        });
+                                }
+                        });
+
+                        // Add legacy support
+                        t._legacySupport();
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'Paste text/word',
+                                author : 'Moxiecode Systems AB',
+                                authorurl : 'http://tinymce.moxiecode.com',
+                                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
+                                version : tinymce.majorVersion + &quot;.&quot; + tinymce.minorVersion
+                        };
+                },
+
+                _preProcess : function(pl, o) {
+                        var ed = this.editor,
+                                h = o.content,
+                                grep = tinymce.grep,
+                                explode = tinymce.explode,
+                                trim = tinymce.trim,
+                                len, stripClass;
+
+                        //console.log('Before preprocess:' + o.content);
+
+                        function process(items) {
+                                each(items, function(v) {
+                                        // Remove or replace
+                                        if (v.constructor == RegExp)
+                                                h = h.replace(v, '');
+                                        else
+                                                h = h.replace(v[0], v[1]);
+                                });
+                        }
+                        
+                        if (ed.settings.paste_enable_default_filters == false) {
+                                return;
+                        }
+
+                        // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
+                        if (tinymce.isIE &amp;&amp; document.documentMode &gt;= 9) {
+                                // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
+                                process([[/(?:&lt;br&gt;&amp;nbsp;[\s\r\n]+|&lt;br&gt;)*(&lt;\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^&gt;]*&gt;)(?:&lt;br&gt;&amp;nbsp;[\s\r\n]+|&lt;br&gt;)*/g, '$1']]);
+
+                                // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break
+                                process([
+                                        [/&lt;br&gt;&lt;br&gt;/g, '&lt;BR&gt;&lt;BR&gt;'], // Replace multiple BR elements with uppercase BR to keep them intact
+                                        [/&lt;br&gt;/g, ' '], // Replace single br elements with space since they are word wrap BR:s
+                                        [/&lt;BR&gt;&lt;BR&gt;/g, '&lt;br&gt;'] // Replace back the double brs but into a single BR
+                                ]);
+                        }
+
+                        // Detect Word content and process it more aggressive
+                        if (/class=&quot;?Mso|style=&quot;[^&quot;]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
+                                o.wordContent = true;                        // Mark the pasted contents as word specific content
+                                //console.log('Word contents detected.');
+
+                                // Process away some basic content
+                                process([
+                                        /^\s*(&amp;nbsp;)+/gi,                                // &amp;nbsp; entities at the start of contents
+                                        /(&amp;nbsp;|&lt;br[^&gt;]*&gt;)+\s*$/gi                // &amp;nbsp; entities at the end of contents
+                                ]);
+
+                                if (getParam(ed, &quot;paste_convert_headers_to_strong&quot;)) {
+                                        h = h.replace(/&lt;p [^&gt;]*class=&quot;?MsoHeading&quot;?[^&gt;]*&gt;(.*?)&lt;\/p&gt;/gi, &quot;&lt;p&gt;&lt;strong&gt;$1&lt;/strong&gt;&lt;/p&gt;&quot;);
+                                }
+
+                                if (getParam(ed, &quot;paste_convert_middot_lists&quot;)) {
+                                        process([
+                                                [/&lt;!--\[if !supportLists\]--&gt;/gi, '$&amp;__MCE_ITEM__'],                                        // Convert supportLists to a list item marker
+                                                [/(&lt;span[^&gt;]+(?:mso-list:|:\s*symbol)[^&gt;]+&gt;)/gi, '$1__MCE_ITEM__'],                // Convert mso-list and symbol spans to item markers
+                                                [/(&lt;p[^&gt;]+(?:MsoListParagraph)[^&gt;]+&gt;)/gi, '$1__MCE_ITEM__']                                // Convert mso-list and symbol paragraphs to item markers (FF)
+                                        ]);
+                                }
+
+                                process([
+                                        // Word comments like conditional comments etc
+                                        /&lt;!--[\s\S]+?--&gt;/gi,
+
+                                        // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
+                                        /&lt;(!|script[^&gt;]*&gt;.*?&lt;\/script(?=[&gt;\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/&gt;]))[^&gt;]*&gt;/gi,
+
+                                        // Convert &lt;s&gt; into &lt;strike&gt; for line-though
+                                        [/&lt;(\/?)s&gt;/gi, &quot;&lt;$1strike&gt;&quot;],
+
+                                        // Replace nsbp entites to char since it's easier to handle
+                                        [/&amp;nbsp;/gi, &quot;\u00a0&quot;]
+                                ]);
+
+                                // Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
+                                // If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
+                                do {
+                                        len = h.length;
+                                        h = h.replace(/(&lt;[a-z][^&gt;]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:&quot;[^&quot;]*&quot;|\w+)\s?/gi, &quot;$1&quot;);
+                                } while (len != h.length);
+
+                                // Remove all spans if no styles is to be retained
+                                if (getParam(ed, &quot;paste_retain_style_properties&quot;).replace(/^none$/i, &quot;&quot;).length == 0) {
+                                        h = h.replace(/&lt;\/?span[^&gt;]*&gt;/gi, &quot;&quot;);
+                                } else {
+                                        // We're keeping styles, so at least clean them up.
+                                        // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
+
+                                        process([
+                                                // Convert &lt;span style=&quot;mso-spacerun:yes&quot;&gt;___&lt;/span&gt; to string of alternating breaking/non-breaking spaces of same length
+                                                [/&lt;span\s+style\s*=\s*&quot;\s*mso-spacerun\s*:\s*yes\s*;?\s*&quot;\s*&gt;([\s\u00a0]*)&lt;\/span&gt;/gi,
+                                                        function(str, spaces) {
+                                                                return (spaces.length &gt; 0)? spaces.replace(/./, &quot; &quot;).slice(Math.floor(spaces.length/2)).split(&quot;&quot;).join(&quot;\u00a0&quot;) : &quot;&quot;;
+                                                        }
+                                                ],
+
+                                                // Examine all styles: delete junk, transform some, and keep the rest
+                                                [/(&lt;[a-z][^&gt;]*)\sstyle=&quot;([^&quot;]*)&quot;/gi,
+                                                        function(str, tag, style) {
+                                                                var n = [],
+                                                                        i = 0,
+                                                                        s = explode(trim(style).replace(/&amp;quot;/gi, &quot;'&quot;), &quot;;&quot;);
+
+                                                                // Examine each style definition within the tag's style attribute
+                                                                each(s, function(v) {
+                                                                        var name, value,
+                                                                                parts = explode(v, &quot;:&quot;);
+
+                                                                        function ensureUnits(v) {
+                                                                                return v + ((v !== &quot;0&quot;) &amp;&amp; (/\d$/.test(v)))? &quot;px&quot; : &quot;&quot;;
+                                                                        }
+
+                                                                        if (parts.length == 2) {
+                                                                                name = parts[0].toLowerCase();
+                                                                                value = parts[1].toLowerCase();
+
+                                                                                // Translate certain MS Office styles into their CSS equivalents
+                                                                                switch (name) {
+                                                                                        case &quot;mso-padding-alt&quot;:
+                                                                                        case &quot;mso-padding-top-alt&quot;:
+                                                                                        case &quot;mso-padding-right-alt&quot;:
+                                                                                        case &quot;mso-padding-bottom-alt&quot;:
+                                                                                        case &quot;mso-padding-left-alt&quot;:
+                                                                                        case &quot;mso-margin-alt&quot;:
+                                                                                        case &quot;mso-margin-top-alt&quot;:
+                                                                                        case &quot;mso-margin-right-alt&quot;:
+                                                                                        case &quot;mso-margin-bottom-alt&quot;:
+                                                                                        case &quot;mso-margin-left-alt&quot;:
+                                                                                        case &quot;mso-table-layout-alt&quot;:
+                                                                                        case &quot;mso-height&quot;:
+                                                                                        case &quot;mso-width&quot;:
+                                                                                        case &quot;mso-vertical-align-alt&quot;:
+                                                                                                n[i++] = name.replace(/^mso-|-alt$/g, &quot;&quot;) + &quot;:&quot; + ensureUnits(value);
+                                                                                                return;
+
+                                                                                        case &quot;horiz-align&quot;:
+                                                                                                n[i++] = &quot;text-align:&quot; + value;
+                                                                                                return;
+
+                                                                                        case &quot;vert-align&quot;:
+                                                                                                n[i++] = &quot;vertical-align:&quot; + value;
+                                                                                                return;
+
+                                                                                        case &quot;font-color&quot;:
+                                                                                        case &quot;mso-foreground&quot;:
+                                                                                                n[i++] = &quot;color:&quot; + value;
+                                                                                                return;
+
+                                                                                        case &quot;mso-background&quot;:
+                                                                                        case &quot;mso-highlight&quot;:
+                                                                                                n[i++] = &quot;background:&quot; + value;
+                                                                                                return;
+
+                                                                                        case &quot;mso-default-height&quot;:
+                                                                                                n[i++] = &quot;min-height:&quot; + ensureUnits(value);
+                                                                                                return;
+
+                                                                                        case &quot;mso-default-width&quot;:
+                                                                                                n[i++] = &quot;min-width:&quot; + ensureUnits(value);
+                                                                                                return;
+
+                                                                                        case &quot;mso-padding-between-alt&quot;:
+                                                                                                n[i++] = &quot;border-collapse:separate;border-spacing:&quot; + ensureUnits(value);
+                                                                                                return;
+
+                                                                                        case &quot;text-line-through&quot;:
+                                                                                                if ((value == &quot;single&quot;) || (value == &quot;double&quot;)) {
+                                                                                                        n[i++] = &quot;text-decoration:line-through&quot;;
+                                                                                                }
+                                                                                                return;
+
+                                                                                        case &quot;mso-zero-height&quot;:
+                                                                                                if (value == &quot;yes&quot;) {
+                                                                                                        n[i++] = &quot;display:none&quot;;
+                                                                                                }
+                                                                                                return;
+                                                                                }
+
+                                                                                // Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
+                                                                                if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
+                                                                                        return;
+                                                                                }
+
+                                                                                // If it reached this point, it must be a valid CSS style
+                                                                                n[i++] = name + &quot;:&quot; + parts[1];                // Lower-case name, but keep value case
+                                                                        }
+                                                                });
+
+                                                                // If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
+                                                                if (i &gt; 0) {
+                                                                        return tag + ' style=&quot;' + n.join(';') + '&quot;';
+                                                                } else {
+                                                                        return tag;
+                                                                }
+                                                        }
+                                                ]
+                                        ]);
+                                }
+                        }
+
+                        // Replace headers with &lt;strong&gt;
+                        if (getParam(ed, &quot;paste_convert_headers_to_strong&quot;)) {
+                                process([
+                                        [/&lt;h[1-6][^&gt;]*&gt;/gi, &quot;&lt;p&gt;&lt;strong&gt;&quot;],
+                                        [/&lt;\/h[1-6][^&gt;]*&gt;/gi, &quot;&lt;/strong&gt;&lt;/p&gt;&quot;]
+                                ]);
+                        }
+
+                        process([
+                                // Copy paste from Java like Open Office will produce this junk on FF
+                                [/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, '']
+                        ]);
+
+                        // Class attribute options are: leave all as-is (&quot;none&quot;), remove all (&quot;all&quot;), or remove only those starting with mso (&quot;mso&quot;).
+                        // Note:-  paste_strip_class_attributes: &quot;none&quot;, verify_css_classes: true is also a good variation.
+                        stripClass = getParam(ed, &quot;paste_strip_class_attributes&quot;);
+
+                        if (stripClass !== &quot;none&quot;) {
+                                function removeClasses(match, g1) {
+                                                if (stripClass === &quot;all&quot;)
+                                                        return '';
+
+                                                var cls = grep(explode(g1.replace(/^([&quot;'])(.*)\1$/, &quot;$2&quot;), &quot; &quot;),
+                                                        function(v) {
+                                                                return (/^(?!mso)/i.test(v));
+                                                        }
+                                                );
+
+                                                return cls.length ? ' class=&quot;' + cls.join(&quot; &quot;) + '&quot;' : '';
+                                };
+
+                                h = h.replace(/ class=&quot;([^&quot;]+)&quot;/gi, removeClasses);
+                                h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
+                        }
+
+                        // Remove spans option
+                        if (getParam(ed, &quot;paste_remove_spans&quot;)) {
+                                h = h.replace(/&lt;\/?span[^&gt;]*&gt;/gi, &quot;&quot;);
+                        }
+
+                        //console.log('After preprocess:' + h);
+
+                        o.content = h;
+                },
+
+                /**
+                 * Various post process items.
+                 */
+                _postProcess : function(pl, o) {
+                        var t = this, ed = t.editor, dom = ed.dom, styleProps;
+
+                        if (ed.settings.paste_enable_default_filters == false) {
+                                return;
+                        }
+                        
+                        if (o.wordContent) {
+                                // Remove named anchors or TOC links
+                                each(dom.select('a', o.node), function(a) {
+                                        if (!a.href || a.href.indexOf('#_Toc') != -1)
+                                                dom.remove(a, 1);
+                                });
+
+                                if (getParam(ed, &quot;paste_convert_middot_lists&quot;)) {
+                                        t._convertLists(pl, o);
+                                }
+
+                                // Process styles
+                                styleProps = getParam(ed, &quot;paste_retain_style_properties&quot;); // retained properties
+
+                                // Process only if a string was specified and not equal to &quot;all&quot; or &quot;*&quot;
+                                if ((tinymce.is(styleProps, &quot;string&quot;)) &amp;&amp; (styleProps !== &quot;all&quot;) &amp;&amp; (styleProps !== &quot;*&quot;)) {
+                                        styleProps = tinymce.explode(styleProps.replace(/^none$/i, &quot;&quot;));
+
+                                        // Retains some style properties
+                                        each(dom.select('*', o.node), function(el) {
+                                                var newStyle = {}, npc = 0, i, sp, sv;
+
+                                                // Store a subset of the existing styles
+                                                if (styleProps) {
+                                                        for (i = 0; i &lt; styleProps.length; i++) {
+                                                                sp = styleProps[i];
+                                                                sv = dom.getStyle(el, sp);
+
+                                                                if (sv) {
+                                                                        newStyle[sp] = sv;
+                                                                        npc++;
+                                                                }
+                                                        }
+                                                }
+
+                                                // Remove all of the existing styles
+                                                dom.setAttrib(el, 'style', '');
+
+                                                if (styleProps &amp;&amp; npc &gt; 0)
+                                                        dom.setStyles(el, newStyle); // Add back the stored subset of styles
+                                                else // Remove empty span tags that do not have class attributes
+                                                        if (el.nodeName == 'SPAN' &amp;&amp; !el.className)
+                                                                dom.remove(el, true);
+                                        });
+                                }
+                        }
+
+                        // Remove all style information or only specifically on WebKit to avoid the style bug on that browser
+                        if (getParam(ed, &quot;paste_remove_styles&quot;) || (getParam(ed, &quot;paste_remove_styles_if_webkit&quot;) &amp;&amp; tinymce.isWebKit)) {
+                                each(dom.select('*[style]', o.node), function(el) {
+                                        el.removeAttribute('style');
+                                        el.removeAttribute('data-mce-style');
+                                });
+                        } else {
+                                if (tinymce.isWebKit) {
+                                        // We need to compress the styles on WebKit since if you paste &lt;img border=&quot;0&quot; /&gt; it will become &lt;img border=&quot;0&quot; style=&quot;... lots of junk ...&quot; /&gt;
+                                        // Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
+                                        each(dom.select('*', o.node), function(el) {
+                                                el.removeAttribute('data-mce-style');
+                                        });
+                                }
+                        }
+                },
+
+                /**
+                 * Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
+                 */
+                _convertLists : function(pl, o) {
+                        var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
+
+                        // Convert middot lists into real semantic lists
+                        each(dom.select('p', o.node), function(p) {
+                                var sib, val = '', type, html, idx, parents;
+
+                                // Get text node value at beginning of paragraph
+                                for (sib = p.firstChild; sib &amp;&amp; sib.nodeType == 3; sib = sib.nextSibling)
+                                        val += sib.nodeValue;
+
+                                val = p.innerHTML.replace(/&lt;\/?\w+[^&gt;]*&gt;/gi, '').replace(/&amp;nbsp;/g, '\u00a0');
+
+                                // Detect unordered lists look for bullets
+                                if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
+                                        type = 'ul';
+
+                                // Detect ordered lists 1., a. or ixv.
+                                if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
+                                        type = 'ol';
+
+                                // Check if node value matches the list pattern: o&amp;nbsp;&amp;nbsp;
+                                if (type) {
+                                        margin = parseFloat(p.style.marginLeft || 0);
+
+                                        if (margin &gt; lastMargin)
+                                                levels.push(margin);
+
+                                        if (!listElm || type != lastType) {
+                                                listElm = dom.create(type);
+                                                dom.insertAfter(listElm, p);
+                                        } else {
+                                                // Nested list element
+                                                if (margin &gt; lastMargin) {
+                                                        listElm = li.appendChild(dom.create(type));
+                                                } else if (margin &lt; lastMargin) {
+                                                        // Find parent level based on margin value
+                                                        idx = tinymce.inArray(levels, margin);
+                                                        parents = dom.getParents(listElm.parentNode, type);
+                                                        listElm = parents[parents.length - 1 - idx] || listElm;
+                                                }
+                                        }
+
+                                        // Remove middot or number spans if they exists
+                                        each(dom.select('span', p), function(span) {
+                                                var html = span.innerHTML.replace(/&lt;\/?\w+[^&gt;]*&gt;/gi, '');
+
+                                                // Remove span with the middot or the number
+                                                if (type == 'ul' &amp;&amp; /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
+                                                        dom.remove(span);
+                                                else if (/^__MCE_ITEM__[\s\S]*\w+\.(&amp;nbsp;|\u00a0)*\s*/.test(html))
+                                                        dom.remove(span);
+                                        });
+
+                                        html = p.innerHTML;
+
+                                        // Remove middot/list items
+                                        if (type == 'ul')
+                                                html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*(&amp;nbsp;|\u00a0)+\s*/, '');
+                                        else
+                                                html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.(&amp;nbsp;|\u00a0)+\s*/, '');
+
+                                        // Create li and add paragraph data into the new li
+                                        li = listElm.appendChild(dom.create('li', 0, html));
+                                        dom.remove(p);
+
+                                        lastMargin = margin;
+                                        lastType = type;
+                                } else
+                                        listElm = lastMargin = 0; // End list element
+                        });
+
+                        // Remove any left over makers
+                        html = o.node.innerHTML;
+                        if (html.indexOf('__MCE_ITEM__') != -1)
+                                o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
+                },
+
+                /**
+                 * Inserts the specified contents at the caret position.
+                 */
+                _insert : function(h, skip_undo) {
+                        var ed = this.editor, r = ed.selection.getRng();
+
+                        // First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
+                        if (!ed.selection.isCollapsed() &amp;&amp; r.startContainer != r.endContainer)
+                                ed.getDoc().execCommand('Delete', false, null);
+
+                        ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo});
+                },
+
+                /**
+                 * Instead of the old plain text method which tried to re-create a paste operation, the
+                 * new approach adds a plain text mode toggle switch that changes the behavior of paste.
+                 * This function is passed the same input that the regular paste plugin produces.
+                 * It performs additional scrubbing and produces (and inserts) the plain text.
+                 * This approach leverages all of the great existing functionality in the paste
+                 * plugin, and requires minimal changes to add the new functionality.
+                 * Speednet - June 2009
+                 */
+                _insertPlainText : function(content) {
+                        var ed = this.editor,
+                                linebr = getParam(ed, &quot;paste_text_linebreaktype&quot;),
+                                rl = getParam(ed, &quot;paste_text_replacements&quot;),
+                                is = tinymce.is;
+
+                        function process(items) {
+                                each(items, function(v) {
+                                        if (v.constructor == RegExp)
+                                                content = content.replace(v, &quot;&quot;);
+                                        else
+                                                content = content.replace(v[0], v[1]);
+                                });
+                        };
+
+                        if ((typeof(content) === &quot;string&quot;) &amp;&amp; (content.length &gt; 0)) {
+                                // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
+                                if (/&lt;(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^&gt;]*&gt;/i.test(content)) {
+                                        process([
+                                                /[\n\r]+/g
+                                        ]);
+                                } else {
+                                        // Otherwise just get rid of carriage returns (only need linefeeds)
+                                        process([
+                                                /\r+/g
+                                        ]);
+                                }
+
+                                process([
+                                        [/&lt;\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)&gt;/gi, &quot;\n\n&quot;],                // Block tags get a blank line after them
+                                        [/&lt;br[^&gt;]*&gt;|&lt;\/tr&gt;/gi, &quot;\n&quot;],                                // Single linebreak for &lt;br /&gt; tags and table rows
+                                        [/&lt;\/t[dh]&gt;\s*&lt;t[dh][^&gt;]*&gt;/gi, &quot;\t&quot;],                // Table cells get tabs betweem them
+                                        /&lt;[a-z!\/?][^&gt;]*&gt;/gi,                                                // Delete all remaining tags
+                                        [/&amp;nbsp;/gi, &quot; &quot;],                                                        // Convert non-break spaces to regular spaces (remember, *plain text*)
+                                        [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, &quot;$1&quot;],// Cool little RegExp deletes whitespace around linebreak chars.
+                                        [/\n{3,}/g, &quot;\n\n&quot;]                                                        // Max. 2 consecutive linebreaks
+                                ]);
+
+                                content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));
+
+                                // Perform default or custom replacements
+                                if (is(rl, &quot;array&quot;)) {
+                                        process(rl);
+                                } else if (is(rl, &quot;string&quot;)) {
+                                        process(new RegExp(rl, &quot;gi&quot;));
+                                }
+
+                                // Treat paragraphs as specified in the config
+                                if (linebr == &quot;none&quot;) {
+                                        // Convert all line breaks to space
+                                        process([
+                                                [/\n+/g, &quot; &quot;]
+                                        ]);
+                                } else if (linebr == &quot;br&quot;) {
+                                        // Convert all line breaks to &lt;br /&gt;
+                                        process([
+                                                [/\n/g, &quot;&lt;br /&gt;&quot;]
+                                        ]);
+                                } else if (linebr == &quot;p&quot;) {
+                                        // Convert all line breaks to &lt;p&gt;...&lt;/p&gt;
+                                        process([
+                                                [/\n+/g, &quot;&lt;/p&gt;&lt;p&gt;&quot;],
+                                                [/^(.*&lt;\/p&gt;)(&lt;p&gt;)$/, '&lt;p&gt;$1']
+                                        ]);
+                                } else {
+                                        // defaults to &quot;combined&quot;
+                                        // Convert single line breaks to &lt;br /&gt; and double line breaks to &lt;p&gt;...&lt;/p&gt;
+                                        process([
+                                                [/\n\n/g, &quot;&lt;/p&gt;&lt;p&gt;&quot;],
+                                                [/^(.*&lt;\/p&gt;)(&lt;p&gt;)$/, '&lt;p&gt;$1'],
+                                                [/\n/g, &quot;&lt;br /&gt;&quot;]
+                                        ]);
+                                }
+
+                                ed.execCommand('mceInsertContent', false, content);
+                        }
+                },
+
+                /**
+                 * This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
+                 */
+                _legacySupport : function() {
+                        var t = this, ed = t.editor;
+
+                        // Register command(s) for backwards compatibility
+                        ed.addCommand(&quot;mcePasteWord&quot;, function() {
+                                ed.windowManager.open({
+                                        file: t.url + &quot;/pasteword.htm&quot;,
+                                        width: parseInt(getParam(ed, &quot;paste_dialog_width&quot;)),
+                                        height: parseInt(getParam(ed, &quot;paste_dialog_height&quot;)),
+                                        inline: 1
+                                });
+                        });
+
+                        if (getParam(ed, &quot;paste_text_use_dialog&quot;)) {
+                                ed.addCommand(&quot;mcePasteText&quot;, function() {
+                                        ed.windowManager.open({
+                                                file : t.url + &quot;/pastetext.htm&quot;,
+                                                width: parseInt(getParam(ed, &quot;paste_dialog_width&quot;)),
+                                                height: parseInt(getParam(ed, &quot;paste_dialog_height&quot;)),
+                                                inline : 1
+                                        });
+                                });
+                        }
+
+                        // Register button for backwards compatibility
+                        ed.addButton(&quot;pasteword&quot;, {title : &quot;paste.paste_word_desc&quot;, cmd : &quot;mcePasteWord&quot;});
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add(&quot;paste&quot;, tinymce.plugins.PastePlugin);
+})();
</ins><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwpincludesjstinymcepluginsspellcheckereditor_plugin_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,436 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+        var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
+
+        tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
+                getInfo : function() {
+                        return {
+                                longname : 'Spellchecker',
+                                author : 'Moxiecode Systems AB',
+                                authorurl : 'http://tinymce.moxiecode.com',
+                                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
+                                version : tinymce.majorVersion + &quot;.&quot; + tinymce.minorVersion
+                        };
+                },
+
+                init : function(ed, url) {
+                        var t = this, cm;
+
+                        t.url = url;
+                        t.editor = ed;
+                        t.rpcUrl = ed.getParam(&quot;spellchecker_rpc_url&quot;, &quot;{backend}&quot;);
+
+                        if (t.rpcUrl == '{backend}') {
+                                // Sniff if the browser supports native spellchecking (Don't know of a better way)
+                                if (tinymce.isIE)
+                                        return;
+
+                                t.hasSupport = true;
+
+                                // Disable the context menu when spellchecking is active
+                                ed.onContextMenu.addToTop(function(ed, e) {
+                                        if (t.active)
+                                                return false;
+                                });
+                        }
+
+                        // Register commands
+                        ed.addCommand('mceSpellCheck', function() {
+                                if (t.rpcUrl == '{backend}') {
+                                        // Enable/disable native spellchecker
+                                        t.editor.getBody().spellcheck = t.active = !t.active;
+                                        return;
+                                }
+
+                                if (!t.active) {
+                                        ed.setProgressState(1);
+                                        t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
+                                                if (r.length &gt; 0) {
+                                                        t.active = 1;
+                                                        t._markWords(r);
+                                                        ed.setProgressState(0);
+                                                        ed.nodeChanged();
+                                                } else {
+                                                        ed.setProgressState(0);
+
+                                                        if (ed.getParam('spellchecker_report_no_misspellings', true))
+                                                                ed.windowManager.alert('spellchecker.no_mpell');
+                                                }
+                                        });
+                                } else
+                                        t._done();
+                        });
+
+                        if (ed.settings.content_css !== false)
+                                ed.contentCSS.push(url + '/css/content.css');
+
+                        ed.onClick.add(t._showMenu, t);
+                        ed.onContextMenu.add(t._showMenu, t);
+                        ed.onBeforeGetContent.add(function() {
+                                if (t.active)
+                                        t._removeWords();
+                        });
+
+                        ed.onNodeChange.add(function(ed, cm) {
+                                cm.setActive('spellchecker', t.active);
+                        });
+
+                        ed.onSetContent.add(function() {
+                                t._done();
+                        });
+
+                        ed.onBeforeGetContent.add(function() {
+                                t._done();
+                        });
+
+                        ed.onBeforeExecCommand.add(function(ed, cmd) {
+                                if (cmd == 'mceFullScreen')
+                                        t._done();
+                        });
+
+                        // Find selected language
+                        t.languages = {};
+                        each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) {
+                                if (k.indexOf('+') === 0) {
+                                        k = k.substring(1);
+                                        t.selectedLang = v;
+                                }
+
+                                t.languages[k] = v;
+                        });
+                },
+
+                createControl : function(n, cm) {
+                        var t = this, c, ed = t.editor;
+
+                        if (n == 'spellchecker') {
+                                // Use basic button if we use the native spellchecker
+                                if (t.rpcUrl == '{backend}') {
+                                        // Create simple toggle button if we have native support
+                                        if (t.hasSupport)
+                                                c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
+
+                                        return c;
+                                }
+
+                                c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
+
+                                c.onRenderMenu.add(function(c, m) {
+                                        m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+                                        each(t.languages, function(v, k) {
+                                                var o = {icon : 1}, mi;
+
+                                                o.onclick = function() {
+                                                        if (v == t.selectedLang) {
+                                                                return;
+                                                        }
+                                                        mi.setSelected(1);
+                                                        t.selectedItem.setSelected(0);
+                                                        t.selectedItem = mi;
+                                                        t.selectedLang = v;
+                                                };
+
+                                                o.title = k;
+                                                mi = m.add(o);
+                                                mi.setSelected(v == t.selectedLang);
+
+                                                if (v == t.selectedLang)
+                                                        t.selectedItem = mi;
+                                        })
+                                });
+
+                                return c;
+                        }
+                },
+
+                // Internal functions
+
+                _walk : function(n, f) {
+                        var d = this.editor.getDoc(), w;
+
+                        if (d.createTreeWalker) {
+                                w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
+
+                                while ((n = w.nextNode()) != null)
+                                        f.call(this, n);
+                        } else
+                                tinymce.walk(n, f, 'childNodes');
+                },
+
+                _getSeparators : function() {
+                        var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!&quot;#$%&amp;()*+,-./:;&lt;=&gt;?@[\]^_{|}\xA7\xA9\xAB\xAE\xB1\xB6\xB7\xB8\xBB\xBC\xBD\xBE\xBF\xD7\xF7\xA4\u201d\u201c');
+
+                        // Build word separator regexp
+                        for (i=0; i&lt;str.length; i++)
+                                re += '\\' + str.charAt(i);
+
+                        return re;
+                },
+
+                _getWords : function() {
+                        var ed = this.editor, wl = [], tx = '', lo = {}, rawWords = [];
+
+                        // Get area text
+                        this._walk(ed.getBody(), function(n) {
+                                if (n.nodeType == 3)
+                                        tx += n.nodeValue + ' ';
+                        });
+
+                        // split the text up into individual words
+                        if (ed.getParam('spellchecker_word_pattern')) {
+                                // look for words that match the pattern
+                                rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi');
+                        } else {
+                                // Split words by separator
+                                tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
+                                tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
+                                rawWords = tx.split(' ');
+                        }
+
+                        // Build word array and remove duplicates
+                        each(rawWords, function(v) {
+                                if (!lo[v]) {
+                                        wl.push(v);
+                                        lo[v] = 1;
+                                }
+                        });
+
+                        return wl;
+                },
+
+                _removeWords : function(w) {
+                        var ed = this.editor, dom = ed.dom, se = ed.selection, b = se.getBookmark();
+
+                        each(dom.select('span').reverse(), function(n) {
+                                if (n &amp;&amp; (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
+                                        if (!w || dom.decode(n.innerHTML) == w)
+                                                dom.remove(n, 1);
+                                }
+                        });
+
+                        se.moveToBookmark(b);
+                },
+
+                _markWords : function(wl) {
+                        var ed = this.editor, dom = ed.dom, doc = ed.getDoc(), se = ed.selection, b = se.getBookmark(), nl = [],
+                                w = wl.join('|'), re = this._getSeparators(), rx = new RegExp('(^|[' + re + '])(' + w + ')(?=[' + re + ']|$)', 'g');
+
+                        // Collect all text nodes
+                        this._walk(ed.getBody(), function(n) {
+                                if (n.nodeType == 3) {
+                                        nl.push(n);
+                                }
+                        });
+
+                        // Wrap incorrect words in spans
+                        each(nl, function(n) {
+                                var node, elem, txt, pos, v = n.nodeValue;
+
+                                if (rx.test(v)) {
+                                        // Encode the content
+                                        v = dom.encode(v);
+                                        // Create container element
+                                        elem = dom.create('span', {'class' : 'mceItemHidden'});
+
+                                        // Following code fixes IE issues by creating text nodes
+                                        // using DOM methods instead of innerHTML.
+                                        // Bug #3124: &lt;PRE&gt; elements content is broken after spellchecking.
+                                        // Bug #1408: Preceding whitespace characters are removed
+                                        // @TODO: I'm not sure that both are still issues on IE9.
+                                        if (tinymce.isIE) {
+                                                // Enclose mispelled words with temporal tag
+                                                v = v.replace(rx, '$1&lt;mcespell&gt;$2&lt;/mcespell&gt;');
+                                                // Loop over the content finding mispelled words
+                                                while ((pos = v.indexOf('&lt;mcespell&gt;')) != -1) {
+                                                        // Add text node for the content before the word
+                                                        txt = v.substring(0, pos);
+                                                        if (txt.length) {
+                                                                node = doc.createTextNode(dom.decode(txt));
+                                                                elem.appendChild(node);
+                                                        }
+                                                        v = v.substring(pos+10);
+                                                        pos = v.indexOf('&lt;/mcespell&gt;');
+                                                        txt = v.substring(0, pos);
+                                                        v = v.substring(pos+11);
+                                                        // Add span element for the word
+                                                        elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt));
+                                                }
+                                                // Add text node for the rest of the content
+                                                if (v.length) {
+                                                        node = doc.createTextNode(dom.decode(v));
+                                                        elem.appendChild(node);
+                                                }
+                                        } else {
+                                                // Other browsers preserve whitespace characters on innerHTML usage
+                                                elem.innerHTML = v.replace(rx, '$1&lt;span class=&quot;mceItemHiddenSpellWord&quot;&gt;$2&lt;/span&gt;');
+                                        }
+
+                                        // Finally, replace the node with the container
+                                        dom.replace(elem, n);
+                                }
+                        });
+
+                        se.moveToBookmark(b);
+                },
+
+                _showMenu : function(ed, e) {
+                        var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target;
+
+                        e = 0; // Fixes IE memory leak
+
+                        if (!m) {
+                                m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'});
+                                t._menu = m;
+                        }
+
+                        if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) {
+                                m.removeAll();
+                                m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+
+                                t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) {
+                                        var ignoreRpc;
+
+                                        m.removeAll();
+
+                                        if (r.length &gt; 0) {
+                                                m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+                                                each(r, function(v) {
+                                                        m.add({title : v, onclick : function() {
+                                                                dom.replace(ed.getDoc().createTextNode(v), wordSpan);
+                                                                t._checkDone();
+                                                        }});
+                                                });
+
+                                                m.addSeparator();
+                                        } else
+                                                m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
+
+                                        if (ed.getParam('show_ignore_words', true)) {
+                                                ignoreRpc = t.editor.getParam(&quot;spellchecker_enable_ignore_rpc&quot;, '');
+                                                m.add({
+                                                        title : 'spellchecker.ignore_word',
+                                                        onclick : function() {
+                                                                var word = wordSpan.innerHTML;
+
+                                                                dom.remove(wordSpan, 1);
+                                                                t._checkDone();
+
+                                                                // tell the server if we need to
+                                                                if (ignoreRpc) {
+                                                                        ed.setProgressState(1);
+                                                                        t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) {
+                                                                                ed.setProgressState(0);
+                                                                        });
+                                                                }
+                                                        }
+                                                });
+
+                                                m.add({
+                                                        title : 'spellchecker.ignore_words',
+                                                        onclick : function() {
+                                                                var word = wordSpan.innerHTML;
+
+                                                                t._removeWords(dom.decode(word));
+                                                                t._checkDone();
+
+                                                                // tell the server if we need to
+                                                                if (ignoreRpc) {
+                                                                        ed.setProgressState(1);
+                                                                        t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) {
+                                                                                ed.setProgressState(0);
+                                                                        });
+                                                                }
+                                                        }
+                                                });
+                                        }
+
+                                        if (t.editor.getParam(&quot;spellchecker_enable_learn_rpc&quot;)) {
+                                                m.add({
+                                                        title : 'spellchecker.learn_word',
+                                                        onclick : function() {
+                                                                var word = wordSpan.innerHTML;
+
+                                                                dom.remove(wordSpan, 1);
+                                                                t._checkDone();
+
+                                                                ed.setProgressState(1);
+                                                                t._sendRPC('learnWord', [t.selectedLang, word], function(r) {
+                                                                        ed.setProgressState(0);
+                                                                });
+                                                        }
+                                                });
+                                        }
+
+                                        m.update();
+                                });
+
+                                p1 = DOM.getPos(ed.getContentAreaContainer());
+                                m.settings.offset_x = p1.x;
+                                m.settings.offset_y = p1.y;
+
+                                ed.selection.select(wordSpan);
+                                p1 = dom.getPos(wordSpan);
+                                m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y);
+
+                                return tinymce.dom.Event.cancel(e);
+                        } else
+                                m.hideMenu();
+                },
+
+                _checkDone : function() {
+                        var t = this, ed = t.editor, dom = ed.dom, o;
+
+                        each(dom.select('span'), function(n) {
+                                if (n &amp;&amp; dom.hasClass(n, 'mceItemHiddenSpellWord')) {
+                                        o = true;
+                                        return false;
+                                }
+                        });
+
+                        if (!o)
+                                t._done();
+                },
+
+                _done : function() {
+                        var t = this, la = t.active;
+
+                        if (t.active) {
+                                t.active = 0;
+                                t._removeWords();
+
+                                if (t._menu)
+                                        t._menu.hideMenu();
+
+                                if (la)
+                                        t.editor.nodeChanged();
+                        }
+                },
+
+                _sendRPC : function(m, p, cb) {
+                        var t = this;
+
+                        JSONRequest.sendRPC({
+                                url : t.rpcUrl,
+                                method : m,
+                                params : p,
+                                success : cb,
+                                error : function(e, x) {
+                                        t.editor.setProgressState(0);
+                                        t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
+                                }
+                        });
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
+})();
</ins><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwpincludesjstinymcepluginstabfocuseditor_plugin_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,122 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+        var DOM = tinymce.DOM, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
+
+        tinymce.create('tinymce.plugins.TabFocusPlugin', {
+                init : function(ed, url) {
+                        function tabCancel(ed, e) {
+                                if (e.keyCode === 9)
+                                        return Event.cancel(e);
+                        }
+
+                        function tabHandler(ed, e) {
+                                var x, i, f, el, v;
+
+                                function find(d) {
+                                        el = DOM.select(':input:enabled,*[tabindex]');
+
+                                        function canSelectRecursive(e) {
+                                                return e.nodeName===&quot;BODY&quot; || (e.type != 'hidden' &amp;&amp;
+                                                        !(e.style.display == &quot;none&quot;) &amp;&amp;
+                                                        !(e.style.visibility == &quot;hidden&quot;) &amp;&amp; canSelectRecursive(e.parentNode));
+                                        }
+                                        function canSelectInOldIe(el) {
+                                                return el.attributes[&quot;tabIndex&quot;].specified || el.nodeName == &quot;INPUT&quot; || el.nodeName == &quot;TEXTAREA&quot;;
+                                        }
+                                        function isOldIe() {
+                                                return tinymce.isIE6 || tinymce.isIE7;
+                                        }
+                                        function canSelect(el) {
+                                                return ((!isOldIe() || canSelectInOldIe(el))) &amp;&amp; el.getAttribute(&quot;tabindex&quot;) != '-1' &amp;&amp; canSelectRecursive(el);
+                                        }
+
+                                        each(el, function(e, i) {
+                                                if (e.id == ed.id) {
+                                                        x = i;
+                                                        return false;
+                                                }
+                                        });
+                                        if (d &gt; 0) {
+                                                for (i = x + 1; i &lt; el.length; i++) {
+                                                        if (canSelect(el[i]))
+                                                                return el[i];
+                                                }
+                                        } else {
+                                                for (i = x - 1; i &gt;= 0; i--) {
+                                                        if (canSelect(el[i]))
+                                                                return el[i];
+                                                }
+                                        }
+
+                                        return null;
+                                }
+
+                                if (e.keyCode === 9) {
+                                        v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
+
+                                        if (v.length == 1) {
+                                                v[1] = v[0];
+                                                v[0] = ':prev';
+                                        }
+
+                                        // Find element to focus
+                                        if (e.shiftKey) {
+                                                if (v[0] == ':prev')
+                                                        el = find(-1);
+                                                else
+                                                        el = DOM.get(v[0]);
+                                        } else {
+                                                if (v[1] == ':next')
+                                                        el = find(1);
+                                                else
+                                                        el = DOM.get(v[1]);
+                                        }
+
+                                        if (el) {
+                                                if (el.id &amp;&amp; (ed = tinymce.get(el.id || el.name)))
+                                                        ed.focus();
+                                                else
+                                                        window.setTimeout(function() {
+                                                                if (!tinymce.isWebKit)
+                                                                        window.focus();
+                                                                el.focus();
+                                                        }, 10);
+
+                                                return Event.cancel(e);
+                                        }
+                                }
+                        }
+
+                        ed.onKeyUp.add(tabCancel);
+
+                        if (tinymce.isGecko) {
+                                ed.onKeyPress.add(tabHandler);
+                                ed.onKeyDown.add(tabCancel);
+                        } else
+                                ed.onKeyDown.add(tabHandler);
+
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'Tabfocus',
+                                author : 'Moxiecode Systems AB',
+                                authorurl : 'http://tinymce.moxiecode.com',
+                                infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
+                                version : tinymce.majorVersion + &quot;.&quot; + tinymce.minorVersion
+                        };
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
+})();
</ins><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkwpincludesjstinymcepluginswordpresseditor_plugindevjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js (19944 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js        2012-02-17 23:40:02 UTC (rev 19944)
+++ trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -1,413 +0,0 @@
</span><del>-/**
- * WordPress plugin.
- */
-
-(function() {
-        var DOM = tinymce.DOM;
-
-        tinymce.create('tinymce.plugins.WordPress', {
-                mceTout : 0,
-
-                init : function(ed, url) {
-                        var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML;
-                        moreHTML = '&lt;img src=&quot;' + url + '/img/trans.gif&quot; class=&quot;mceWPmore mceItemNoResize&quot; title=&quot;'+ed.getLang('wordpress.wp_more_alt')+'&quot; /&gt;';
-                        nextpageHTML = '&lt;img src=&quot;' + url + '/img/trans.gif&quot; class=&quot;mceWPnextpage mceItemNoResize&quot; title=&quot;'+ed.getLang('wordpress.wp_page_alt')+'&quot; /&gt;';
-
-                        if ( getUserSetting('hidetb', '0') == '1' )
-                                ed.settings.wordpress_adv_hidden = 0;
-
-                        // Hides the specified toolbar and resizes the iframe
-                        ed.onPostRender.add(function() {
-                                var adv_toolbar = ed.controlManager.get(tbId);
-                                if ( ed.getParam('wordpress_adv_hidden', 1) &amp;&amp; adv_toolbar ) {
-                                        DOM.hide(adv_toolbar.id);
-                                        t._resizeIframe(ed, tbId, 28);
-                                }
-                        });
-
-                        // Register commands
-                        ed.addCommand('WP_More', function() {
-                                ed.execCommand('mceInsertContent', 0, moreHTML);
-                        });
-
-                        ed.addCommand('WP_Page', function() {
-                                ed.execCommand('mceInsertContent', 0, nextpageHTML);
-                        });
-
-                        ed.addCommand('WP_Help', function() {
-                                ed.windowManager.open({
-                                        url : tinymce.baseURL + '/wp-mce-help.php',
-                                        width : 450,
-                                        height : 420,
-                                        inline : 1
-                                });
-                        });
-
-                        ed.addCommand('WP_Adv', function() {
-                                var cm = ed.controlManager, id = cm.get(tbId).id;
-
-                                if ( 'undefined' == id )
-                                        return;
-
-                                if ( DOM.isHidden(id) ) {
-                                        cm.setActive('wp_adv', 1);
-                                        DOM.show(id);
-                                        t._resizeIframe(ed, tbId, -28);
-                                        ed.settings.wordpress_adv_hidden = 0;
-                                        setUserSetting('hidetb', '1');
-                                } else {
-                                        cm.setActive('wp_adv', 0);
-                                        DOM.hide(id);
-                                        t._resizeIframe(ed, tbId, 28);
-                                        ed.settings.wordpress_adv_hidden = 1;
-                                        setUserSetting('hidetb', '0');
-                                }
-                        });
-                        
-                        ed.addCommand('WP_Medialib', function() {
-                                var id = ed.getParam('wp_fullscreen_editor_id') || ed.getParam('fullscreen_editor_id') || ed.id,
-                                        link = tinymce.DOM.select('#wp-' + id + '-media-buttons a.thickbox');
-
-                                if ( link &amp;&amp; link[0] )
-                                        link = link[0];
-                                else
-                                        return;
-
-                                tb_show('', link.href);
-                                tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
-                        });
-
-                        // Register buttons
-                        ed.addButton('wp_more', {
-                                title : 'wordpress.wp_more_desc',
-                                cmd : 'WP_More'
-                        });
-
-                        ed.addButton('wp_page', {
-                                title : 'wordpress.wp_page_desc',
-                                image : url + '/img/page.gif',
-                                cmd : 'WP_Page'
-                        });
-
-                        ed.addButton('wp_help', {
-                                title : 'wordpress.wp_help_desc',
-                                cmd : 'WP_Help'
-                        });
-
-                        ed.addButton('wp_adv', {
-                                title : 'wordpress.wp_adv_desc',
-                                cmd : 'WP_Adv'
-                        });
-
-                        // Add Media button
-                        ed.addButton('add_media', {
-                                title : 'wordpress.add_media',
-                                image : url + '/img/image.gif',
-                                cmd : 'WP_Medialib'
-                        });
-
-                        // Add Media buttons to fullscreen and handle align buttons for image captions
-                        ed.onBeforeExecCommand.add(function(ed, cmd, ui, val, o) {
-                                var DOM = tinymce.DOM, n, DL, DIV, cls, a, align;
-                                if ( 'mceFullScreen' == cmd ) {
-                                        if ( 'mce_fullscreen' != ed.id &amp;&amp; DOM.select('a.thickbox').length )
-                                                ed.settings.theme_advanced_buttons1 += ',|,add_media';
-                                }
-
-                                if ( 'JustifyLeft' == cmd || 'JustifyRight' == cmd || 'JustifyCenter' == cmd ) {
-                                        n = ed.selection.getNode();
-
-                                        if ( n.nodeName == 'IMG' ) {
-                                                align = cmd.substr(7).toLowerCase();
-                                                a = 'align' + align;
-                                                DL = ed.dom.getParent(n, 'dl.wp-caption');
-                                                DIV = ed.dom.getParent(n, 'div.mceTemp');
-
-                                                if ( DL &amp;&amp; DIV ) {
-                                                        cls = ed.dom.hasClass(DL, a) ? 'alignnone' : a;
-                                                        DL.className = DL.className.replace(/align[^ '&quot;]+\s?/g, '');
-                                                        ed.dom.addClass(DL, cls);
-
-                                                        if (cls == 'aligncenter')
-                                                                ed.dom.addClass(DIV, 'mceIEcenter');
-                                                        else
-                                                                ed.dom.removeClass(DIV, 'mceIEcenter');
-
-                                                        o.terminate = true;
-                                                        ed.execCommand('mceRepaint');
-                                                } else {
-                                                        if ( ed.dom.hasClass(n, a) )
-                                                                ed.dom.addClass(n, 'alignnone');
-                                                        else
-                                                                ed.dom.removeClass(n, 'alignnone');
-                                                }
-                                        }
-                                }
-                        });
-                        
-                        ed.onInit.add(function(ed) {
-                                var bodyClass = ed.getParam('body_class', '');
-
-                                // make sure these run last
-                                ed.onNodeChange.add( function(ed, cm, e) {
-                                        var DL;
-
-                                        if ( e.nodeName == 'IMG' ) {
-                                                DL = ed.dom.getParent(e, 'dl.wp-caption');
-                                        } else if ( e.nodeName == 'DIV' &amp;&amp; ed.dom.hasClass(e, 'mceTemp') ) {
-                                                DL = e.firstChild;
-
-                                                if ( ! ed.dom.hasClass(DL, 'wp-caption') )
-                                                        DL = false;
-                                        }
-
-                                        if ( DL ) {
-                                                if ( ed.dom.hasClass(DL, 'alignleft') )
-                                                        cm.setActive('justifyleft', 1);
-                                                else if ( ed.dom.hasClass(DL, 'alignright') )
-                                                        cm.setActive('justifyright', 1);
-                                                else if ( ed.dom.hasClass(DL, 'aligncenter') )
-                                                        cm.setActive('justifycenter', 1);
-                                        }
-                                });
-
-                                if ( ed.id != 'wp_mce_fullscreen' &amp;&amp; ed.id != 'mce_fullscreen' )
-                                        ed.dom.addClass(ed.getBody(), 'wp-editor');
-                                else if ( ed.id == 'mce_fullscreen' )
-                                        ed.dom.addClass(ed.getBody(), 'mce-fullscreen');
-
-                                // remove invalid parent paragraphs when pasting HTML and/or switching to the HTML editor and back
-                                ed.onBeforeSetContent.add(function(ed, o) {
-                                        if ( o.content ) {
-                                                o.content = o.content.replace(/&lt;p&gt;\s*&lt;(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^&gt;]*)?&gt;/gi, '&lt;$1$2&gt;');
-                                                o.content = o.content.replace(/&lt;\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)&gt;\s*&lt;\/p&gt;/gi, '&lt;/$1&gt;');
-                                        }
-                                });
-
-                                if ( bodyClass )
-                                        ed.dom.addClass(ed.getBody(), bodyClass);
-                        });
-
-                        // Word count
-                        if ( 'undefined' != typeof(jQuery) ) {
-                                ed.onKeyUp.add(function(ed, e) {
-                                        var k = e.keyCode || e.charCode;
-
-                                        if ( k == last )
-                                                return;
-
-                                        if ( 13 == k || 8 == last || 46 == last )
-                                                jQuery(document).triggerHandler('wpcountwords', [ ed.getContent({format : 'raw'}) ]);
-
-                                        last = k;
-                                });
-                        };
-
-                        // keep empty paragraphs :(
-                        ed.onSaveContent.addToTop(function(ed, o) {
-                                o.content = o.content.replace(/&lt;p&gt;(&lt;br ?\/?&gt;|\u00a0|\uFEFF)?&lt;\/p&gt;/g, '&lt;p&gt;&amp;nbsp;&lt;/p&gt;');
-                        });
-
-                        ed.onSaveContent.add(function(ed, o) {
-                                if ( ed.getParam('wpautop', true) &amp;&amp; typeof(switchEditors) == 'object' ) {
-                                        if ( ed.isHidden() )
-                                                o.content = o.element.value;
-                                        else
-                                                o.content = switchEditors.pre_wpautop(o.content);
-                                }
-                        });
-
-                        /* disable for now
-                        ed.onBeforeSetContent.add(function(ed, o) {
-                                o.content = t._setEmbed(o.content);
-                        });
-
-                        ed.onPostProcess.add(function(ed, o) {
-                                if ( o.get )
-                                        o.content = t._getEmbed(o.content);
-                        });
-                        */
-
-                        // Add listeners to handle more break
-                        t._handleMoreBreak(ed, url);
-
-                        // Add custom shortcuts
-                        ed.addShortcut('alt+shift+c', ed.getLang('justifycenter_desc'), 'JustifyCenter');
-                        ed.addShortcut('alt+shift+r', ed.getLang('justifyright_desc'), 'JustifyRight');
-                        ed.addShortcut('alt+shift+l', ed.getLang('justifyleft_desc'), 'JustifyLeft');
-                        ed.addShortcut('alt+shift+j', ed.getLang('justifyfull_desc'), 'JustifyFull');
-                        ed.addShortcut('alt+shift+q', ed.getLang('blockquote_desc'), 'mceBlockQuote');
-                        ed.addShortcut('alt+shift+u', ed.getLang('bullist_desc'), 'InsertUnorderedList');
-                        ed.addShortcut('alt+shift+o', ed.getLang('numlist_desc'), 'InsertOrderedList');
-                        ed.addShortcut('alt+shift+d', ed.getLang('striketrough_desc'), 'Strikethrough');
-                        ed.addShortcut('alt+shift+n', ed.getLang('spellchecker.desc'), 'mceSpellCheck');
-                        ed.addShortcut('alt+shift+a', ed.getLang('link_desc'), 'mceLink');
-                        ed.addShortcut('alt+shift+s', ed.getLang('unlink_desc'), 'unlink');
-                        ed.addShortcut('alt+shift+m', ed.getLang('image_desc'), 'WP_Medialib');
-                        ed.addShortcut('alt+shift+g', ed.getLang('fullscreen.desc'), 'mceFullScreen');
-                        ed.addShortcut('alt+shift+z', ed.getLang('wp_adv_desc'), 'WP_Adv');
-                        ed.addShortcut('alt+shift+h', ed.getLang('help_desc'), 'WP_Help');
-                        ed.addShortcut('alt+shift+t', ed.getLang('wp_more_desc'), 'WP_More');
-                        ed.addShortcut('alt+shift+p', ed.getLang('wp_page_desc'), 'WP_Page');
-                        ed.addShortcut('ctrl+s', ed.getLang('save_desc'), function(){if('function'==typeof autosave)autosave();});
-
-                        if ( tinymce.isWebKit ) {
-                                ed.addShortcut('alt+shift+b', ed.getLang('bold_desc'), 'Bold');
-                                ed.addShortcut('alt+shift+i', ed.getLang('italic_desc'), 'Italic');
-                        }
-
-                        ed.onInit.add(function(ed) {
-                                tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) {
-                                        ed.plugins.wordpress._hideButtons();
-                                });
-                                tinymce.dom.Event.add(ed.getBody(), 'dragstart', function(e) {
-                                        ed.plugins.wordpress._hideButtons();
-                                });
-                        });
-
-                        ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
-                                ed.plugins.wordpress._hideButtons();
-                        });
-
-                        ed.onSaveContent.add(function(ed, o) {
-                                ed.plugins.wordpress._hideButtons();
-                        });
-
-                        ed.onMouseDown.add(function(ed, e) {
-                                if ( e.target.nodeName != 'IMG' )
-                                        ed.plugins.wordpress._hideButtons();
-                        });
-                },
-
-                getInfo : function() {
-                        return {
-                                longname : 'WordPress Plugin',
-                                author : 'WordPress', // add Moxiecode?
-                                authorurl : 'http://wordpress.org',
-                                infourl : 'http://wordpress.org',
-                                version : '3.0'
-                        };
-                },
-
-                // Internal functions
-                _setEmbed : function(c) {
-                        return c.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g, function(a,b){
-                                return '&lt;img width=&quot;300&quot; height=&quot;200&quot; src=&quot;' + tinymce.baseURL + '/plugins/wordpress/img/trans.gif&quot; class=&quot;wp-oembed mceItemNoResize&quot; alt=&quot;'+b+'&quot; title=&quot;'+b+'&quot; /&gt;';
-                        });
-                },
-
-                _getEmbed : function(c) {
-                        return c.replace(/&lt;img[^&gt;]+&gt;/g, function(a) {
-                                if ( a.indexOf('class=&quot;wp-oembed') != -1 ) {
-                                        var u = a.match(/alt=&quot;([^\&quot;]+)&quot;/);
-                                        if ( u[1] )
-                                                a = '[embed]' + u[1] + '[/embed]';
-                                }
-                                return a;
-                        });
-                },
-
-                _showButtons : function(n, id) {
-                        var ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y;
-
-                        vp = ed.dom.getViewPort(ed.getWin());
-                        p1 = DOM.getPos(ed.getContentAreaContainer());
-                        p2 = ed.dom.getPos(n);
-
-                        X = Math.max(p2.x - vp.x, 0) + p1.x;
-                        Y = Math.max(p2.y - vp.y, 0) + p1.y;
-
-                        DOM.setStyles(id, {
-                                'top' : Y+5+'px',
-                                'left' : X+5+'px',
-                                'display' : 'block'
-                        });
-
-                        if ( this.mceTout )
-                                clearTimeout(this.mceTout);
-
-                        this.mceTout = setTimeout( function(){ed.plugins.wordpress._hideButtons();}, 5000 );
-                },
-
-                _hideButtons : function() {
-                        if ( !this.mceTout )
-                                return;
-
-                        if ( document.getElementById('wp_editbtns') )
-                                tinymce.DOM.hide('wp_editbtns');
-
-                        if ( document.getElementById('wp_gallerybtns') )
-                                tinymce.DOM.hide('wp_gallerybtns');
-
-                        clearTimeout(this.mceTout);
-                        this.mceTout = 0;
-                },
-
-                // Resizes the iframe by a relative height value
-                _resizeIframe : function(ed, tb_id, dy) {
-                        var ifr = ed.getContentAreaContainer().firstChild;
-
-                        DOM.setStyle(ifr, 'height', ifr.clientHeight + dy); // Resize iframe
-                        ed.theme.deltaHeight += dy; // For resize cookie
-                },
-
-                _handleMoreBreak : function(ed, url) {
-                        var moreHTML, nextpageHTML;
-
-                        moreHTML = '&lt;img src=&quot;' + url + '/img/trans.gif&quot; alt=&quot;$1&quot; class=&quot;mceWPmore mceItemNoResize&quot; title=&quot;'+ed.getLang('wordpress.wp_more_alt')+'&quot; /&gt;';
-                        nextpageHTML = '&lt;img src=&quot;' + url + '/img/trans.gif&quot; class=&quot;mceWPnextpage mceItemNoResize&quot; title=&quot;'+ed.getLang('wordpress.wp_page_alt')+'&quot; /&gt;';
-
-                        // Load plugin specific CSS into editor
-                        ed.onInit.add(function() {
-                                ed.dom.loadCSS(url + '/css/content.css');
-                        });
-
-                        // Display morebreak instead if img in element path
-                        ed.onPostRender.add(function() {
-                                if (ed.theme.onResolveName) {
-                                        ed.theme.onResolveName.add(function(th, o) {
-                                                if (o.node.nodeName == 'IMG') {
-                                                        if ( ed.dom.hasClass(o.node, 'mceWPmore') )
-                                                                o.name = 'wpmore';
-                                                        if ( ed.dom.hasClass(o.node, 'mceWPnextpage') )
-                                                                o.name = 'wppage';
-                                                }
-
-                                        });
-                                }
-                        });
-
-                        // Replace morebreak with images
-                        ed.onBeforeSetContent.add(function(ed, o) {
-                                if ( o.content ) {
-                                        o.content = o.content.replace(/&lt;!--more(.*?)--&gt;/g, moreHTML);
-                                        o.content = o.content.replace(/&lt;!--nextpage--&gt;/g, nextpageHTML);
-                                }
-                        });
-
-                        // Replace images with morebreak
-                        ed.onPostProcess.add(function(ed, o) {
-                                if (o.get)
-                                        o.content = o.content.replace(/&lt;img[^&gt;]+&gt;/g, function(im) {
-                                                if (im.indexOf('class=&quot;mceWPmore') !== -1) {
-                                                        var m, moretext = (m = im.match(/alt=&quot;(.*?)&quot;/)) ? m[1] : '';
-                                                        im = '&lt;!--more'+moretext+'--&gt;';
-                                                }
-                                                if (im.indexOf('class=&quot;mceWPnextpage') !== -1)
-                                                        im = '&lt;!--nextpage--&gt;';
-
-                                                return im;
-                                        });
-                        });
-
-                        // Set active buttons if user selected pagebreak or more break
-                        ed.onNodeChange.add(function(ed, cm, n) {
-                                cm.setActive('wp_page', n.nodeName === 'IMG' &amp;&amp; ed.dom.hasClass(n, 'mceWPnextpage'));
-                                cm.setActive('wp_more', n.nodeName === 'IMG' &amp;&amp; ed.dom.hasClass(n, 'mceWPmore'));
-                        });
-                }
-        });
-
-        // Register plugin
-        tinymce.PluginManager.add('wordpress', tinymce.plugins.WordPress);
-})();
</del></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswordpresseditor_plugin_srcjsfromrev19941trunkwpincludesjstinymcepluginswordpresseditor_plugindevjs"></a>
<div class="copfile"><h4>Copied: trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js (from rev 19941, trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.dev.js) (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,413 @@
</span><ins>+/**
+ * WordPress plugin.
+ */
+
+(function() {
+        var DOM = tinymce.DOM;
+
+        tinymce.create('tinymce.plugins.WordPress', {
+                mceTout : 0,
+
+                init : function(ed, url) {
+                        var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML;
+                        moreHTML = '&lt;img src=&quot;' + url + '/img/trans.gif&quot; class=&quot;mceWPmore mceItemNoResize&quot; title=&quot;'+ed.getLang('wordpress.wp_more_alt')+'&quot; /&gt;';
+                        nextpageHTML = '&lt;img src=&quot;' + url + '/img/trans.gif&quot; class=&quot;mceWPnextpage mceItemNoResize&quot; title=&quot;'+ed.getLang('wordpress.wp_page_alt')+'&quot; /&gt;';
+
+                        if ( getUserSetting('hidetb', '0') == '1' )
+                                ed.settings.wordpress_adv_hidden = 0;
+
+                        // Hides the specified toolbar and resizes the iframe
+                        ed.onPostRender.add(function() {
+                                var adv_toolbar = ed.controlManager.get(tbId);
+                                if ( ed.getParam('wordpress_adv_hidden', 1) &amp;&amp; adv_toolbar ) {
+                                        DOM.hide(adv_toolbar.id);
+                                        t._resizeIframe(ed, tbId, 28);
+                                }
+                        });
+
+                        // Register commands
+                        ed.addCommand('WP_More', function() {
+                                ed.execCommand('mceInsertContent', 0, moreHTML);
+                        });
+
+                        ed.addCommand('WP_Page', function() {
+                                ed.execCommand('mceInsertContent', 0, nextpageHTML);
+                        });
+
+                        ed.addCommand('WP_Help', function() {
+                                ed.windowManager.open({
+                                        url : tinymce.baseURL + '/wp-mce-help.php',
+                                        width : 450,
+                                        height : 420,
+                                        inline : 1
+                                });
+                        });
+
+                        ed.addCommand('WP_Adv', function() {
+                                var cm = ed.controlManager, id = cm.get(tbId).id;
+
+                                if ( 'undefined' == id )
+                                        return;
+
+                                if ( DOM.isHidden(id) ) {
+                                        cm.setActive('wp_adv', 1);
+                                        DOM.show(id);
+                                        t._resizeIframe(ed, tbId, -28);
+                                        ed.settings.wordpress_adv_hidden = 0;
+                                        setUserSetting('hidetb', '1');
+                                } else {
+                                        cm.setActive('wp_adv', 0);
+                                        DOM.hide(id);
+                                        t._resizeIframe(ed, tbId, 28);
+                                        ed.settings.wordpress_adv_hidden = 1;
+                                        setUserSetting('hidetb', '0');
+                                }
+                        });
+                        
+                        ed.addCommand('WP_Medialib', function() {
+                                var id = ed.getParam('wp_fullscreen_editor_id') || ed.getParam('fullscreen_editor_id') || ed.id,
+                                        link = tinymce.DOM.select('#wp-' + id + '-media-buttons a.thickbox');
+
+                                if ( link &amp;&amp; link[0] )
+                                        link = link[0];
+                                else
+                                        return;
+
+                                tb_show('', link.href);
+                                tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
+                        });
+
+                        // Register buttons
+                        ed.addButton('wp_more', {
+                                title : 'wordpress.wp_more_desc',
+                                cmd : 'WP_More'
+                        });
+
+                        ed.addButton('wp_page', {
+                                title : 'wordpress.wp_page_desc',
+                                image : url + '/img/page.gif',
+                                cmd : 'WP_Page'
+                        });
+
+                        ed.addButton('wp_help', {
+                                title : 'wordpress.wp_help_desc',
+                                cmd : 'WP_Help'
+                        });
+
+                        ed.addButton('wp_adv', {
+                                title : 'wordpress.wp_adv_desc',
+                                cmd : 'WP_Adv'
+                        });
+
+                        // Add Media button
+                        ed.addButton('add_media', {
+                                title : 'wordpress.add_media',
+                                image : url + '/img/image.gif',
+                                cmd : 'WP_Medialib'
+                        });
+
+                        // Add Media buttons to fullscreen and handle align buttons for image captions
+                        ed.onBeforeExecCommand.add(function(ed, cmd, ui, val, o) {
+                                var DOM = tinymce.DOM, n, DL, DIV, cls, a, align;
+                                if ( 'mceFullScreen' == cmd ) {
+                                        if ( 'mce_fullscreen' != ed.id &amp;&amp; DOM.select('a.thickbox').length )
+                                                ed.settings.theme_advanced_buttons1 += ',|,add_media';
+                                }
+
+                                if ( 'JustifyLeft' == cmd || 'JustifyRight' == cmd || 'JustifyCenter' == cmd ) {
+                                        n = ed.selection.getNode();
+
+                                        if ( n.nodeName == 'IMG' ) {
+                                                align = cmd.substr(7).toLowerCase();
+                                                a = 'align' + align;
+                                                DL = ed.dom.getParent(n, 'dl.wp-caption');
+                                                DIV = ed.dom.getParent(n, 'div.mceTemp');
+
+                                                if ( DL &amp;&amp; DIV ) {
+                                                        cls = ed.dom.hasClass(DL, a) ? 'alignnone' : a;
+                                                        DL.className = DL.className.replace(/align[^ '&quot;]+\s?/g, '');
+                                                        ed.dom.addClass(DL, cls);
+
+                                                        if (cls == 'aligncenter')
+                                                                ed.dom.addClass(DIV, 'mceIEcenter');
+                                                        else
+                                                                ed.dom.removeClass(DIV, 'mceIEcenter');
+
+                                                        o.terminate = true;
+                                                        ed.execCommand('mceRepaint');
+                                                } else {
+                                                        if ( ed.dom.hasClass(n, a) )
+                                                                ed.dom.addClass(n, 'alignnone');
+                                                        else
+                                                                ed.dom.removeClass(n, 'alignnone');
+                                                }
+                                        }
+                                }
+                        });
+                        
+                        ed.onInit.add(function(ed) {
+                                var bodyClass = ed.getParam('body_class', '');
+
+                                // make sure these run last
+                                ed.onNodeChange.add( function(ed, cm, e) {
+                                        var DL;
+
+                                        if ( e.nodeName == 'IMG' ) {
+                                                DL = ed.dom.getParent(e, 'dl.wp-caption');
+                                        } else if ( e.nodeName == 'DIV' &amp;&amp; ed.dom.hasClass(e, 'mceTemp') ) {
+                                                DL = e.firstChild;
+
+                                                if ( ! ed.dom.hasClass(DL, 'wp-caption') )
+                                                        DL = false;
+                                        }
+
+                                        if ( DL ) {
+                                                if ( ed.dom.hasClass(DL, 'alignleft') )
+                                                        cm.setActive('justifyleft', 1);
+                                                else if ( ed.dom.hasClass(DL, 'alignright') )
+                                                        cm.setActive('justifyright', 1);
+                                                else if ( ed.dom.hasClass(DL, 'aligncenter') )
+                                                        cm.setActive('justifycenter', 1);
+                                        }
+                                });
+
+                                if ( ed.id != 'wp_mce_fullscreen' &amp;&amp; ed.id != 'mce_fullscreen' )
+                                        ed.dom.addClass(ed.getBody(), 'wp-editor');
+                                else if ( ed.id == 'mce_fullscreen' )
+                                        ed.dom.addClass(ed.getBody(), 'mce-fullscreen');
+
+                                // remove invalid parent paragraphs when pasting HTML and/or switching to the HTML editor and back
+                                ed.onBeforeSetContent.add(function(ed, o) {
+                                        if ( o.content ) {
+                                                o.content = o.content.replace(/&lt;p&gt;\s*&lt;(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^&gt;]*)?&gt;/gi, '&lt;$1$2&gt;');
+                                                o.content = o.content.replace(/&lt;\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)&gt;\s*&lt;\/p&gt;/gi, '&lt;/$1&gt;');
+                                        }
+                                });
+
+                                if ( bodyClass )
+                                        ed.dom.addClass(ed.getBody(), bodyClass);
+                        });
+
+                        // Word count
+                        if ( 'undefined' != typeof(jQuery) ) {
+                                ed.onKeyUp.add(function(ed, e) {
+                                        var k = e.keyCode || e.charCode;
+
+                                        if ( k == last )
+                                                return;
+
+                                        if ( 13 == k || 8 == last || 46 == last )
+                                                jQuery(document).triggerHandler('wpcountwords', [ ed.getContent({format : 'raw'}) ]);
+
+                                        last = k;
+                                });
+                        };
+
+                        // keep empty paragraphs :(
+                        ed.onSaveContent.addToTop(function(ed, o) {
+                                o.content = o.content.replace(/&lt;p&gt;(&lt;br ?\/?&gt;|\u00a0|\uFEFF)?&lt;\/p&gt;/g, '&lt;p&gt;&amp;nbsp;&lt;/p&gt;');
+                        });
+
+                        ed.onSaveContent.add(function(ed, o) {
+                                if ( ed.getParam('wpautop', true) &amp;&amp; typeof(switchEditors) == 'object' ) {
+                                        if ( ed.isHidden() )
+                                                o.content = o.element.value;
+                                        else
+                                                o.content = switchEditors.pre_wpautop(o.content);
+                                }
+                        });
+
+                        /* disable for now
+                        ed.onBeforeSetContent.add(function(ed, o) {
+                                o.content = t._setEmbed(o.content);
+                        });
+
+                        ed.onPostProcess.add(function(ed, o) {
+                                if ( o.get )
+                                        o.content = t._getEmbed(o.content);
+                        });
+                        */
+
+                        // Add listeners to handle more break
+                        t._handleMoreBreak(ed, url);
+
+                        // Add custom shortcuts
+                        ed.addShortcut('alt+shift+c', ed.getLang('justifycenter_desc'), 'JustifyCenter');
+                        ed.addShortcut('alt+shift+r', ed.getLang('justifyright_desc'), 'JustifyRight');
+                        ed.addShortcut('alt+shift+l', ed.getLang('justifyleft_desc'), 'JustifyLeft');
+                        ed.addShortcut('alt+shift+j', ed.getLang('justifyfull_desc'), 'JustifyFull');
+                        ed.addShortcut('alt+shift+q', ed.getLang('blockquote_desc'), 'mceBlockQuote');
+                        ed.addShortcut('alt+shift+u', ed.getLang('bullist_desc'), 'InsertUnorderedList');
+                        ed.addShortcut('alt+shift+o', ed.getLang('numlist_desc'), 'InsertOrderedList');
+                        ed.addShortcut('alt+shift+d', ed.getLang('striketrough_desc'), 'Strikethrough');
+                        ed.addShortcut('alt+shift+n', ed.getLang('spellchecker.desc'), 'mceSpellCheck');
+                        ed.addShortcut('alt+shift+a', ed.getLang('link_desc'), 'mceLink');
+                        ed.addShortcut('alt+shift+s', ed.getLang('unlink_desc'), 'unlink');
+                        ed.addShortcut('alt+shift+m', ed.getLang('image_desc'), 'WP_Medialib');
+                        ed.addShortcut('alt+shift+g', ed.getLang('fullscreen.desc'), 'mceFullScreen');
+                        ed.addShortcut('alt+shift+z', ed.getLang('wp_adv_desc'), 'WP_Adv');
+                        ed.addShortcut('alt+shift+h', ed.getLang('help_desc'), 'WP_Help');
+                        ed.addShortcut('alt+shift+t', ed.getLang('wp_more_desc'), 'WP_More');
+                        ed.addShortcut('alt+shift+p', ed.getLang('wp_page_desc'), 'WP_Page');
+                        ed.addShortcut('ctrl+s', ed.getLang('save_desc'), function(){if('function'==typeof autosave)autosave();});
+
+                        if ( tinymce.isWebKit ) {
+                                ed.addShortcut('alt+shift+b', ed.getLang('bold_desc'), 'Bold');
+                                ed.addShortcut('alt+shift+i', ed.getLang('italic_desc'), 'Italic');
+                        }
+
+                        ed.onInit.add(function(ed) {
+                                tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) {
+                                        ed.plugins.wordpress._hideButtons();
+                                });
+                                tinymce.dom.Event.add(ed.getBody(), 'dragstart', function(e) {
+                                        ed.plugins.wordpress._hideButtons();
+                                });
+                        });
+
+                        ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
+                                ed.plugins.wordpress._hideButtons();
+                        });
+
+                        ed.onSaveContent.add(function(ed, o) {
+                                ed.plugins.wordpress._hideButtons();
+                        });
+
+                        ed.onMouseDown.add(function(ed, e) {
+                                if ( e.target.nodeName != 'IMG' )
+                                        ed.plugins.wordpress._hideButtons();
+                        });
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'WordPress Plugin',
+                                author : 'WordPress', // add Moxiecode?
+                                authorurl : 'http://wordpress.org',
+                                infourl : 'http://wordpress.org',
+                                version : '3.0'
+                        };
+                },
+
+                // Internal functions
+                _setEmbed : function(c) {
+                        return c.replace(/\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g, function(a,b){
+                                return '&lt;img width=&quot;300&quot; height=&quot;200&quot; src=&quot;' + tinymce.baseURL + '/plugins/wordpress/img/trans.gif&quot; class=&quot;wp-oembed mceItemNoResize&quot; alt=&quot;'+b+'&quot; title=&quot;'+b+'&quot; /&gt;';
+                        });
+                },
+
+                _getEmbed : function(c) {
+                        return c.replace(/&lt;img[^&gt;]+&gt;/g, function(a) {
+                                if ( a.indexOf('class=&quot;wp-oembed') != -1 ) {
+                                        var u = a.match(/alt=&quot;([^\&quot;]+)&quot;/);
+                                        if ( u[1] )
+                                                a = '[embed]' + u[1] + '[/embed]';
+                                }
+                                return a;
+                        });
+                },
+
+                _showButtons : function(n, id) {
+                        var ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y;
+
+                        vp = ed.dom.getViewPort(ed.getWin());
+                        p1 = DOM.getPos(ed.getContentAreaContainer());
+                        p2 = ed.dom.getPos(n);
+
+                        X = Math.max(p2.x - vp.x, 0) + p1.x;
+                        Y = Math.max(p2.y - vp.y, 0) + p1.y;
+
+                        DOM.setStyles(id, {
+                                'top' : Y+5+'px',
+                                'left' : X+5+'px',
+                                'display' : 'block'
+                        });
+
+                        if ( this.mceTout )
+                                clearTimeout(this.mceTout);
+
+                        this.mceTout = setTimeout( function(){ed.plugins.wordpress._hideButtons();}, 5000 );
+                },
+
+                _hideButtons : function() {
+                        if ( !this.mceTout )
+                                return;
+
+                        if ( document.getElementById('wp_editbtns') )
+                                tinymce.DOM.hide('wp_editbtns');
+
+                        if ( document.getElementById('wp_gallerybtns') )
+                                tinymce.DOM.hide('wp_gallerybtns');
+
+                        clearTimeout(this.mceTout);
+                        this.mceTout = 0;
+                },
+
+                // Resizes the iframe by a relative height value
+                _resizeIframe : function(ed, tb_id, dy) {
+                        var ifr = ed.getContentAreaContainer().firstChild;
+
+                        DOM.setStyle(ifr, 'height', ifr.clientHeight + dy); // Resize iframe
+                        ed.theme.deltaHeight += dy; // For resize cookie
+                },
+
+                _handleMoreBreak : function(ed, url) {
+                        var moreHTML, nextpageHTML;
+
+                        moreHTML = '&lt;img src=&quot;' + url + '/img/trans.gif&quot; alt=&quot;$1&quot; class=&quot;mceWPmore mceItemNoResize&quot; title=&quot;'+ed.getLang('wordpress.wp_more_alt')+'&quot; /&gt;';
+                        nextpageHTML = '&lt;img src=&quot;' + url + '/img/trans.gif&quot; class=&quot;mceWPnextpage mceItemNoResize&quot; title=&quot;'+ed.getLang('wordpress.wp_page_alt')+'&quot; /&gt;';
+
+                        // Load plugin specific CSS into editor
+                        ed.onInit.add(function() {
+                                ed.dom.loadCSS(url + '/css/content.css');
+                        });
+
+                        // Display morebreak instead if img in element path
+                        ed.onPostRender.add(function() {
+                                if (ed.theme.onResolveName) {
+                                        ed.theme.onResolveName.add(function(th, o) {
+                                                if (o.node.nodeName == 'IMG') {
+                                                        if ( ed.dom.hasClass(o.node, 'mceWPmore') )
+                                                                o.name = 'wpmore';
+                                                        if ( ed.dom.hasClass(o.node, 'mceWPnextpage') )
+                                                                o.name = 'wppage';
+                                                }
+
+                                        });
+                                }
+                        });
+
+                        // Replace morebreak with images
+                        ed.onBeforeSetContent.add(function(ed, o) {
+                                if ( o.content ) {
+                                        o.content = o.content.replace(/&lt;!--more(.*?)--&gt;/g, moreHTML);
+                                        o.content = o.content.replace(/&lt;!--nextpage--&gt;/g, nextpageHTML);
+                                }
+                        });
+
+                        // Replace images with morebreak
+                        ed.onPostProcess.add(function(ed, o) {
+                                if (o.get)
+                                        o.content = o.content.replace(/&lt;img[^&gt;]+&gt;/g, function(im) {
+                                                if (im.indexOf('class=&quot;mceWPmore') !== -1) {
+                                                        var m, moretext = (m = im.match(/alt=&quot;(.*?)&quot;/)) ? m[1] : '';
+                                                        im = '&lt;!--more'+moretext+'--&gt;';
+                                                }
+                                                if (im.indexOf('class=&quot;mceWPnextpage') !== -1)
+                                                        im = '&lt;!--nextpage--&gt;';
+
+                                                return im;
+                                        });
+                        });
+
+                        // Set active buttons if user selected pagebreak or more break
+                        ed.onNodeChange.add(function(ed, cm, n) {
+                                cm.setActive('wp_page', n.nodeName === 'IMG' &amp;&amp; ed.dom.hasClass(n, 'mceWPnextpage'));
+                                cm.setActive('wp_more', n.nodeName === 'IMG' &amp;&amp; ed.dom.hasClass(n, 'mceWPmore'));
+                        });
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('wordpress', tinymce.plugins.WordPress);
+})();
</ins></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpdialogseditor_plugindevjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js (19944 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js        2012-02-17 23:40:02 UTC (rev 19944)
+++ trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -1,80 +0,0 @@
</span><del>-/**
- * editor_plugin_src.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-(function() {
-        tinymce.create('tinymce.plugins.WPDialogs', {
-                init : function(ed, url) {
-                        tinymce.create('tinymce.WPWindowManager:tinymce.InlineWindowManager', {
-                                WPWindowManager : function(ed) {
-                                        this.parent(ed);
-                                },
-
-                                open : function(f, p) {
-                                        var t = this, element;
-
-                                        if ( ! f.wpDialog )
-                                                return this.parent( f, p );
-                                        else if ( ! f.id )
-                                                return;
-
-                                        element = jQuery('#' + f.id);
-                                        if ( ! element.length )
-                                                return;
-
-                                        t.features = f;
-                                        t.params = p;
-                                        t.onOpen.dispatch(t, f, p);
-                                        t.element = t.windows[ f.id ] = element;
-
-                                        // Store selection
-                                        t.bookmark = t.editor.selection.getBookmark(1);
-
-                                        // Create the dialog if necessary
-                                        if ( ! element.data('wpdialog') ) {
-                                                element.wpdialog({
-                                                        title: f.title,
-                                                        width: f.width,
-                                                        height: f.height,
-                                                        modal: true,
-                                                        dialogClass: 'wp-dialog',
-                                                        zIndex: 300000
-                                                });
-                                        }
-
-                                        element.wpdialog('open');
-                                },
-                                close : function() {
-                                        if ( ! this.features.wpDialog )
-                                                return this.parent.apply( this, arguments );
-
-                                        this.element.wpdialog('close');
-                                }
-                        });
-
-                        // Replace window manager
-                        ed.onBeforeRenderUI.add(function() {
-                                ed.windowManager = new tinymce.WPWindowManager(ed);
-                        });
-                },
-
-                getInfo : function() {
-                        return {
-                                longname : 'WPDialogs',
-                                author : 'WordPress',
-                                authorurl : 'http://wordpress.org',
-                                infourl : 'http://wordpress.org',
-                                version : '0.1'
-                        };
-                }
-        });
-
-        // Register plugin
-        tinymce.PluginManager.add('wpdialogs', tinymce.plugins.WPDialogs);
-})();
</del></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpdialogseditor_plugin_srcjsfromrev19941trunkwpincludesjstinymcepluginswpdialogseditor_plugindevjs"></a>
<div class="copfile"><h4>Copied: trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js (from rev 19941, trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin.dev.js) (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+/**
+ * editor_plugin_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function() {
+        tinymce.create('tinymce.plugins.WPDialogs', {
+                init : function(ed, url) {
+                        tinymce.create('tinymce.WPWindowManager:tinymce.InlineWindowManager', {
+                                WPWindowManager : function(ed) {
+                                        this.parent(ed);
+                                },
+
+                                open : function(f, p) {
+                                        var t = this, element;
+
+                                        if ( ! f.wpDialog )
+                                                return this.parent( f, p );
+                                        else if ( ! f.id )
+                                                return;
+
+                                        element = jQuery('#' + f.id);
+                                        if ( ! element.length )
+                                                return;
+
+                                        t.features = f;
+                                        t.params = p;
+                                        t.onOpen.dispatch(t, f, p);
+                                        t.element = t.windows[ f.id ] = element;
+
+                                        // Store selection
+                                        t.bookmark = t.editor.selection.getBookmark(1);
+
+                                        // Create the dialog if necessary
+                                        if ( ! element.data('wpdialog') ) {
+                                                element.wpdialog({
+                                                        title: f.title,
+                                                        width: f.width,
+                                                        height: f.height,
+                                                        modal: true,
+                                                        dialogClass: 'wp-dialog',
+                                                        zIndex: 300000
+                                                });
+                                        }
+
+                                        element.wpdialog('open');
+                                },
+                                close : function() {
+                                        if ( ! this.features.wpDialog )
+                                                return this.parent.apply( this, arguments );
+
+                                        this.element.wpdialog('close');
+                                }
+                        });
+
+                        // Replace window manager
+                        ed.onBeforeRenderUI.add(function() {
+                                ed.windowManager = new tinymce.WPWindowManager(ed);
+                        });
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'WPDialogs',
+                                author : 'WordPress',
+                                authorurl : 'http://wordpress.org',
+                                infourl : 'http://wordpress.org',
+                                version : '0.1'
+                        };
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('wpdialogs', tinymce.plugins.WPDialogs);
+})();
</ins></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpeditimageeditor_plugindevjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js (19944 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js        2012-02-17 23:40:02 UTC (rev 19944)
+++ trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -1,233 +0,0 @@
</span><del>-
-(function() {
-        tinymce.create('tinymce.plugins.wpEditImage', {
-
-                init : function(ed, url) {
-                        var t = this, mouse = {};
-
-                        t.url = url;
-                        t._createButtons();
-
-                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
-                        ed.addCommand('WP_EditImage', function() {
-                                var el = ed.selection.getNode(), vp = tinymce.DOM.getViewPort(), H = vp.h, W = ( 720 &lt; vp.w ) ? 720 : vp.w, cls = ed.dom.getAttrib(el, 'class');
-
-                                if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' )
-                                        return;
-
-                                tb_show('', url + '/editimage.html?ver=321&amp;TB_iframe=true');
-                                tinymce.DOM.setStyles('TB_window', {
-                                        'width':( W - 50 )+'px',
-                                        'height':( H - 45 )+'px',
-                                        'margin-left':'-'+parseInt((( W - 50 ) / 2),10) + 'px'
-                                });
-
-                                if ( ! tinymce.isIE6 ) {
-                                        tinymce.DOM.setStyles('TB_window', {
-                                                'top':'20px',
-                                                'marginTop':'0'
-                                        });
-                                }
-
-                                tinymce.DOM.setStyles('TB_iframeContent', {
-                                        'width':( W - 50 )+'px',
-                                        'height':( H - 75 )+'px'
-                                });
-                                tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
-                        });
-
-                        ed.onInit.add(function(ed) {
-                                tinymce.dom.Event.add(ed.getBody(), 'dragstart', function(e) {
-                                        if ( !tinymce.isGecko &amp;&amp; e.target.nodeName == 'IMG' &amp;&amp; ed.dom.getParent(e.target, 'dl.wp-caption') )
-                                                return tinymce.dom.Event.cancel(e);
-                                });
-                        });
-
-                        // resize the caption &lt;dl&gt; when the image is soft-resized by the user (only possible in Firefox and IE)
-                        ed.onMouseUp.add(function(ed, e) {
-                                if ( tinymce.isWebKit || tinymce.isOpera )
-                                        return;
-
-                                if ( mouse.x &amp;&amp; (e.clientX != mouse.x || e.clientY != mouse.y) ) {
-                                        var n = ed.selection.getNode();
-
-                                        if ( 'IMG' == n.nodeName ) {
-                                                window.setTimeout(function(){
-                                                        var DL, width;
-
-                                                        if ( n.width != mouse.img_w || n.height != mouse.img_h )
-                                                                n.className = n.className.replace(/size-[^ &quot;']+/, '');
-
-                                                        if ( ed.dom.getParent(n, 'div.mceTemp') ) {
-                                                                DL = ed.dom.getParent(n, 'dl.wp-caption');
-
-                                                                if ( DL ) {
-                                                                        width = ed.dom.getAttrib(n, 'width') || n.width;
-                                                                        width = parseInt(width, 10);
-                                                                        ed.dom.setStyle(DL, 'width', 10 + width);
-                                                                        ed.execCommand('mceRepaint');
-                                                                }
-
-                                                        }
-                                                }, 100);
-                                        }
-                                }
-                                mouse = {};
-                        });
-
-                        // show editimage buttons
-                        ed.onMouseDown.add(function(ed, e) {
-
-                                if ( e.target &amp;&amp; ( e.target.nodeName == 'IMG' || (e.target.firstChild &amp;&amp; e.target.firstChild.nodeName == 'IMG') ) ) {
-                                        mouse = {
-                                                x: e.clientX,
-                                                y: e.clientY,
-                                                img_w: e.target.clientWidth,
-                                                img_h: e.target.clientHeight
-                                        };
-
-                                        if ( ed.dom.getAttrib(e.target, 'class').indexOf('mceItem') == -1 )
-                                                ed.plugins.wordpress._showButtons(e.target, 'wp_editbtns');
-                                }
-                        });
-
-                        // when pressing Return inside a caption move the cursor to a new parapraph under it
-                        ed.onKeyPress.add(function(ed, e) {
-                                var n, DL, DIV, P;
-
-                                if ( e.keyCode == 13 ) {
-                                        n = ed.selection.getNode();
-                                        DL = ed.dom.getParent(n, 'dl.wp-caption');
-                                        DIV = ed.dom.getParent(DL, 'div.mceTemp');
-
-                                        if ( DL &amp;&amp; DIV ) {
-                                                P = ed.dom.create('p', {}, '&amp;nbsp;');
-                                                ed.dom.insertAfter( P, DIV );
-                                                
-                                                if ( P.firstChild )
-                                                        ed.selection.select(P.firstChild);
-                                                else
-                                                        ed.selection.select(P);
-                                                
-                                                tinymce.dom.Event.cancel(e);
-                                                return false;
-                                        }
-                                }
-                        });
-
-                        ed.onBeforeSetContent.add(function(ed, o) {
-                                o.content = t._do_shcode(o.content);
-                        });
-
-                        ed.onPostProcess.add(function(ed, o) {
-                                if (o.get)
-                                        o.content = t._get_shcode(o.content);
-                        });
-                },
-
-                _do_shcode : function(co) {
-                        return co.replace(/(?:&lt;p&gt;)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:&lt;\/p&gt;)?[\s\u00a0]*/g, function(a,b,c){
-                                var id, cls, w, cap, div_cls;
-                                
-                                b = b.replace(/\\'|\\&amp;#39;|\\&amp;#039;/g, '&amp;#39;').replace(/\\&quot;|\\&amp;quot;/g, '&amp;quot;');
-                                c = c.replace(/\\&amp;#39;|\\&amp;#039;/g, '&amp;#39;').replace(/\\&amp;quot;/g, '&amp;quot;');
-                                id = b.match(/id=['&quot;]([^'&quot;]+)/i);
-                                cls = b.match(/align=['&quot;]([^'&quot;]+)/i);
-                                w = b.match(/width=['&quot;]([0-9]+)/);
-                                cap = b.match(/caption=['&quot;]([^'&quot;]+)/i);
-
-                                id = ( id &amp;&amp; id[1] ) ? id[1] : '';
-                                cls = ( cls &amp;&amp; cls[1] ) ? cls[1] : 'alignnone';
-                                w = ( w &amp;&amp; w[1] ) ? w[1] : '';
-                                cap = ( cap &amp;&amp; cap[1] ) ? cap[1] : '';
-                                if ( ! w || ! cap ) return c;
-                                
-                                div_cls = (cls == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp';
-
-                                return '&lt;div class=&quot;'+div_cls+'&quot; draggable&gt;&lt;dl id=&quot;'+id+'&quot; class=&quot;wp-caption '+cls+'&quot; style=&quot;width: '+(10+parseInt(w))+
-                                'px&quot;&gt;&lt;dt class=&quot;wp-caption-dt&quot;&gt;'+c+'&lt;/dt&gt;&lt;dd class=&quot;wp-caption-dd&quot;&gt;'+cap+'&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;';
-                        });
-                },
-
-                _get_shcode : function(co) {
-                        return co.replace(/&lt;div class=&quot;mceTemp[^&quot;]*&quot;&gt;\s*&lt;dl([^&gt;]+)&gt;\s*&lt;dt[^&gt;]+&gt;([\s\S]+?)&lt;\/dt&gt;\s*&lt;dd[^&gt;]+&gt;(.+?)&lt;\/dd&gt;\s*&lt;\/dl&gt;\s*&lt;\/div&gt;\s*/gi, function(a,b,c,cap){
-                                var id, cls, w;
-                                
-                                id = b.match(/id=['&quot;]([^'&quot;]+)/i);
-                                cls = b.match(/class=['&quot;]([^'&quot;]+)/i);
-                                w = c.match(/width=['&quot;]([0-9]+)/);
-
-                                id = ( id &amp;&amp; id[1] ) ? id[1] : '';
-                                cls = ( cls &amp;&amp; cls[1] ) ? cls[1] : 'alignnone';
-                                w = ( w &amp;&amp; w[1] ) ? w[1] : '';
-
-                                if ( ! w || ! cap ) return c;
-                                cls = cls.match(/align[^ '&quot;]+/) || 'alignnone';
-                                cap = cap.replace(/&lt;\S[^&lt;&gt;]*&gt;/gi, '').replace(/'/g, '&amp;#39;').replace(/&quot;/g, '&amp;quot;');
-
-                                return '[caption id=&quot;'+id+'&quot; align=&quot;'+cls+'&quot; width=&quot;'+w+'&quot; caption=&quot;'+cap+'&quot;]'+c+'[/caption]';
-                        });
-                },
-
-                _createButtons : function() {
-                        var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, editButton, dellButton;
-
-                        DOM.remove('wp_editbtns');
-
-                        DOM.add(document.body, 'div', {
-                                id : 'wp_editbtns',
-                                style : 'display:none;'
-                        });
-
-                        editButton = DOM.add('wp_editbtns', 'img', {
-                                src : t.url+'/img/image.png',
-                                id : 'wp_editimgbtn',
-                                width : '24',
-                                height : '24',
-                                title : ed.getLang('wpeditimage.edit_img')
-                        });
-
-                        tinymce.dom.Event.add(editButton, 'mousedown', function(e) {
-                                var ed = tinyMCE.activeEditor;
-                                ed.windowManager.bookmark = ed.selection.getBookmark('simple');
-                                ed.execCommand(&quot;WP_EditImage&quot;);
-                        });
-
-                        dellButton = DOM.add('wp_editbtns', 'img', {
-                                src : t.url+'/img/delete.png',
-                                id : 'wp_delimgbtn',
-                                width : '24',
-                                height : '24',
-                                title : ed.getLang('wpeditimage.del_img')
-                        });
-
-                        tinymce.dom.Event.add(dellButton, 'mousedown', function(e) {
-                                var ed = tinyMCE.activeEditor, el = ed.selection.getNode(), p;
-
-                                if ( el.nodeName == 'IMG' &amp;&amp; ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) {
-                                        if ( (p = ed.dom.getParent(el, 'div')) &amp;&amp; ed.dom.hasClass(p, 'mceTemp') )
-                                                ed.dom.remove(p);
-                                        else if ( (p = ed.dom.getParent(el, 'A')) &amp;&amp; p.childNodes.length == 1 )
-                                                ed.dom.remove(p);
-                                        else
-                                                ed.dom.remove(el);
-
-                                        ed.execCommand('mceRepaint');
-                                        return false;
-                                }
-                        });
-                },
-
-                getInfo : function() {
-                        return {
-                                longname : 'Edit Image',
-                                author : 'WordPress',
-                                authorurl : 'http://wordpress.org',
-                                infourl : '',
-                                version : &quot;1.0&quot;
-                        };
-                }
-        });
-
-        tinymce.PluginManager.add('wpeditimage', tinymce.plugins.wpEditImage);
-})();
</del></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpeditimageeditor_plugin_srcjsfromrev19941trunkwpincludesjstinymcepluginswpeditimageeditor_plugindevjs"></a>
<div class="copfile"><h4>Copied: trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js (from rev 19941, trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.dev.js) (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,233 @@
</span><ins>+
+(function() {
+        tinymce.create('tinymce.plugins.wpEditImage', {
+
+                init : function(ed, url) {
+                        var t = this, mouse = {};
+
+                        t.url = url;
+                        t._createButtons();
+
+                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
+                        ed.addCommand('WP_EditImage', function() {
+                                var el = ed.selection.getNode(), vp = tinymce.DOM.getViewPort(), H = vp.h, W = ( 720 &lt; vp.w ) ? 720 : vp.w, cls = ed.dom.getAttrib(el, 'class');
+
+                                if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' )
+                                        return;
+
+                                tb_show('', url + '/editimage.html?ver=321&amp;TB_iframe=true');
+                                tinymce.DOM.setStyles('TB_window', {
+                                        'width':( W - 50 )+'px',
+                                        'height':( H - 45 )+'px',
+                                        'margin-left':'-'+parseInt((( W - 50 ) / 2),10) + 'px'
+                                });
+
+                                if ( ! tinymce.isIE6 ) {
+                                        tinymce.DOM.setStyles('TB_window', {
+                                                'top':'20px',
+                                                'marginTop':'0'
+                                        });
+                                }
+
+                                tinymce.DOM.setStyles('TB_iframeContent', {
+                                        'width':( W - 50 )+'px',
+                                        'height':( H - 75 )+'px'
+                                });
+                                tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
+                        });
+
+                        ed.onInit.add(function(ed) {
+                                tinymce.dom.Event.add(ed.getBody(), 'dragstart', function(e) {
+                                        if ( !tinymce.isGecko &amp;&amp; e.target.nodeName == 'IMG' &amp;&amp; ed.dom.getParent(e.target, 'dl.wp-caption') )
+                                                return tinymce.dom.Event.cancel(e);
+                                });
+                        });
+
+                        // resize the caption &lt;dl&gt; when the image is soft-resized by the user (only possible in Firefox and IE)
+                        ed.onMouseUp.add(function(ed, e) {
+                                if ( tinymce.isWebKit || tinymce.isOpera )
+                                        return;
+
+                                if ( mouse.x &amp;&amp; (e.clientX != mouse.x || e.clientY != mouse.y) ) {
+                                        var n = ed.selection.getNode();
+
+                                        if ( 'IMG' == n.nodeName ) {
+                                                window.setTimeout(function(){
+                                                        var DL, width;
+
+                                                        if ( n.width != mouse.img_w || n.height != mouse.img_h )
+                                                                n.className = n.className.replace(/size-[^ &quot;']+/, '');
+
+                                                        if ( ed.dom.getParent(n, 'div.mceTemp') ) {
+                                                                DL = ed.dom.getParent(n, 'dl.wp-caption');
+
+                                                                if ( DL ) {
+                                                                        width = ed.dom.getAttrib(n, 'width') || n.width;
+                                                                        width = parseInt(width, 10);
+                                                                        ed.dom.setStyle(DL, 'width', 10 + width);
+                                                                        ed.execCommand('mceRepaint');
+                                                                }
+
+                                                        }
+                                                }, 100);
+                                        }
+                                }
+                                mouse = {};
+                        });
+
+                        // show editimage buttons
+                        ed.onMouseDown.add(function(ed, e) {
+
+                                if ( e.target &amp;&amp; ( e.target.nodeName == 'IMG' || (e.target.firstChild &amp;&amp; e.target.firstChild.nodeName == 'IMG') ) ) {
+                                        mouse = {
+                                                x: e.clientX,
+                                                y: e.clientY,
+                                                img_w: e.target.clientWidth,
+                                                img_h: e.target.clientHeight
+                                        };
+
+                                        if ( ed.dom.getAttrib(e.target, 'class').indexOf('mceItem') == -1 )
+                                                ed.plugins.wordpress._showButtons(e.target, 'wp_editbtns');
+                                }
+                        });
+
+                        // when pressing Return inside a caption move the cursor to a new parapraph under it
+                        ed.onKeyPress.add(function(ed, e) {
+                                var n, DL, DIV, P;
+
+                                if ( e.keyCode == 13 ) {
+                                        n = ed.selection.getNode();
+                                        DL = ed.dom.getParent(n, 'dl.wp-caption');
+                                        DIV = ed.dom.getParent(DL, 'div.mceTemp');
+
+                                        if ( DL &amp;&amp; DIV ) {
+                                                P = ed.dom.create('p', {}, '&amp;nbsp;');
+                                                ed.dom.insertAfter( P, DIV );
+                                                
+                                                if ( P.firstChild )
+                                                        ed.selection.select(P.firstChild);
+                                                else
+                                                        ed.selection.select(P);
+                                                
+                                                tinymce.dom.Event.cancel(e);
+                                                return false;
+                                        }
+                                }
+                        });
+
+                        ed.onBeforeSetContent.add(function(ed, o) {
+                                o.content = t._do_shcode(o.content);
+                        });
+
+                        ed.onPostProcess.add(function(ed, o) {
+                                if (o.get)
+                                        o.content = t._get_shcode(o.content);
+                        });
+                },
+
+                _do_shcode : function(co) {
+                        return co.replace(/(?:&lt;p&gt;)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:&lt;\/p&gt;)?[\s\u00a0]*/g, function(a,b,c){
+                                var id, cls, w, cap, div_cls;
+                                
+                                b = b.replace(/\\'|\\&amp;#39;|\\&amp;#039;/g, '&amp;#39;').replace(/\\&quot;|\\&amp;quot;/g, '&amp;quot;');
+                                c = c.replace(/\\&amp;#39;|\\&amp;#039;/g, '&amp;#39;').replace(/\\&amp;quot;/g, '&amp;quot;');
+                                id = b.match(/id=['&quot;]([^'&quot;]+)/i);
+                                cls = b.match(/align=['&quot;]([^'&quot;]+)/i);
+                                w = b.match(/width=['&quot;]([0-9]+)/);
+                                cap = b.match(/caption=['&quot;]([^'&quot;]+)/i);
+
+                                id = ( id &amp;&amp; id[1] ) ? id[1] : '';
+                                cls = ( cls &amp;&amp; cls[1] ) ? cls[1] : 'alignnone';
+                                w = ( w &amp;&amp; w[1] ) ? w[1] : '';
+                                cap = ( cap &amp;&amp; cap[1] ) ? cap[1] : '';
+                                if ( ! w || ! cap ) return c;
+                                
+                                div_cls = (cls == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp';
+
+                                return '&lt;div class=&quot;'+div_cls+'&quot; draggable&gt;&lt;dl id=&quot;'+id+'&quot; class=&quot;wp-caption '+cls+'&quot; style=&quot;width: '+(10+parseInt(w))+
+                                'px&quot;&gt;&lt;dt class=&quot;wp-caption-dt&quot;&gt;'+c+'&lt;/dt&gt;&lt;dd class=&quot;wp-caption-dd&quot;&gt;'+cap+'&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;';
+                        });
+                },
+
+                _get_shcode : function(co) {
+                        return co.replace(/&lt;div class=&quot;mceTemp[^&quot;]*&quot;&gt;\s*&lt;dl([^&gt;]+)&gt;\s*&lt;dt[^&gt;]+&gt;([\s\S]+?)&lt;\/dt&gt;\s*&lt;dd[^&gt;]+&gt;(.+?)&lt;\/dd&gt;\s*&lt;\/dl&gt;\s*&lt;\/div&gt;\s*/gi, function(a,b,c,cap){
+                                var id, cls, w;
+                                
+                                id = b.match(/id=['&quot;]([^'&quot;]+)/i);
+                                cls = b.match(/class=['&quot;]([^'&quot;]+)/i);
+                                w = c.match(/width=['&quot;]([0-9]+)/);
+
+                                id = ( id &amp;&amp; id[1] ) ? id[1] : '';
+                                cls = ( cls &amp;&amp; cls[1] ) ? cls[1] : 'alignnone';
+                                w = ( w &amp;&amp; w[1] ) ? w[1] : '';
+
+                                if ( ! w || ! cap ) return c;
+                                cls = cls.match(/align[^ '&quot;]+/) || 'alignnone';
+                                cap = cap.replace(/&lt;\S[^&lt;&gt;]*&gt;/gi, '').replace(/'/g, '&amp;#39;').replace(/&quot;/g, '&amp;quot;');
+
+                                return '[caption id=&quot;'+id+'&quot; align=&quot;'+cls+'&quot; width=&quot;'+w+'&quot; caption=&quot;'+cap+'&quot;]'+c+'[/caption]';
+                        });
+                },
+
+                _createButtons : function() {
+                        var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, editButton, dellButton;
+
+                        DOM.remove('wp_editbtns');
+
+                        DOM.add(document.body, 'div', {
+                                id : 'wp_editbtns',
+                                style : 'display:none;'
+                        });
+
+                        editButton = DOM.add('wp_editbtns', 'img', {
+                                src : t.url+'/img/image.png',
+                                id : 'wp_editimgbtn',
+                                width : '24',
+                                height : '24',
+                                title : ed.getLang('wpeditimage.edit_img')
+                        });
+
+                        tinymce.dom.Event.add(editButton, 'mousedown', function(e) {
+                                var ed = tinyMCE.activeEditor;
+                                ed.windowManager.bookmark = ed.selection.getBookmark('simple');
+                                ed.execCommand(&quot;WP_EditImage&quot;);
+                        });
+
+                        dellButton = DOM.add('wp_editbtns', 'img', {
+                                src : t.url+'/img/delete.png',
+                                id : 'wp_delimgbtn',
+                                width : '24',
+                                height : '24',
+                                title : ed.getLang('wpeditimage.del_img')
+                        });
+
+                        tinymce.dom.Event.add(dellButton, 'mousedown', function(e) {
+                                var ed = tinyMCE.activeEditor, el = ed.selection.getNode(), p;
+
+                                if ( el.nodeName == 'IMG' &amp;&amp; ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) {
+                                        if ( (p = ed.dom.getParent(el, 'div')) &amp;&amp; ed.dom.hasClass(p, 'mceTemp') )
+                                                ed.dom.remove(p);
+                                        else if ( (p = ed.dom.getParent(el, 'A')) &amp;&amp; p.childNodes.length == 1 )
+                                                ed.dom.remove(p);
+                                        else
+                                                ed.dom.remove(el);
+
+                                        ed.execCommand('mceRepaint');
+                                        return false;
+                                }
+                        });
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'Edit Image',
+                                author : 'WordPress',
+                                authorurl : 'http://wordpress.org',
+                                infourl : '',
+                                version : &quot;1.0&quot;
+                        };
+                }
+        });
+
+        tinymce.PluginManager.add('wpeditimage', tinymce.plugins.wpEditImage);
+})();
</ins></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpfullscreeneditor_plugindevjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js (19944 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js        2012-02-17 23:40:02 UTC (rev 19944)
+++ trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -1,178 +0,0 @@
</span><del>-/**
- * WP Fullscreen TinyMCE plugin
- *
- * Contains code from Moxiecode Systems AB released under LGPL License http://tinymce.moxiecode.com/license
- */
-
-(function() {
-        tinymce.create('tinymce.plugins.wpFullscreenPlugin', {
-
-                init : function(ed, url) {
-                        var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM, resized = false;
-
-                        // Register commands
-                        ed.addCommand('wpFullScreenClose', function() {
-                                // this removes the editor, content has to be saved first with tinyMCE.execCommand('wpFullScreenSave');
-                                if ( ed.getParam('wp_fullscreen_is_enabled') ) {
-                                        DOM.win.setTimeout(function() {
-                                                tinyMCE.remove(ed);
-                                                DOM.remove('wp_mce_fullscreen_parent');
-                                                tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
-                                        }, 10);
-                                }
-                        });
-
-                        ed.addCommand('wpFullScreenSave', function() {
-                                var ed = tinyMCE.get('wp_mce_fullscreen'), edd;
-
-                                ed.focus();
-                                edd = tinyMCE.get( ed.getParam('wp_fullscreen_editor_id') );
-
-                                edd.setContent( ed.getContent({format : 'raw'}), {format : 'raw'} );
-                        });
-
-                        ed.addCommand('wpFullScreenInit', function() {
-                                var d, b, fsed;
-
-                                ed = tinymce.get('content');
-                                d = ed.getDoc();
-                                b = d.body;
-
-                                tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
-
-                                tinymce.each(ed.settings, function(v, n) {
-                                        s[n] = v;
-                                });
-
-                                s.id = 'wp_mce_fullscreen';
-                                s.wp_fullscreen_is_enabled = true;
-                                s.wp_fullscreen_editor_id = ed.id;
-                                s.theme_advanced_resizing = false;
-                                s.theme_advanced_statusbar_location = 'none';
-                                s.content_css = s.content_css ? s.content_css + ',' + s.wp_fullscreen_content_css : s.wp_fullscreen_content_css;
-                                s.height = tinymce.isIE ? b.scrollHeight : b.offsetHeight;
-
-                                tinymce.each(ed.getParam('wp_fullscreen_settings'), function(v, k) {
-                                        s[k] = v;
-                                });
-
-                                fsed = new tinymce.Editor('wp_mce_fullscreen', s);
-                                fsed.onInit.add(function(edd) {
-                                        var DOM = tinymce.DOM, buttons = DOM.select('a.mceButton', DOM.get('wp-fullscreen-buttons'));
-
-                                        if ( !ed.isHidden() )
-                                                edd.setContent( ed.getContent() );
-                                        else
-                                                edd.setContent( switchEditors.wpautop( edd.getElement().value ) );
-
-                                        setTimeout(function(){ // add last
-                                                edd.onNodeChange.add(function(ed, cm, e){
-                                                        tinymce.each(buttons, function(c) {
-                                                                var btn, cls;
-
-                                                                if ( btn = DOM.get( 'wp_mce_fullscreen_' + c.id.substr(6) ) ) {
-                                                                        cls = btn.className;
-
-                                                                        if ( cls )
-                                                                                c.className = cls;
-                                                                }
-                                                        });
-                                                });
-                                        }, 1000);
-
-                                        edd.dom.addClass(edd.getBody(), 'wp-fullscreen-editor');
-                                        edd.focus();
-                                });
-
-                                fsed.render();
-
-                                if ( 'undefined' != fullscreen ) {
-                                        fsed.dom.bind( fsed.dom.doc, 'mousemove', function(e){
-                                                fullscreen.bounder( 'showToolbar', 'hideToolbar', 2000, e );
-                                        });
-                                }
-                        });
-
-                        // Register buttons
-                        if ( 'undefined' != fullscreen ) {
-                                ed.addButton('wp_fullscreen', {
-                                        title : 'fullscreen.desc',
-                                        onclick : function(){ fullscreen.on(); }
-                                });
-                        }
-
-                        // END fullscreen
-//----------------------------------------------------------------
-                        // START autoresize
-
-                        if ( ed.getParam('fullscreen_is_enabled') || !ed.getParam('wp_fullscreen_is_enabled') )
-                                return;
-
-                        /**
-                         * This method gets executed each time the editor needs to resize.
-                         */
-                        function resize() {
-                                if ( resized )
-                                        return;
-
-                                var d = ed.getDoc(), DOM = tinymce.DOM, resizeHeight, myHeight;
-
-                                // Get height differently depending on the browser used
-                                if ( tinymce.isIE )
-                                        myHeight = d.body.scrollHeight;
-                                else
-                                        myHeight = d.documentElement.offsetHeight;
-
-                                // Don't make it smaller than 300px
-                                resizeHeight = (myHeight &gt; 300) ? myHeight : 300;
-
-                                // Resize content element
-                                if ( oldHeight != resizeHeight ) {
-                                        oldHeight = resizeHeight;
-                                        resized = true;
-                                        setTimeout(function(){ resized = false; }, 100);
-
-                                        DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
-                                }
-                        };
-
-                        // Add appropriate listeners for resizing content area
-                        ed.onInit.add(function(ed, l) {
-                                ed.onChange.add(resize);
-                                ed.onSetContent.add(resize);
-                                ed.onPaste.add(resize);
-                                ed.onKeyUp.add(resize);
-                                ed.onPostRender.add(resize);
-
-                                ed.getBody().style.overflowY = &quot;hidden&quot;;
-                        });
-
-                        if (ed.getParam('autoresize_on_init', true)) {
-                                ed.onLoadContent.add(function(ed, l) {
-                                        // Because the content area resizes when its content CSS loads,
-                                        // and we can't easily add a listener to its onload event,
-                                        // we'll just trigger a resize after a short loading period
-                                        setTimeout(function() {
-                                                resize();
-                                        }, 1200);
-                                });
-                        }
-
-                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
-                        ed.addCommand('wpAutoResize', resize);
-                },
-
-                getInfo : function() {
-                        return {
-                                longname : 'WP Fullscreen',
-                                author : 'WordPress',
-                                authorurl : 'http://wordpress.org',
-                                infourl : '',
-                                version : '1.0'
-                        };
-                }
-        });
-
-        // Register plugin
-        tinymce.PluginManager.add('wpfullscreen', tinymce.plugins.wpFullscreenPlugin);
-})();
</del></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpfullscreeneditor_plugin_srcjsfromrev19941trunkwpincludesjstinymcepluginswpfullscreeneditor_plugindevjs"></a>
<div class="copfile"><h4>Copied: trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js (from rev 19941, trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin.dev.js) (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,178 @@
</span><ins>+/**
+ * WP Fullscreen TinyMCE plugin
+ *
+ * Contains code from Moxiecode Systems AB released under LGPL License http://tinymce.moxiecode.com/license
+ */
+
+(function() {
+        tinymce.create('tinymce.plugins.wpFullscreenPlugin', {
+
+                init : function(ed, url) {
+                        var t = this, oldHeight = 0, s = {}, DOM = tinymce.DOM, resized = false;
+
+                        // Register commands
+                        ed.addCommand('wpFullScreenClose', function() {
+                                // this removes the editor, content has to be saved first with tinyMCE.execCommand('wpFullScreenSave');
+                                if ( ed.getParam('wp_fullscreen_is_enabled') ) {
+                                        DOM.win.setTimeout(function() {
+                                                tinyMCE.remove(ed);
+                                                DOM.remove('wp_mce_fullscreen_parent');
+                                                tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
+                                        }, 10);
+                                }
+                        });
+
+                        ed.addCommand('wpFullScreenSave', function() {
+                                var ed = tinyMCE.get('wp_mce_fullscreen'), edd;
+
+                                ed.focus();
+                                edd = tinyMCE.get( ed.getParam('wp_fullscreen_editor_id') );
+
+                                edd.setContent( ed.getContent({format : 'raw'}), {format : 'raw'} );
+                        });
+
+                        ed.addCommand('wpFullScreenInit', function() {
+                                var d, b, fsed;
+
+                                ed = tinymce.get('content');
+                                d = ed.getDoc();
+                                b = d.body;
+
+                                tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
+
+                                tinymce.each(ed.settings, function(v, n) {
+                                        s[n] = v;
+                                });
+
+                                s.id = 'wp_mce_fullscreen';
+                                s.wp_fullscreen_is_enabled = true;
+                                s.wp_fullscreen_editor_id = ed.id;
+                                s.theme_advanced_resizing = false;
+                                s.theme_advanced_statusbar_location = 'none';
+                                s.content_css = s.content_css ? s.content_css + ',' + s.wp_fullscreen_content_css : s.wp_fullscreen_content_css;
+                                s.height = tinymce.isIE ? b.scrollHeight : b.offsetHeight;
+
+                                tinymce.each(ed.getParam('wp_fullscreen_settings'), function(v, k) {
+                                        s[k] = v;
+                                });
+
+                                fsed = new tinymce.Editor('wp_mce_fullscreen', s);
+                                fsed.onInit.add(function(edd) {
+                                        var DOM = tinymce.DOM, buttons = DOM.select('a.mceButton', DOM.get('wp-fullscreen-buttons'));
+
+                                        if ( !ed.isHidden() )
+                                                edd.setContent( ed.getContent() );
+                                        else
+                                                edd.setContent( switchEditors.wpautop( edd.getElement().value ) );
+
+                                        setTimeout(function(){ // add last
+                                                edd.onNodeChange.add(function(ed, cm, e){
+                                                        tinymce.each(buttons, function(c) {
+                                                                var btn, cls;
+
+                                                                if ( btn = DOM.get( 'wp_mce_fullscreen_' + c.id.substr(6) ) ) {
+                                                                        cls = btn.className;
+
+                                                                        if ( cls )
+                                                                                c.className = cls;
+                                                                }
+                                                        });
+                                                });
+                                        }, 1000);
+
+                                        edd.dom.addClass(edd.getBody(), 'wp-fullscreen-editor');
+                                        edd.focus();
+                                });
+
+                                fsed.render();
+
+                                if ( 'undefined' != fullscreen ) {
+                                        fsed.dom.bind( fsed.dom.doc, 'mousemove', function(e){
+                                                fullscreen.bounder( 'showToolbar', 'hideToolbar', 2000, e );
+                                        });
+                                }
+                        });
+
+                        // Register buttons
+                        if ( 'undefined' != fullscreen ) {
+                                ed.addButton('wp_fullscreen', {
+                                        title : 'fullscreen.desc',
+                                        onclick : function(){ fullscreen.on(); }
+                                });
+                        }
+
+                        // END fullscreen
+//----------------------------------------------------------------
+                        // START autoresize
+
+                        if ( ed.getParam('fullscreen_is_enabled') || !ed.getParam('wp_fullscreen_is_enabled') )
+                                return;
+
+                        /**
+                         * This method gets executed each time the editor needs to resize.
+                         */
+                        function resize() {
+                                if ( resized )
+                                        return;
+
+                                var d = ed.getDoc(), DOM = tinymce.DOM, resizeHeight, myHeight;
+
+                                // Get height differently depending on the browser used
+                                if ( tinymce.isIE )
+                                        myHeight = d.body.scrollHeight;
+                                else
+                                        myHeight = d.documentElement.offsetHeight;
+
+                                // Don't make it smaller than 300px
+                                resizeHeight = (myHeight &gt; 300) ? myHeight : 300;
+
+                                // Resize content element
+                                if ( oldHeight != resizeHeight ) {
+                                        oldHeight = resizeHeight;
+                                        resized = true;
+                                        setTimeout(function(){ resized = false; }, 100);
+
+                                        DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
+                                }
+                        };
+
+                        // Add appropriate listeners for resizing content area
+                        ed.onInit.add(function(ed, l) {
+                                ed.onChange.add(resize);
+                                ed.onSetContent.add(resize);
+                                ed.onPaste.add(resize);
+                                ed.onKeyUp.add(resize);
+                                ed.onPostRender.add(resize);
+
+                                ed.getBody().style.overflowY = &quot;hidden&quot;;
+                        });
+
+                        if (ed.getParam('autoresize_on_init', true)) {
+                                ed.onLoadContent.add(function(ed, l) {
+                                        // Because the content area resizes when its content CSS loads,
+                                        // and we can't easily add a listener to its onload event,
+                                        // we'll just trigger a resize after a short loading period
+                                        setTimeout(function() {
+                                                resize();
+                                        }, 1200);
+                                });
+                        }
+
+                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
+                        ed.addCommand('wpAutoResize', resize);
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'WP Fullscreen',
+                                author : 'WordPress',
+                                authorurl : 'http://wordpress.org',
+                                infourl : '',
+                                version : '1.0'
+                        };
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('wpfullscreen', tinymce.plugins.wpFullscreenPlugin);
+})();
</ins></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpgalleryeditor_plugindevjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js (19944 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js        2012-02-17 23:40:02 UTC (rev 19944)
+++ trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -1,119 +0,0 @@
</span><del>-
-(function() {
-        tinymce.create('tinymce.plugins.wpGallery', {
-
-                init : function(ed, url) {
-                        var t = this;
-
-                        t.url = url;
-                        t._createButtons();
-
-                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
-                        ed.addCommand('WP_Gallery', function() {
-                                var el = ed.selection.getNode(), post_id, vp = tinymce.DOM.getViewPort(),
-                                        H = vp.h - 80, W = ( 640 &lt; vp.w ) ? 640 : vp.w;
-
-                                if ( el.nodeName != 'IMG' ) return;
-                                if ( ed.dom.getAttrib(el, 'class').indexOf('wpGallery') == -1 )        return;
-
-                                post_id = tinymce.DOM.get('post_ID').value;
-                                tb_show('', tinymce.documentBaseURL + '/media-upload.php?post_id='+post_id+'&amp;tab=gallery&amp;TB_iframe=true&amp;width='+W+'&amp;height='+H);
-
-                                tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
-                        });
-
-                        ed.onMouseDown.add(function(ed, e) {
-                                if ( e.target.nodeName == 'IMG' &amp;&amp; ed.dom.hasClass(e.target, 'wpGallery') )
-                                        ed.plugins.wordpress._showButtons(e.target, 'wp_gallerybtns');
-                        });
-
-                        ed.onBeforeSetContent.add(function(ed, o) {
-                                o.content = t._do_gallery(o.content);
-                        });
-
-                        ed.onPostProcess.add(function(ed, o) {
-                                if (o.get)
-                                        o.content = t._get_gallery(o.content);
-                        });
-                },
-
-                _do_gallery : function(co) {
-                        return co.replace(/\[gallery([^\]]*)\]/g, function(a,b){
-                                return '&lt;img src=&quot;'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif&quot; class=&quot;wpGallery mceItem&quot; title=&quot;gallery'+tinymce.DOM.encode(b)+'&quot; /&gt;';
-                        });
-                },
-
-                _get_gallery : function(co) {
-
-                        function getAttr(s, n) {
-                                n = new RegExp(n + '=\&quot;([^\&quot;]+)\&quot;', 'g').exec(s);
-                                return n ? tinymce.DOM.decode(n[1]) : '';
-                        };
-
-                        return co.replace(/(?:&lt;p[^&gt;]*&gt;)*(&lt;img[^&gt;]+&gt;)(?:&lt;\/p&gt;)*/g, function(a,im) {
-                                var cls = getAttr(im, 'class');
-
-                                if ( cls.indexOf('wpGallery') != -1 )
-                                        return '&lt;p&gt;['+tinymce.trim(getAttr(im, 'title'))+']&lt;/p&gt;';
-
-                                return a;
-                        });
-                },
-
-                _createButtons : function() {
-                        var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, editButton, dellButton;
-
-                        DOM.remove('wp_gallerybtns');
-
-                        DOM.add(document.body, 'div', {
-                                id : 'wp_gallerybtns',
-                                style : 'display:none;'
-                        });
-
-                        editButton = DOM.add('wp_gallerybtns', 'img', {
-                                src : t.url+'/img/edit.png',
-                                id : 'wp_editgallery',
-                                width : '24',
-                                height : '24',
-                                title : ed.getLang('wordpress.editgallery')
-                        });
-
-                        tinymce.dom.Event.add(editButton, 'mousedown', function(e) {
-                                var ed = tinyMCE.activeEditor;
-                                ed.windowManager.bookmark = ed.selection.getBookmark('simple');
-                                ed.execCommand(&quot;WP_Gallery&quot;);
-                        });
-
-                        dellButton = DOM.add('wp_gallerybtns', 'img', {
-                                src : t.url+'/img/delete.png',
-                                id : 'wp_delgallery',
-                                width : '24',
-                                height : '24',
-                                title : ed.getLang('wordpress.delgallery')
-                        });
-
-                        tinymce.dom.Event.add(dellButton, 'mousedown', function(e) {
-                                var ed = tinyMCE.activeEditor, el = ed.selection.getNode();
-
-                                if ( el.nodeName == 'IMG' &amp;&amp; ed.dom.hasClass(el, 'wpGallery') ) {
-                                        ed.dom.remove(el);
-
-                                        ed.execCommand('mceRepaint');
-                                        return false;
-                                }
-                        });
-                },
-
-                getInfo : function() {
-                        return {
-                                longname : 'Gallery Settings',
-                                author : 'WordPress',
-                                authorurl : 'http://wordpress.org',
-                                infourl : '',
-                                version : &quot;1.0&quot;
-                        };
-                }
-        });
-
-        tinymce.PluginManager.add('wpgallery', tinymce.plugins.wpGallery);
-})();
</del></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswpgalleryeditor_plugin_srcjsfromrev19941trunkwpincludesjstinymcepluginswpgalleryeditor_plugindevjs"></a>
<div class="copfile"><h4>Copied: trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js (from rev 19941, trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin.dev.js) (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,119 @@
</span><ins>+
+(function() {
+        tinymce.create('tinymce.plugins.wpGallery', {
+
+                init : function(ed, url) {
+                        var t = this;
+
+                        t.url = url;
+                        t._createButtons();
+
+                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
+                        ed.addCommand('WP_Gallery', function() {
+                                var el = ed.selection.getNode(), post_id, vp = tinymce.DOM.getViewPort(),
+                                        H = vp.h - 80, W = ( 640 &lt; vp.w ) ? 640 : vp.w;
+
+                                if ( el.nodeName != 'IMG' ) return;
+                                if ( ed.dom.getAttrib(el, 'class').indexOf('wpGallery') == -1 )        return;
+
+                                post_id = tinymce.DOM.get('post_ID').value;
+                                tb_show('', tinymce.documentBaseURL + '/media-upload.php?post_id='+post_id+'&amp;tab=gallery&amp;TB_iframe=true&amp;width='+W+'&amp;height='+H);
+
+                                tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
+                        });
+
+                        ed.onMouseDown.add(function(ed, e) {
+                                if ( e.target.nodeName == 'IMG' &amp;&amp; ed.dom.hasClass(e.target, 'wpGallery') )
+                                        ed.plugins.wordpress._showButtons(e.target, 'wp_gallerybtns');
+                        });
+
+                        ed.onBeforeSetContent.add(function(ed, o) {
+                                o.content = t._do_gallery(o.content);
+                        });
+
+                        ed.onPostProcess.add(function(ed, o) {
+                                if (o.get)
+                                        o.content = t._get_gallery(o.content);
+                        });
+                },
+
+                _do_gallery : function(co) {
+                        return co.replace(/\[gallery([^\]]*)\]/g, function(a,b){
+                                return '&lt;img src=&quot;'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif&quot; class=&quot;wpGallery mceItem&quot; title=&quot;gallery'+tinymce.DOM.encode(b)+'&quot; /&gt;';
+                        });
+                },
+
+                _get_gallery : function(co) {
+
+                        function getAttr(s, n) {
+                                n = new RegExp(n + '=\&quot;([^\&quot;]+)\&quot;', 'g').exec(s);
+                                return n ? tinymce.DOM.decode(n[1]) : '';
+                        };
+
+                        return co.replace(/(?:&lt;p[^&gt;]*&gt;)*(&lt;img[^&gt;]+&gt;)(?:&lt;\/p&gt;)*/g, function(a,im) {
+                                var cls = getAttr(im, 'class');
+
+                                if ( cls.indexOf('wpGallery') != -1 )
+                                        return '&lt;p&gt;['+tinymce.trim(getAttr(im, 'title'))+']&lt;/p&gt;';
+
+                                return a;
+                        });
+                },
+
+                _createButtons : function() {
+                        var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, editButton, dellButton;
+
+                        DOM.remove('wp_gallerybtns');
+
+                        DOM.add(document.body, 'div', {
+                                id : 'wp_gallerybtns',
+                                style : 'display:none;'
+                        });
+
+                        editButton = DOM.add('wp_gallerybtns', 'img', {
+                                src : t.url+'/img/edit.png',
+                                id : 'wp_editgallery',
+                                width : '24',
+                                height : '24',
+                                title : ed.getLang('wordpress.editgallery')
+                        });
+
+                        tinymce.dom.Event.add(editButton, 'mousedown', function(e) {
+                                var ed = tinyMCE.activeEditor;
+                                ed.windowManager.bookmark = ed.selection.getBookmark('simple');
+                                ed.execCommand(&quot;WP_Gallery&quot;);
+                        });
+
+                        dellButton = DOM.add('wp_gallerybtns', 'img', {
+                                src : t.url+'/img/delete.png',
+                                id : 'wp_delgallery',
+                                width : '24',
+                                height : '24',
+                                title : ed.getLang('wordpress.delgallery')
+                        });
+
+                        tinymce.dom.Event.add(dellButton, 'mousedown', function(e) {
+                                var ed = tinyMCE.activeEditor, el = ed.selection.getNode();
+
+                                if ( el.nodeName == 'IMG' &amp;&amp; ed.dom.hasClass(el, 'wpGallery') ) {
+                                        ed.dom.remove(el);
+
+                                        ed.execCommand('mceRepaint');
+                                        return false;
+                                }
+                        });
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'Gallery Settings',
+                                author : 'WordPress',
+                                authorurl : 'http://wordpress.org',
+                                infourl : '',
+                                version : &quot;1.0&quot;
+                        };
+                }
+        });
+
+        tinymce.PluginManager.add('wpgallery', tinymce.plugins.wpGallery);
+})();
</ins></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkeditor_plugindevjs"></a>
<div class="delfile"><h4>Deleted: trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js (19944 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js        2012-02-17 23:40:02 UTC (rev 19944)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -1,60 +0,0 @@
</span><del>-(function() {
-        tinymce.create('tinymce.plugins.wpLink', {
-                /**
-                 * Initializes the plugin, this will be executed after the plugin has been created.
-                 * This call is done before the editor instance has finished it's initialization so use the onInit event
-                 * of the editor instance to intercept that event.
-                 *
-                 * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
-                 * @param {string} url Absolute URL to where the plugin is located.
-                 */
-                init : function(ed, url) {
-                        var disabled = true;
-
-                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
-                        ed.addCommand('WP_Link', function() {
-                                if ( disabled )
-                                        return;
-                                ed.windowManager.open({
-                                        id : 'wp-link',
-                                        width : 480,
-                                        height : &quot;auto&quot;,
-                                        wpDialog : true,
-                                        title : ed.getLang('advlink.link_desc')
-                                }, {
-                                        plugin_url : url // Plugin absolute URL
-                                });
-                        });
-
-                        // Register example button
-                        ed.addButton('link', {
-                                title : ed.getLang('advanced.link_desc'),
-                                cmd : 'WP_Link'
-                        });
-
-                        ed.addShortcut('alt+shift+a', ed.getLang('advanced.link_desc'), 'WP_Link');
-
-                        ed.onNodeChange.add(function(ed, cm, n, co) {
-                                disabled = co &amp;&amp; n.nodeName != 'A';
-                        });
-                },
-                /**
-                 * Returns information about the plugin as a name/value array.
-                 * The current keys are longname, author, authorurl, infourl and version.
-                 *
-                 * @return {Object} Name/value array containing information about the plugin.
-                 */
-                getInfo : function() {
-                        return {
-                                longname : 'WordPress Link Dialog',
-                                author : 'WordPress',
-                                authorurl : 'http://wordpress.org',
-                                infourl : '',
-                                version : &quot;1.0&quot;
-                        };
-                }
-        });
-
-        // Register plugin
-        tinymce.PluginManager.add('wplink', tinymce.plugins.wpLink);
-})();
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcepluginswplinkeditor_plugin_srcjsfromrev19941trunkwpincludesjstinymcepluginswplinkeditor_plugindevjs"></a>
<div class="copfile"><h4>Copied: trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js (from rev 19941, trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin.dev.js) (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+(function() {
+        tinymce.create('tinymce.plugins.wpLink', {
+                /**
+                 * Initializes the plugin, this will be executed after the plugin has been created.
+                 * This call is done before the editor instance has finished it's initialization so use the onInit event
+                 * of the editor instance to intercept that event.
+                 *
+                 * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
+                 * @param {string} url Absolute URL to where the plugin is located.
+                 */
+                init : function(ed, url) {
+                        var disabled = true;
+
+                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
+                        ed.addCommand('WP_Link', function() {
+                                if ( disabled )
+                                        return;
+                                ed.windowManager.open({
+                                        id : 'wp-link',
+                                        width : 480,
+                                        height : &quot;auto&quot;,
+                                        wpDialog : true,
+                                        title : ed.getLang('advlink.link_desc')
+                                }, {
+                                        plugin_url : url // Plugin absolute URL
+                                });
+                        });
+
+                        // Register example button
+                        ed.addButton('link', {
+                                title : ed.getLang('advanced.link_desc'),
+                                cmd : 'WP_Link'
+                        });
+
+                        ed.addShortcut('alt+shift+a', ed.getLang('advanced.link_desc'), 'WP_Link');
+
+                        ed.onNodeChange.add(function(ed, cm, n, co) {
+                                disabled = co &amp;&amp; n.nodeName != 'A';
+                        });
+                },
+                /**
+                 * Returns information about the plugin as a name/value array.
+                 * The current keys are longname, author, authorurl, infourl and version.
+                 *
+                 * @return {Object} Name/value array containing information about the plugin.
+                 */
+                getInfo : function() {
+                        return {
+                                longname : 'WordPress Link Dialog',
+                                author : 'WordPress',
+                                authorurl : 'http://wordpress.org',
+                                infourl : '',
+                                version : &quot;1.0&quot;
+                        };
+                }
+        });
+
+        // Register plugin
+        tinymce.PluginManager.add('wplink', tinymce.plugins.wpLink);
+})();
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjstinymcethemesadvancededitor_template_srcjs"></a>
<div class="addfile"><h4>Added: trunk/wp-includes/js/tinymce/themes/advanced/editor_template_src.js (0 => 19945)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/tinymce/themes/advanced/editor_template_src.js                                (rev 0)
+++ trunk/wp-includes/js/tinymce/themes/advanced/editor_template_src.js        2012-02-18 06:43:47 UTC (rev 19945)
</span><span class="lines">@@ -0,0 +1,1362 @@
</span><ins>+/**
+ * editor_template_src.js
+ *
+ * Copyright 2009, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://tinymce.moxiecode.com/license
+ * Contributing: http://tinymce.moxiecode.com/contributing
+ */
+
+(function(tinymce) {
+        var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
+
+        // Tell it to load theme specific language pack(s)
+        tinymce.ThemeManager.requireLangPack('advanced');
+
+        tinymce.create('tinymce.themes.AdvancedTheme', {
+                sizes : [8, 10, 12, 14, 18, 24, 36],
+
+                // Control name lookup, format: title, command
+                controls : {
+                        bold : ['bold_desc', 'Bold'],
+                        italic : ['italic_desc', 'Italic'],
+                        underline : ['underline_desc', 'Underline'],
+                        strikethrough : ['striketrough_desc', 'Strikethrough'],
+                        justifyleft : ['justifyleft_desc', 'JustifyLeft'],
+                        justifycenter : ['justifycenter_desc', 'JustifyCenter'],
+                        justifyright : ['justifyright_desc', 'JustifyRight'],
+                        justifyfull : ['justifyfull_desc', 'JustifyFull'],
+                        bullist : ['bullist_desc', 'InsertUnorderedList'],
+                        numlist : ['numlist_desc', 'InsertOrderedList'],
+                        outdent : ['outdent_desc', 'Outdent'],
+                        indent : ['indent_desc', 'Indent'],
+                        cut : ['cut_desc', 'Cut'],
+                        copy : ['copy_desc', 'Copy'],
+                        paste : ['paste_desc', 'Paste'],
+                        undo : ['undo_desc', 'Undo'],
+                        redo : ['redo_desc', 'Redo'],
+                        link : ['link_desc', 'mceLink'],
+                        unlink : ['unlink_desc', 'unlink'],
+                        image : ['image_desc', 'mceImage'],
+                        cleanup : ['cleanup_desc', 'mceCleanup'],
+                        help : ['help_desc', 'mceHelp'],
+                        code : ['code_desc', 'mceCodeEditor'],
+                        hr : ['hr_desc', 'InsertHorizontalRule'],
+                        removeformat : ['removeformat_desc', 'RemoveFormat'],
+                        sub : ['sub_desc', 'subscript'],
+                        sup : ['sup_desc', 'superscript'],
+                        forecolor : ['forecolor_desc', 'ForeColor'],
+                        forecolorpicker : ['forecolor_desc', 'mceForeColor'],
+                        backcolor : ['backcolor_desc', 'HiliteColor'],
+                        backcolorpicker : ['backcolor_desc', 'mceBackColor'],
+                        charmap : ['charmap_desc', 'mceCharMap'],
+                        visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
+                        anchor : ['anchor_desc', 'mceInsertAnchor'],
+                        newdocument : ['newdocument_desc', 'mceNewDocument'],
+                        blockquote : ['blockquote_desc', 'mceBlockQuote']
+                },
+
+                stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
+
+                init : function(ed, url) {
+                        var t = this, s, v, o;
+        
+                        t.editor = ed;
+                        t.url = url;
+                        t.onResolveName = new tinymce.util.Dispatcher(this);
+
+                        ed.forcedHighContrastMode = ed.settings.detect_highcontrast &amp;&amp; t._isHighContrast();
+                        ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
+
+                        // Default settings
+                        t.settings = s = extend({
+                                theme_advanced_path : true,
+                                theme_advanced_toolbar_location : 'bottom',
+                                theme_advanced_buttons1 : &quot;bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect&quot;,
+                                theme_advanced_buttons2 : &quot;bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code&quot;,
+                                theme_advanced_buttons3 : &quot;hr,removeformat,visualaid,|,sub,sup,|,charmap&quot;,
+                                theme_advanced_blockformats : &quot;p,address,pre,h1,h2,h3,h4,h5,h6&quot;,
+                                theme_advanced_toolbar_align : &quot;center&quot;,
+                                theme_advanced_fonts : &quot;Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats&quot;,
+                                theme_advanced_more_colors : 1,
+                                theme_advanced_row_height : 23,
+                                theme_advanced_resize_horizontal : 1,
+                                theme_advanced_resizing_use_cookie : 1,
+                                theme_advanced_font_sizes : &quot;1,2,3,4,5,6,7&quot;,
+                                theme_advanced_font_selector : &quot;span&quot;,
+                                theme_advanced_show_current_color: 0,
+                                readonly : ed.settings.readonly
+                        }, ed.settings);
+
+                        // Setup default font_size_style_values
+                        if (!s.font_size_style_values)
+                                s.font_size_style_values = &quot;8pt,10pt,12pt,14pt,18pt,24pt,36pt&quot;;
+
+                        if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
+                                s.font_size_style_values = tinymce.explode(s.font_size_style_values);
+                                s.font_size_classes = tinymce.explode(s.font_size_classes || '');
+
+                                // Parse string value
+                                o = {};
+                                ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
+                                each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
+                                        var cl;
+
+                                        if (k == v &amp;&amp; v &gt;= 1 &amp;&amp; v &lt;= 7) {
+                                                k = v + ' (' + t.sizes[v - 1] + 'pt)';
+                                                cl = s.font_size_classes[v - 1];
+                                                v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
+                                        }
+
+                                        if (/^\s*\./.test(v))
+                                                cl = v.replace(/\./g, '');
+
+                                        o[k] = cl ? {'class' : cl} : {fontSize : v};
+                                });
+
+                                s.theme_advanced_font_sizes = o;
+                        }
+
+                        if ((v = s.theme_advanced_path_location) &amp;&amp; v != 'none')
+                                s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
+
+                        if (s.theme_advanced_statusbar_location == 'none')
+                                s.theme_advanced_statusbar_location = 0;
+
+                        if (ed.settings.content_css !== false)
+                                ed.contentCSS.push(ed.baseURI.toAbsolute(url + &quot;/skins/&quot; + ed.settings.skin + &quot;/content.css&quot;));
+
+                        // Init editor
+                        ed.onInit.add(function() {
+                                if (!ed.settings.readonly) {
+                                        ed.onNodeChange.add(t._nodeChanged, t);
+                                        ed.onKeyUp.add(t._updateUndoStatus, t);
+                                        ed.onMouseUp.add(t._updateUndoStatus, t);
+                                        ed.dom.bind(ed.dom.getRoot(), 'dragend', function() {
+                                                t._updateUndoStatus(ed);
+                                        });
+                                }
+                        });
+
+                        ed.onSetProgressState.add(function(ed, b, ti) {
+                                var co, id = ed.id, tb;
+
+                                if (b) {
+                                        t.progressTimer = setTimeout(function() {
+                                                co = ed.getContainer();
+                                                co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
+                                                tb = DOM.get(ed.id + '_tbl');
+
+                                                DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
+                                                DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
+                                        }, ti || 0);
+                                } else {
+                                        DOM.remove(id + '_blocker');
+                                        DOM.remove(id + '_progress');
+                                        clearTimeout(t.progressTimer);
+                                }
+                        });
+
+                        DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + &quot;/skins/&quot; + ed.settings.skin + &quot;/ui.css&quot;);
+
+                        if (s.skin_variant)
+                                DOM.loadCSS(url + &quot;/skins/&quot; + ed.settings.skin + &quot;/ui_&quot; + s.skin_variant + &quot;.css&quot;);
+                },
+
+                _isHighContrast : function() {
+                        var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});
+
+                        actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');
+                        DOM.remove(div);
+
+                        return actualColor != 'rgb(171,239,86)' &amp;&amp; actualColor != '#abef56';
+                },
+
+                createControl : function(n, cf) {
+                        var cd, c;
+
+                        if (c = cf.createControl(n))
+                                return c;
+
+                        switch (n) {
+                                case &quot;styleselect&quot;:
+                                        return this._createStyleSelect();
+
+                                case &quot;formatselect&quot;:
+                                        return this._createBlockFormats();
+
+                                case &quot;fontselect&quot;:
+                                        return this._createFontSelect();
+
+                                case &quot;fontsizeselect&quot;:
+                                        return this._createFontSizeSelect();
+
+                                case &quot;forecolor&quot;:
+                                        return this._createForeColorMenu();
+
+                                case &quot;backcolor&quot;:
+                                        return this._createBackColorMenu();
+                        }
+
+                        if ((cd = this.controls[n]))
+                                return cf.createButton(n, {title : &quot;advanced.&quot; + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
+                },
+
+                execCommand : function(cmd, ui, val) {
+                        var f = this['_' + cmd];
+
+                        if (f) {
+                                f.call(this, ui, val);
+                                return true;
+                        }
+
+                        return false;
+                },
+
+                _importClasses : function(e) {
+                        var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
+
+                        if (ctrl.getLength() == 0) {
+                                each(ed.dom.getClasses(), function(o, idx) {
+                                        var name = 'style_' + idx;
+
+                                        ed.formatter.register(name, {
+                                                inline : 'span',
+                                                attributes : {'class' : o['class']},
+                                                selector : '*'
+                                        });
+
+                                        ctrl.add(o['class'], name);
+                                });
+                        }
+                },
+
+                _createStyleSelect : function(n) {
+                        var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
+
+                        // Setup style select box
+                        ctrl = ctrlMan.createListBox('styleselect', {
+                                title : 'advanced.style_select',
+                                onselect : function(name) {
+                                        var matches, formatNames = [];
+
+                                        each(ctrl.items, function(item) {
+                                                formatNames.push(item.value);
+                                        });
+
+                                        ed.focus();
+                                        ed.undoManager.add();
+
+                                        // Toggle off the current format
+                                        matches = ed.formatter.matchAll(formatNames);
+                                        if (!name || matches[0] == name) {
+                                                if (matches[0]) 
+                                                        ed.formatter.remove(matches[0]);
+                                        } else
+                                                ed.formatter.apply(name);
+
+                                        ed.undoManager.add();
+                                        ed.nodeChanged();
+
+                                        return false; // No auto select
+                                }
+                        });
+
+                        // Handle specified format
+                        ed.onInit.add(function() {
+                                var counter = 0, formats = ed.getParam('style_formats');
+
+                                if (formats) {
+                                        each(formats, function(fmt) {
+                                                var name, keys = 0;
+
+                                                each(fmt, function() {keys++;});
+
+                                                if (keys &gt; 1) {
+                                                        name = fmt.name = fmt.name || 'style_' + (counter++);
+                                                        ed.formatter.register(name, fmt);
+                                                        ctrl.add(fmt.title, name);
+                                                } else
+                                                        ctrl.add(fmt.title);
+                                        });
+                                } else {
+                                        each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
+                                                var name;
+
+                                                if (val) {
+                                                        name = 'style_' + (counter++);
+
+                                                        ed.formatter.register(name, {
+                                                                inline : 'span',
+                                                                classes : val,
+                                                                selector : '*'
+                                                        });
+
+                                                        ctrl.add(t.editor.translate(key), name);
+                                                }
+                                        });
+                                }
+                        });
+
+                        // Auto import classes if the ctrl box is empty
+                        if (ctrl.getLength() == 0) {
+                                ctrl.onPostRender.add(function(ed, n) {
+                                        if (!ctrl.NativeListBox) {
+                                                Event.add(n.id + '_text', 'focus', t._importClasses, t);
+                                                Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
+                                                Event.add(n.id + '_open', 'focus', t._importClasses, t);
+                                                Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
+                                        } else
+                                                Event.add(n.id, 'focus', t._importClasses, t);
+                                });
+                        }
+
+                        return ctrl;
+                },
+
+                _createFontSelect : function() {
+                        var c, t = this, ed = t.editor;
+
+                        c = ed.controlManager.createListBox('fontselect', {
+                                title : 'advanced.fontdefault',
+                                onselect : function(v) {
+                                        var cur = c.items[c.selectedIndex];
+
+                                        if (!v &amp;&amp; cur) {
+                                                ed.execCommand('FontName', false, cur.value);
+                                                return;
+                                        }
+
+                                        ed.execCommand('FontName', false, v);
+
+                                        // Fake selection, execCommand will fire a nodeChange and update the selection
+                                        c.select(function(sv) {
+                                                return v == sv;
+                                        });
+
+                                        if (cur &amp;&amp; cur.value == v) {
+                                                c.select(null);
+                                        }
+
+                                        return false; // No auto select
+                                }
+                        });
+
+                        if (c) {
+                                each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
+                                        c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
+                                });
+                        }
+
+                        return c;
+                },
+
+                _createFontSizeSelect : function() {
+                        var t = this, ed = t.editor, c, i = 0, cl = [];
+
+                        c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
+                                var cur = c.items[c.selectedIndex];
+
+                                if (!v &amp;&amp; cur) {
+                                        cur = cur.value;
+
+                                        if (cur['class']) {
+                                                ed.formatter.toggle('fontsize_class', {value : cur['class']});
+                                                ed.undoManager.add();
+                                                ed.nodeChanged();
+                                        } else {
+                                                ed.execCommand('FontSize', false, cur.fontSize);
+                                        }
+
+                                        return;
+                                }
+
+                                if (v['class']) {
+                                        ed.focus();
+                                        ed.undoManager.add();
+                                        ed.formatter.toggle('fontsize_class', {value : v['class']});
+                                        ed.undoManager.add();
+                                        ed.nodeChanged();
+                                } else
+                                        ed.execCommand('FontSize', false, v.fontSize);
+
+                                // Fake selection, execCommand will fire a nodeChange and update the selection
+                                c.select(function(sv) {
+                                        return v == sv;
+                                });
+
+                                if (cur &amp;&amp; (cur.value.fontSize == v.fontSize || cur.value['class'] &amp;&amp; cur.value['class'] == v['class'])) {
+                                        c.select(null);
+                                }
+
+                                return false; // No auto select
+                        }});
+
+                        if (c) {
+                                each(t.settings.theme_advanced_font_sizes, function(v, k) {
+                                        var fz = v.fontSize;
+
+                                        if (fz &gt;= 1 &amp;&amp; fz &lt;= 7)
+                                                fz = t.sizes[parseInt(fz) - 1] + 'pt';
+
+                                        c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
+                                });
+                        }
+
+                        return c;
+                },
+
+                _createBlockFormats : function() {
+                        var c, fmts = {
+                                p : 'advanced.paragraph',
+                                address : 'advanced.address',
+                                pre : 'advanced.pre',
+                                h1 : 'advanced.h1',
+                                h2 : 'advanced.h2',
+                                h3 : 'advanced.h3',
+                                h4 : 'advanced.h4',
+                                h5 : 'advanced.h5',
+                                h6 : 'advanced.h6',
+                                div : 'advanced.div',
+                                blockquote : 'advanced.blockquote',
+                                code : 'advanced.code',
+                                dt : 'advanced.dt',
+                                dd : 'advanced.dd',
+                                samp : 'advanced.samp'
+                        }, t = this;
+
+                        c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) {
+                                t.editor.execCommand('FormatBlock', false, v);
+                                return false;
+                        }});
+
+                        if (c) {
+                                each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
+                                        c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v});
+                                });
+                        }
+
+                        return c;
+                },
+
+                _createForeColorMenu : function() {
+                        var c, t = this, s = t.settings, o = {}, v;
+
+                        if (s.theme_advanced_more_colors) {
+                                o.more_colors_func = function() {
+                                        t._mceColorPicker(0, {
+                                                color : c.value,
+                                                func : function(co) {
+                                                        c.setColor(co);
+                                                }
+                                        });
+                                };
+                        }
+
+                        if (v = s.theme_advanced_text_colors)
+                                o.colors = v;
+
+                        if (s.theme_advanced_default_foreground_color)
+                                o.default_color = s.theme_advanced_default_foreground_color;
+
+                        o.title = 'advanced.forecolor_desc';
+                        o.cmd = 'ForeColor';
+                        o.scope = this;
+
+                        c = t.editor.controlManager.createColorSplitButton('forecolor', o);
+
+                        return c;
+                },
+
+                _createBackColorMenu : function() {
+                        var c, t = this, s = t.settings, o = {}, v;
+
+                        if (s.theme_advanced_more_colors) {
+                                o.more_colors_func = function() {
+                                        t._mceColorPicker(0, {
+                                                color : c.value,
+                                                func : function(co) {
+                                                        c.setColor(co);
+                                                }
+                                        });
+                                };
+                        }
+
+                        if (v = s.theme_advanced_background_colors)
+                                o.colors = v;
+
+                        if (s.theme_advanced_default_background_color)
+                                o.default_color = s.theme_advanced_default_background_color;
+
+                        o.title = 'advanced.backcolor_desc';
+                        o.cmd = 'HiliteColor';
+                        o.scope = this;
+
+                        c = t.editor.controlManager.createColorSplitButton('backcolor', o);
+
+                        return c;
+                },
+
+                renderUI : function(o) {
+                        var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
+
+                        if (ed.settings) {
+                                ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');
+                        }
+
+                        // TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.
+                        // Maybe actually inherit it from the original textara?
+                        n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')});
+                        DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);
+
+                        if (!DOM.boxModel)
+                                n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
+
+                        n = sc = DOM.add(n, 'table', {role : &quot;presentation&quot;, id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
+                        n = tb = DOM.add(n, 'tbody');
+
+                        switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
+                                case &quot;rowlayout&quot;:
+                                        ic = t._rowLayout(s, tb, o);
+                                        break;
+
+                                case &quot;customlayout&quot;:
+                                        ic = ed.execCallback(&quot;theme_advanced_custom_layout&quot;, s, tb, o, p);
+                                        break;
+
+                                default:
+                                        ic = t._simpleLayout(s, tb, o, p);
+                        }
+
+                        n = o.targetNode;
+
+                        // Add classes to first and last TRs
+                        nl = sc.rows;
+                        DOM.addClass(nl[0], 'mceFirst');
+                        DOM.addClass(nl[nl.length - 1], 'mceLast');
+
+                        // Add classes to first and last TDs
+                        each(DOM.select('tr', tb), function(n) {
+                                DOM.addClass(n.firstChild, 'mceFirst');
+                                DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
+                        });
+
+                        if (DOM.get(s.theme_advanced_toolbar_container))
+                                DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
+                        else
+                                DOM.insertAfter(p, n);
+
+                        Event.add(ed.id + '_path_row', 'click', function(e) {
+                                e = e.target;
+
+                                if (e.nodeName == 'A') {
+                                        t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
+
+                                        return Event.cancel(e);
+                                }
+                        });
+/*
+                        if (DOM.get(ed.id + '_path_row')) {
+                                Event.add(ed.id + '_tbl', 'mouseover', function(e) {
+                                        var re;
+        
+                                        e = e.target;
+
+                                        if (e.nodeName == 'SPAN' &amp;&amp; DOM.hasClass(e.parentNode, 'mceButton')) {
+                                                re = DOM.get(ed.id + '_path_row');
+                                                t.lastPath = re.innerHTML;
+                                                DOM.setHTML(re, e.parentNode.title);
+                                        }
+                                });
+
+                                Event.add(ed.id + '_tbl', 'mouseout', function(e) {
+                                        if (t.lastPath) {
+                                                DOM.setHTML(ed.id + '_path_row', t.lastPath);
+                                                t.lastPath = 0;
+                                        }
+                                });
+                        }
+*/
+
+                        if (!ed.getParam('accessibility_focus'))
+                                Event.add(DOM.add(p, 'a', {href : '#'}, '&lt;!-- IE --&gt;'), 'focus', function() {tinyMCE.get(ed.id).focus();});
+
+                        if (s.theme_advanced_toolbar_location == 'external')
+                                o.deltaHeight = 0;
+
+                        t.deltaHeight = o.deltaHeight;
+                        o.targetNode = null;
+
+                        ed.onKeyDown.add(function(ed, evt) {
+                                var DOM_VK_F10 = 121, DOM_VK_F11 = 122;
+
+                                if (evt.altKey) {
+                                         if (evt.keyCode === DOM_VK_F10) {
+                                                // Make sure focus is given to toolbar in Safari.
+                                                // We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame
+                                                if (tinymce.isWebKit) {
+                                                        window.focus();
+                                                }
+                                                t.toolbarGroup.focus();
+                                                return Event.cancel(evt);
+                                        } else if (evt.keyCode === DOM_VK_F11) {
+                                                DOM.get(ed.id + '_path_row').focus();
+                                                return Event.cancel(evt);
+                                        }
+                                }
+                        });
+
+                        // alt+0 is the UK recommended shortcut for accessing the list of access controls.
+                        ed.addShortcut('alt+0', '', 'mceShortcuts', t);
+
+                        return {
+                                iframeContainer : ic,
+                                editorContainer : ed.id + '_parent',
+                                sizeContainer : sc,
+                                deltaHeight : o.deltaHeight
+                        };
+                },
+
+                getInfo : function() {
+                        return {
+                                longname : 'Advanced theme',
+                                author : 'Moxiecode Systems AB',
+                                authorurl : 'http://tinymce.moxiecode.com',
+                                version : tinymce.majorVersion + &quot;.&quot; + tinymce.minorVersion
+                        }
+                },
+
+                resizeBy : function(dw, dh) {
+                        var e = DOM.get(this.editor.id + '_ifr');
+
+                        this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
+                },
+
+                resizeTo : function(w, h, store) {
+                        var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
+
+                        // Boundery fix box
+                        w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
+                        h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
+                        w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
+                        h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
+
+                        // Resize iframe and container
+                        DOM.setStyle(e, 'height', '');
+                        DOM.setStyle(ifr, 'height', h);
+
+                        if (s.theme_advanced_resize_horizontal) {
+                                DOM.setStyle(e, 'width', '');
+                                DOM.setStyle(ifr, 'width', w);
+
+                                // Make sure that the size is never smaller than the over all ui
+                                if (w &lt; e.clientWidth) {
+                                        w = e.clientWidth;
+                                        DOM.setStyle(ifr, 'width', e.clientWidth);
+                                }
+                        }
+
+                        // Store away the size
+                        if (store &amp;&amp; s.theme_advanced_resizing_use_cookie) {
+                                Cookie.setHash(&quot;TinyMCE_&quot; + ed.id + &quot;_size&quot;, {
+                                        cw : w,
+                                        ch : h
+                                });
+                        }
+                },
+
+                destroy : function() {
+                        var id = this.editor.id;
+
+                        Event.clear(id + '_resize');
+                        Event.clear(id + '_path_row');
+                        Event.clear(id + '_external_close');
+                },
+
+                // Internal functions
+
+                _simpleLayout : function(s, tb, o, p) {
+                        var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
+
+                        if (s.readonly) {
+                                n = DOM.add(tb, 'tr');
+                                n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
+                                return ic;
+                        }
+
+                        // Create toolbar container at top
+                        if (lo == 'top')
+                                t._addToolbars(tb, o);
+
+                        // Create external toolbar
+                        if (lo == 'external') {
+                                n = c = DOM.create('div', {style : 'position:relative'});
+                                n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
+                                DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
+                                n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
+                                etb = DOM.add(n, 'tbody');
+
+                                if (p.firstChild.className == 'mceOldBoxModel')
+                                        p.firstChild.appendChild(c);
+                                else
+                                        p.insertBefore(c, p.firstChild);
+
+                                t._addToolbars(etb, o);
+
+                                ed.onMouseUp.add(function() {
+                                        var e = DOM.get(ed.id + '_external');
+                                        DOM.show(e);
+
+                                        DOM.hide(lastExtID);
+
+                                        var f = Event.add(ed.id + '_external_close', 'click', function() {
+                                                DOM.hide(ed.id + '_external');
+                                                Event.remove(ed.id + '_external_close', 'click', f);
+                                        });
+
+                                        DOM.show(e);
+                                        DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
+
+                                        // Fixes IE rendering bug
+                                        DOM.hide(e);
+                                        DOM.show(e);
+                                        e.style.filter = '';
+
+                                        lastExtID = ed.id + '_external';
+
+                                        e = null;
+                                });
+                        }
+
+                        if (sl == 'top')
+                                t._addStatusBar(tb, o);
+
+                        // Create iframe container
+                        if (!s.theme_advanced_toolbar_container) {
+                                n = DOM.add(tb, 'tr');
+                                n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
+                        }
+
+                        // Create toolbar container at bottom
+                        if (lo == 'bottom')
+                                t._addToolbars(tb, o);
+
+                        if (sl == 'bottom')
+                                t._addStatusBar(tb, o);
+
+                        return ic;
+                },
+
+                _rowLayout : function(s, tb, o) {
+                        var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
+
+                        dc = s.theme_advanced_containers_default_class || '';
+                        da = s.theme_advanced_containers_default_align || 'center';
+
+                        each(explode(s.theme_advanced_containers || ''), function(c, i) {
+                                var v = s['theme_advanced_container_' + c] || '';
+
+                                switch (c.toLowerCase()) {
+                                        case 'mceeditor':
+                                                n = DOM.add(tb, 'tr');
+                                                n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
+                                                break;
+
+                                        case 'mceelementpath':
+                                                t._addStatusBar(tb, o);
+                                                break;
+
+                                        default:
+                                                a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
+                                                a = 'mce' + t._ufirst(a);
+
+                                                n = DOM.add(DOM.add(tb, 'tr'), 'td', {
+                                                        'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
+                                                });
+
+                                                to = cf.createToolbar(&quot;toolbar&quot; + i);
+                                                t._addControls(v, to);
+                                                DOM.setHTML(n, to.renderHTML());
+                                                o.deltaHeight -= s.theme_advanced_row_height;
+                                }
+                        });
+
+                        return ic;
+                },
+
+                _addControls : function(v, tb) {
+                        var t = this, s = t.settings, di, cf = t.editor.controlManager;
+
+                        if (s.theme_advanced_disable &amp;&amp; !t._disabled) {
+                                di = {};
+
+                                each(explode(s.theme_advanced_disable), function(v) {
+                                        di[v] = 1;
+                                });
+
+                                t._disabled = di;
+                        } else
+                                di = t._disabled;
+
+                        each(explode(v), function(n) {
+                                var c;
+
+                                if (di &amp;&amp; di[n])
+                                        return;
+
+                                // Compatiblity with 2.x
+                                if (n == 'tablecontrols') {
+                                        each([&quot;table&quot;,&quot;|&quot;,&quot;row_props&quot;,&quot;cell_props&quot;,&quot;|&quot;,&quot;row_before&quot;,&quot;row_after&quot;,&quot;delete_row&quot;,&quot;|&quot;,&quot;col_before&quot;,&quot;col_after&quot;,&quot;delete_col&quot;,&quot;|&quot;,&quot;split_cells&quot;,&quot;merge_cells&quot;], function(n) {
+                                                n = t.createControl(n, cf);
+
+                                                if (n)
+                                                        tb.add(n);
+                                        });
+
+                                        return;
+                                }
+
+                                c = t.createControl(n, cf);
+
+                                if (c)
+                                        tb.add(c);
+                        });
+                },
+
+                _addToolbars : function(c, o) {
+                        var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup;
+
+                        toolbarGroup = cf.createToolbarGroup('toolbargroup', {
+                                'name': ed.getLang('advanced.toolbar'),
+                                'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')
+                        });
+
+                        t.toolbarGroup = toolbarGroup;
+
+                        a = s.theme_advanced_toolbar_align.toLowerCase();
+                        a = 'mce' + t._ufirst(a);
+
+                        n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, &quot;role&quot;:&quot;presentation&quot;});
+
+                        // Create toolbar and add the controls
+                        for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
+                                tb = cf.createToolbar(&quot;toolbar&quot; + i, {'class' : 'mceToolbarRow' + i});
+
+                                if (s['theme_advanced_buttons' + i + '_add'])
+                                        v += ',' + s['theme_advanced_buttons' + i + '_add'];
+
+                                if (s['theme_advanced_buttons' + i + '_add_before'])
+                                        v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
+
+                                t._addControls(v, tb);
+                                toolbarGroup.add(tb);
+
+                                o.deltaHeight -= s.theme_advanced_row_height;
+                        }
+                        h.push(toolbarGroup.renderHTML());
+                        h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang(&quot;advanced.toolbar_focus&quot;), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '&lt;!-- IE --&gt;'));
+                        DOM.setHTML(n, h.join(''));
+                },
+
+                _addStatusBar : function(tb, o) {
+                        var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
+
+                        n = DOM.add(tb, 'tr');
+                        n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'}); 
+                        n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
+                        if (s.theme_advanced_path) {
+                                DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
+                                DOM.add(n, 'span', {}, ': ');
+                        } else {
+                                DOM.add(n, 'span', {}, '&amp;#160;');
+                        }
+                        
+
+                        if (s.theme_advanced_resizing) {
+                                DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : &quot;return false;&quot;, 'class' : 'mceResize', tabIndex:&quot;-1&quot;});
+
+                                if (s.theme_advanced_resizing_use_cookie) {
+                                        ed.onPostRender.add(function() {
+                                                var o = Cookie.getHash(&quot;TinyMCE_&quot; + ed.id + &quot;_size&quot;), c = DOM.get(ed.id + '_tbl');
+
+                                                if (!o)
+                                                        return;
+
+                                                t.resizeTo(o.cw, o.ch);
+                                        });
+                                }
+
+                                ed.onPostRender.add(function() {
+                                        Event.add(ed.id + '_resize', 'click', function(e) {
+                                                e.preventDefault();
+                                        });
+
+                                        Event.add(ed.id + '_resize', 'mousedown', function(e) {
+                                                var mouseMoveHandler1, mouseMoveHandler2,
+                                                        mouseUpHandler1, mouseUpHandler2,
+                                                        startX, startY, startWidth, startHeight, width, height, ifrElm;
+
+                                                function resizeOnMove(e) {
+                                                        e.preventDefault();
+
+                                                        width = startWidth + (e.screenX - startX);
+                                                        height = startHeight + (e.screenY - startY);
+
+                                                        t.resizeTo(width, height);
+                                                };
+
+                                                function endResize(e) {
+                                                        // Stop listening
+                                                        Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
+                                                        Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
+                                                        Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
+                                                        Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
+
+                                                        width = startWidth + (e.screenX - startX);
+                                                        height = startHeight + (e.screenY - startY);
+                                                        t.resizeTo(width, height, true);
+                                                };
+
+                                                e.preventDefault();
+
+                                                // Get the current rect size
+                                                startX = e.screenX;
+                                                startY = e.screenY;
+                                                ifrElm = DOM.get(t.editor.id + '_ifr');
+                                                startWidth = width = ifrElm.clientWidth;
+                                                startHeight = height = ifrElm.clientHeight;
+
+                                                // Register envent handlers
+                                                mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
+                                                mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
+                                                mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
+                                                mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
+                                        });
+                                });
+                        }
+
+                        o.deltaHeight -= 21;
+                        n = tb = null;
+                },
+
+                _updateUndoStatus : function(ed) {
+                        var cm = ed.controlManager, um = ed.undoManager;
+
+                        cm.setDisabled('undo', !um.hasUndo() &amp;&amp; !um.typing);
+                        cm.setDisabled('redo', !um.hasRedo());
+                },
+
+                _nodeChanged : function(ed, cm, n, co, ob) {
+                        var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
+
+                        tinymce.each(t.stateControls, function(c) {
+                                cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
+                        });
+
+                        function getParent(name) {
+                                var i, parents = ob.parents, func = name;
+
+                                if (typeof(name) == 'string') {
+                                        func = function(node) {
+                                                return node.nodeName == name;
+                                        };
+                                }
+
+                                for (i = 0; i &lt; parents.length; i++) {
+                                        if (func(parents[i]))
+                                                return parents[i];
+                                }
+                        };
+
+                        cm.setActive('visualaid', ed.hasVisual);
+                        t._updateUndoStatus(ed);
+                        cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
+
+                        p = getParent('A');
+                        if (c = cm.get('link')) {
+                                if (!p || !p.name) {
+                                        c.setDisabled(!p &amp;&amp; co);
+                                        c.setActive(!!p);
+                                }
+                        }
+
+                        if (c = cm.get('unlink')) {
+                                c.setDisabled(!p &amp;&amp; co);
+                                c.setActive(!!p &amp;&amp; !p.name);
+                        }
+
+                        if (c = cm.get('anchor')) {
+                                c.setActive(!co &amp;&amp; !!p &amp;&amp; p.name);
+                        }
+
+                        p = getParent('IMG');
+                        if (c = cm.get('image'))
+                                c.setActive(!co &amp;&amp; !!p &amp;&amp; n.className.indexOf('mceItem') == -1);
+
+                        if (c = cm.get('styleselect')) {
+                                t._importClasses();
+
+                                formatNames = [];
+                                each(c.items, function(item) {
+                                        formatNames.push(item.value);
+                                });
+
+                                matches = ed.formatter.matchAll(formatNames);
+                                c.select(matches[0]);
+                        }
+
+                        if (c = cm.get('formatselect')) {
+                                p = getParent(DOM.isBlock);
+
+                                if (p)
+                                        c.select(p.nodeName.toLowerCase());
+                        }
+
+                        // Find out current fontSize, fontFamily and fontClass
+                        getParent(function(n) {
+                                if (n.nodeName === 'SPAN') {
+                                        if (!cl &amp;&amp; n.className)
+                                                cl = n.className;
+                                }
+
+                                if (ed.dom.is(n, s.theme_advanced_font_selector)) {
+                                        if (!fz &amp;&amp; n.style.fontSize)
+                                                fz = n.style.fontSize;
+
+                                        if (!fn &amp;&amp; n.style.fontFamily)
+                                                fn = n.style.fontFamily.replace(/[\&quot;\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
+                                        
+                                        if (!fc &amp;&amp; n.style.color)
+                                                fc = n.style.color;
+
+                                        if (!bc &amp;&amp; n.style.backgroundColor)
+                                                bc = n.style.backgroundColor;
+                                }
+
+                                return false;
+                        });
+
+                        if (c = cm.get('fontselect')) {
+                                c.select(function(v) {
+                                        return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
+                                });
+                        }
+
+                        // Select font size
+                        if (c = cm.get('fontsizeselect')) {
+                                // Use computed style
+                                if (s.theme_advanced_runtime_fontsize &amp;&amp; !fz &amp;&amp; !cl)
+                                        fz = ed.dom.getStyle(n, 'fontSize', true);
+
+                                c.select(function(v) {
+                                        if (v.fontSize &amp;&amp; v.fontSize === fz)
+                                                return true;
+
+                                        if (v['class'] &amp;&amp; v['class'] === cl)
+                                                return true;
+                                });
+                        }
+                        
+                        if (s.theme_advanced_show_current_color) {
+                                function updateColor(controlId, color) {
+                                        if (c = cm.get(controlId)) {
+                                                if (!color)
+                                                        color = c.settings.default_color;
+                                                if (color !== c.value) {
+                                                        c.displayColor(color);
+                                                }
+                                        }
+                                }
+                                updateColor('forecolor', fc);
+                                updateColor('backcolor', bc);
+                        }
+
+                        if (s.theme_advanced_show_current_color) {
+                                function updateColor(controlId, color) {
+                                        if (c = cm.get(controlId)) {
+                                                if (!color)
+                                                        color = c.settings.default_color;
+                                                if (color !== c.value) {
+                                                        c.displayColor(color);
+                                                }
+                                        }
+                                };
+
+                                updateColor('forecolor', fc);
+                                updateColor('backcolor', bc);
+                        }
+
+                        if (s.theme_advanced_path &amp;&amp; s.theme_advanced_statusbar_location) {
+                                p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
+
+                                if (t.statusKeyboardNavigation) {
+                                        t.statusKeyboardNavigation.destroy();
+                                        t.statusKeyboardNavigation = null;
+                                }
+
+                                DOM.setHTML(p, '');
+
+                                getParent(function(n) {
+                                        var na = n.nodeName.toLowerCase(), u, pi, ti = '';
+
+                                        // Ignore non element and bogus/hidden elements
+                                        if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))
+                                                return;
+
+                                        // Handle prefix
+                                        if (tinymce.isIE &amp;&amp; n.scopeName !== 'HTML')
+                                                na = n.scopeName + ':' + na;
+
+                                        // Remove internal prefix
+                                        na = na.replace(/mce\:/g, '');
+
+                                        // Handle node name
+                                        switch (na) {
+                                                case 'b':
+                                                        na = 'strong';
+                                                        break;
+
+                                                case 'i':
+                                                        na = 'em';
+                                                        break;
+
+                                                case 'img':
+                                                        if (v = DOM.getAttrib(n, 'src'))
+                                                                ti += 'src: ' + v + ' ';
+
+                                                        break;
+
+                                                case 'a':
+                                                        if (v = DOM.getAttrib(n, 'name')) {
+                                                                ti += 'name: ' + v + ' ';
+                                                                na += '#' + v;
+                                                        }
+
+                                                        if (v = DOM.getAttrib(n, 'href'))
+                                                                ti += 'href: ' + v + ' ';
+
+                                                        break;
+
+                                                case 'font':
+                                                        if (v = DOM.getAttrib(n, 'face'))
+                                                                ti += 'font: ' + v + ' ';
+
+                                                        if (v = DOM.getAttrib(n, 'size'))
+                                                                ti += 'size: ' + v + ' ';
+
+                                                        if (v = DOM.getAttrib(n, 'color'))
+                                                                ti += 'color: ' + v + ' ';
+
+                                                        break;
+
+                                                case 'span':
+                                                        if (v = DOM.getAttrib(n, 'style'))
+                                                                ti += 'style: ' + v + ' ';
+
+                                                        break;
+                                        }
+
+                                        if (v = DOM.getAttrib(n, 'id'))
+                                                ti += 'id: ' + v + ' ';
+
+                                        if (v = n.className) {
+                                                v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '')
+
+                                                if (v) {
+                                                        ti += 'class: ' + v + ' ';
+
+                                                        if (DOM.isBlock(n) || na == 'img' || na == 'span')
+                                                                na += '.' + v;
+                                                }
+                                        }
+
+                                        na = na.replace(/(html:)/g, '');
+                                        na = {name : na, node : n, title : ti};
+                                        t.onResolveName.dispatch(t, na);
+                                        ti = na.title;
+                                        na = na.name;
+
+                                        //u = &quot;javascript:tinymce.EditorManager.get('&quot; + ed.id + &quot;').theme._sel('&quot; + (de++) + &quot;');&quot;;
+                                        pi = DOM.create('a', {'href' : &quot;javascript:;&quot;, role: 'button', onmousedown : &quot;return false;&quot;, title : ti, 'class' : 'mcePath_' + (de++)}, na);
+
+                                        if (p.hasChildNodes()) {
+                                                p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild);
+                                                p.insertBefore(pi, p.firstChild);
+                                        } else
+                                                p.appendChild(pi);
+                                }, ed.getBody());
+
+                                if (DOM.select('a', p).length &gt; 0) {
+                                        t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
+                                                root: ed.id + &quot;_path_row&quot;,
+                                                items: DOM.select('a', p),
+                                                excludeFromTabOrder: true,
+                                                onCancel: function() {
+                                                        ed.focus();
+                                                }
+                                        }, DOM);
+                                }
+                        }
+                },
+
+                // Commands gets called by execCommand
+
+                _sel : function(v) {
+                        this.editor.execCommand('mceSelectNodeDepth', false, v);
+                },
+
+                _mceInsertAnchor : function(ui, v) {
+                        var ed = this.editor;
+
+                        ed.windowManager.open({
+                                url : this.url + '/anchor.htm',
+                                width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
+                                height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
+                                inline : true
+                        }, {
+                                theme_url : this.url
+                        });
+                },
+
+                _mceCharMap : function() {
+                        var ed = this.editor;
+
+                        ed.windowManager.open({
+                                url : this.url + '/charmap.htm',
+                                width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
+                                height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
+                                inline : true
+                        }, {
+                                theme_url : this.url
+                        });
+                },
+
+                _mceHelp : function() {
+                        var ed = this.editor;
+
+                        ed.windowManager.open({
+                                url : this.url + '/about.htm',
+                                width : 480,
+                                height : 380,
+                                inline : true
+                        }, {
+                                theme_url : this.url
+                        });
+                },
+
+                _mceShortcuts : function() {
+                        var ed = this.editor;
+                        ed.windowManager.open({
+                                url: this.url + '/shortcuts.htm',
+                                width: 480,
+                                height: 380,
+                                inline: true
+                        }, {
+                                theme_url: this.url
+                        });
+                },
+
+                _mceColorPicker : function(u, v) {
+                        var ed = this.editor;
+
+                        v = v || {};
+
+                        ed.windowManager.open({
+                                url : this.url + '/color_picker.htm',
+                                width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
+                                height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
+                                close_previous : false,
+                                inline : true
+                        }, {
+                                input_color : v.color,
+                                func : v.func,
+                                theme_url : this.url
+                        });
+                },
+
+                _mceCodeEditor : function(ui, val) {
+                        var ed = this.editor;
+
+                        ed.windowManager.open({
+                                url : this.url + '/source_editor.htm',
+                                width : parseInt(ed.getParam(&quot;theme_advanced_source_editor_width&quot;, 720)),
+                                height : parseInt(ed.getParam(&quot;theme_advanced_source_editor_height&quot;, 580)),
+                                inline : true,
+                                resizable : true,
+                                maximizable : true
+                        }, {
+                                theme_url : this.url
+                        });
+                },
+
+                _mceImage : function(ui, val) {
+                        var ed = this.editor;
+
+                        // Internal image object like a flash placeholder
+                        if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
+                                return;
+
+                        ed.windowManager.open({
+                                url : this.url + '/image.htm',
+                                width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
+                                height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
+                                inline : true
+                        }, {
+                                theme_url : this.url
+                        });
+                },
+
+                _mceLink : function(ui, val) {
+                        var ed = this.editor;
+
+                        ed.windowManager.open({
+                                url : this.url + '/link.htm',
+                                width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
+                                height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
+                                inline : true
+                        }, {
+                                theme_url : this.url
+                        });
+                },
+
+                _mceNewDocument : function() {
+                        var ed = this.editor;
+
+                        ed.windowManager.confirm('advanced.newdocument', function(s) {
+                                if (s)
+                                        ed.execCommand('mceSetContent', false, '');
+                        });
+                },
+
+                _mceForeColor : function() {
+                        var t = this;
+
+                        this._mceColorPicker(0, {
+                                color: t.fgColor,
+                                func : function(co) {
+                                        t.fgColor = co;
+                                        t.editor.execCommand('ForeColor', false, co);
+                                }
+                        });
+                },
+
+                _mceBackColor : function() {
+                        var t = this;
+
+                        this._mceColorPicker(0, {
+                                color: t.bgColor,
+                                func : function(co) {
+                                        t.bgColor = co;
+                                        t.editor.execCommand('HiliteColor', false, co);
+                                }
+                        });
+                },
+
+                _ufirst : function(s) {
+                        return s.substring(0, 1).toUpperCase() + s.substring(1);
+                }
+        });
+
+        tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
+}(tinymce));
</ins><span class="cx">Property changes on: trunk/wp-includes/js/tinymce/themes/advanced/editor_template_src.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
</div>

</body>
</html>