diff --git a/Gruntfile.js b/Gruntfile.js index a498e0cd92..323c9a19e7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -17,13 +17,7 @@ module.exports = function(grunt) { cwd: BUILD_DIR, src: [] }, - tinymce: { - src: [ - '<%= concat.tinymce.dest %>', - BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce-schema.min.js', - BUILD_DIR + 'wp-includes/js/tinymce/mark_loaded.js' - ] - }, + tinymce: ['<%= concat.tinymce.dest %>'], qunit: ['tests/qunit/compiled.html'] }, copy: { @@ -191,9 +185,8 @@ module.exports = function(grunt) { 'wp-includes/js/mediaelement/wp-mediaelement.js', 'wp-includes/js/plupload/handlers.js', 'wp-includes/js/plupload/wp-plupload.js', - 'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js', - 'wp-includes/js/tinymce/plugins/wp*/editor_plugin_src.js', - 'wp-includes/js/tinymce/mark_loaded_src.js', + 'wp-includes/js/tinymce/plugins/wordpress/plugin.js', + 'wp-includes/js/tinymce/plugins/wp*/plugin.js', // Third party scripts '!wp-admin/js/farbtastic.js', '!wp-admin/js/iris.min.js', @@ -262,8 +255,9 @@ module.exports = function(grunt) { 'wp-includes/js/*.js', 'wp-includes/js/plupload/handlers.js', 'wp-includes/js/plupload/wp-plupload.js', - 'wp-includes/js/tinymce/plugins/wp*/js/*.js', - 'wp-includes/js/tinymce/wp-tinymce-schema.js', + 'wp-includes/js/tinymce/plugins/wordpress/plugin.js', + 'wp-includes/js/tinymce/plugins/wp*/plugin.js', + // Exceptions '!wp-admin/js/custom-header.js', // Why? We should minify this. '!wp-admin/js/farbtastic.js', @@ -271,26 +265,8 @@ module.exports = function(grunt) { '!wp-includes/js/backbone.min.js', '!wp-includes/js/swfobject.js', '!wp-includes/js/underscore.min.js', - '!wp-includes/js/zxcvbn.min.js', - // Hard-coded in editimage.html - '!wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js' + '!wp-includes/js/zxcvbn.min.js' ] - }, - tinymce: { - expand: true, - cwd: SOURCE_DIR, - dest: BUILD_DIR, - src: [ - 'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js', - 'wp-includes/js/tinymce/plugins/wp*/editor_plugin_src.js', - 'wp-includes/js/tinymce/mark_loaded_src.js' - ], - // TinyMCE plugins use a nonstandard naming scheme: plugin files are named - // `editor_plugin_src.js`, and are compressed into `editor_plugin.js`. - rename: function(destBase, destPath) { - destPath = destPath.replace(/_src.js$/, '.js'); - return path.join(destBase || '', destPath); - } } }, concat: { @@ -302,11 +278,9 @@ module.exports = function(grunt) { } }, src: [ - BUILD_DIR + 'wp-includes/js/tinymce/tiny_mce.js', - BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce-schema.min.js', - BUILD_DIR + 'wp-includes/js/tinymce/themes/advanced/editor_template.js', - BUILD_DIR + 'wp-includes/js/tinymce/plugins/*/editor_plugin.js', - BUILD_DIR + 'wp-includes/js/tinymce/mark_loaded.js' + BUILD_DIR + 'wp-includes/js/tinymce/tinymce.min.js', + BUILD_DIR + 'wp-includes/js/tinymce/themes/modern/theme.min.js', + BUILD_DIR + 'wp-includes/js/tinymce/plugins/*/plugin.min.js' ], dest: BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce.js' } @@ -370,7 +344,7 @@ module.exports = function(grunt) { // Build task. grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'colors', 'rtl', 'cssmin:rtl', 'cssmin:colors', - 'uglify:core', 'uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']); + 'uglify:core', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']); // Testing tasks. grunt.registerMultiTask('phpunit', 'Runs PHPUnit tests, including the ajax and multisite tests.', function() { @@ -383,6 +357,7 @@ module.exports = function(grunt) { grunt.registerTask('qunit:compiled', 'Runs QUnit tests on compiled as well as uncompiled scripts.', ['build', 'copy:qunit', 'qunit']); + grunt.registerTask('test', 'Runs all QUnit and PHPUnit tasks.', ['qunit:compiled', 'phpunit']); // Default task. diff --git a/src/wp-admin/css/wp-admin.css b/src/wp-admin/css/wp-admin.css index cb8d3ddd7b..29bc4c97f4 100644 --- a/src/wp-admin/css/wp-admin.css +++ b/src/wp-admin/css/wp-admin.css @@ -4315,7 +4315,7 @@ td.plugin-title p { } .autosave-info { - padding: 2px 15px; + padding: 2px; text-align: right; } @@ -4323,43 +4323,20 @@ td.plugin-title p { border: none; } -#content-resize-handle, -#post-body .wp_themeSkin .mceStatusbar a.mceResize { +#content-resize-handle { background: transparent url('../images/resize.gif') no-repeat scroll right bottom; width: 12px; - height: 12px; - cursor: se-resize; + cursor: n-resize; } -.rtl #content-resize-handle, -.rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize { - background: transparent url('../images/resize-rtl.gif') no-repeat scroll right bottom; -} - -#post-body .wp_themeSkin .mceStatusbar a.mceResize { - bottom: 3px; - position: absolute; - right: 3px; -} - -#post-body .postarea .wp_themeSkin .mceStatusbar a.mceResize { - bottom: -20px; -} - -#content-resize-handle { - position: absolute; - right: 3px; - bottom: -20px; +.rtl #content-resize-handle { + background: transparent url('../images/resize-rtl.gif') no-repeat scroll left bottom; } .press-this #content-resize-handle { bottom: 2px; } -.tmce-active #content-resize-handle { - display: none; -} - #wp-word-count { display: block; padding: 2px 10px; diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index 7970b8c5af..6188540a57 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -483,6 +483,9 @@ if ( post_type_supports($post_type, 'editor') ) { 'dfw' => true, 'tabfocus_elements' => 'insert-media-button,save-post', 'editor_height' => 360, + 'tinymce' => array( + 'resize' => false, + ), ) ); ?>
| 0' ); ?> | @@ -499,6 +502,7 @@ if ( post_type_supports($post_type, 'editor') ) { echo ''; } ?> +
]*>[\s\S]+?<\/\1>/g, function( a ) {
- a = a.replace( /
(\r\n|\n)?/g, '' );
- return a.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '' );
+ a = a.replace( /
(\r\n|\n)?/g, '' );
+ a = a.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '' );
+ return a.replace( /\r?\n/g, '' );
});
}
@@ -149,7 +189,7 @@ window.switchEditors = {
// put back the line breaks in pre|script
if ( preserve_linebreaks ) {
- content = content.replace( //g, '\n' );
+ content = content.replace( //g, '\n' );
}
// and the
tags in captions
@@ -181,7 +221,7 @@ window.switchEditors = {
if ( pee.indexOf( ']*>[\s\S]+?<\/\1>/g, function( a ) {
- return a.replace( /(\r\n|\n)/g, '' );
+ return a.replace( /(\r\n|\n)/g, '' );
});
}
@@ -230,7 +270,7 @@ window.switchEditors = {
// put back the line breaks in pre|script
if ( preserve_linebreaks ) {
- pee = pee.replace( //g, '\n' );
+ pee = pee.replace( //g, '\n' );
}
if ( preserve_br ) {
diff --git a/src/wp-admin/js/media-upload.js b/src/wp-admin/js/media-upload.js
index 549d660d94..8911b5b17c 100644
--- a/src/wp-admin/js/media-upload.js
+++ b/src/wp-admin/js/media-upload.js
@@ -6,24 +6,21 @@ var wpActiveEditor, send_to_editor;
send_to_editor = function(h) {
var ed, mce = typeof(tinymce) != 'undefined', qt = typeof(QTags) != 'undefined';
- if ( !wpActiveEditor ) {
+ if ( ! wpActiveEditor ) {
if ( mce && tinymce.activeEditor ) {
ed = tinymce.activeEditor;
wpActiveEditor = ed.id;
- } else if ( !qt ) {
+ } else if ( ! qt ) {
return false;
}
} else if ( mce ) {
- if ( tinymce.activeEditor && (tinymce.activeEditor.id == 'mce_fullscreen' || tinymce.activeEditor.id == 'wp_mce_fullscreen') )
- ed = tinymce.activeEditor;
- else
- ed = tinymce.get(wpActiveEditor);
+ ed = tinymce.get( wpActiveEditor );
}
- if ( ed && !ed.isHidden() ) {
+ if ( ed && ! ed.isHidden() ) {
// restore caret position on IE
- if ( tinymce.isIE && ed.windowManager.insertimagebookmark )
- ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);
+ // if ( tinymce.isIE && ed.windowManager.insertimagebookmark )
+ // ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);
if ( h.indexOf('[caption') !== -1 ) {
if ( ed.wpSetImgCaption )
@@ -78,7 +75,7 @@ var tb_position;
};
$(window).resize(function(){ tb_position(); });
-
+/*
// store caret position in IE
$(document).ready(function($){
$('a.thickbox').click(function(){
@@ -90,5 +87,5 @@ var tb_position;
}
});
});
-
+*/
})(jQuery);
diff --git a/src/wp-admin/js/post.js b/src/wp-admin/js/post.js
index 35f56548d7..5e25a7a252 100644
--- a/src/wp-admin/js/post.js
+++ b/src/wp-admin/js/post.js
@@ -812,114 +812,72 @@ jQuery(document).ready( function($) {
wptitlehint();
- // resizable textarea#content
- (function() {
- var textarea = $('textarea#content'), offset = null, el;
+ // Resize the visual and text editors
+ ( function() {
+ var editor, offset, mce,
+ $document = $( document ),
+ $textarea = $('textarea#content'),
+ $handle = $('#post-status-info');
+
// No point for touch devices
- if ( !textarea.length || 'ontouchstart' in window )
+ if ( ! $textarea.length || 'ontouchstart' in window ) {
return;
+ }
- function dragging(e) {
- textarea.height( Math.max(50, offset + e.pageY) + 'px' );
- return false;
+ function dragging( event ) {
+ if ( mce ) {
+ editor.theme.resizeTo( null, offset + event.pageY );
+ } else {
+ $textarea.height( Math.max( 50, offset + event.pageY ) );
+ }
+
+ event.preventDefault();
}
function endDrag() {
- var height;
+ var height, toolbarHeight;
- textarea.focus();
- $(document).unbind('mousemove', dragging).unbind('mouseup', endDrag);
+ if ( mce ) {
+ editor.focus();
+ toolbarHeight = $( '#wp-content-editor-container .mce-toolbar-grp' ).height();
+ height = parseInt( $('#content_ifr').css('height'), 10 ) + toolbarHeight - 28;
+ } else {
+ $textarea.focus();
+ height = parseInt( $textarea.css('height'), 10 );
+ }
- height = parseInt( textarea.css('height'), 10 );
+ $document.off( 'mousemove.wp-editor-resize mouseup.wp-editor-resize' );
// sanity check
- if ( height && height > 50 && height < 5000 )
+ if ( height && height > 50 && height < 5000 ) {
setUserSetting( 'ed_size', height );
+ }
}
- textarea.css('resize', 'none');
- el = $('
');
- $('#wp-content-wrap').append(el);
- el.on('mousedown', function(e) {
- offset = textarea.height() - e.pageY;
- textarea.blur();
- $(document).mousemove(dragging).mouseup(endDrag);
- return false;
+ $textarea.css( 'resize', 'none' );
+
+ $handle.on( 'mousedown.wp-editor-resize', function( event ) {
+ if ( typeof tinymce !== 'undefined' ) {
+ editor = tinymce.get('content');
+ }
+
+ if ( editor && ! editor.isHidden() ) {
+ mce = true;
+ offset = $('#content_ifr').height() - event.pageY;
+ } else {
+ mce = false;
+ offset = $textarea.height() - event.pageY;
+ $textarea.blur();
+ }
+
+ $document.on( 'mousemove.wp-editor-resize', dragging )
+ .on( 'mouseup.wp-editor-resize', endDrag );
+
+ event.preventDefault();
});
})();
- if ( typeof(tinymce) != 'undefined' ) {
- tinymce.onAddEditor.add(function(mce, ed){
- // iOS expands the iframe to full height and the user cannot adjust it.
- if ( ed.id != 'content' || tinymce.isIOS5 )
- return;
-
- function getHeight() {
- var height, node = document.getElementById('content_ifr'),
- ifr_height = node ? parseInt( node.style.height, 10 ) : 0,
- tb_height = $('#content_tbl tr.mceFirst').height();
-
- if ( !ifr_height || !tb_height )
- return false;
-
- // total height including toolbar and statusbar
- height = ifr_height + tb_height + 21;
- // textarea height = total height - 33px toolbar
- height -= 33;
-
- return height;
- }
-
- // resize TinyMCE to match the textarea height when switching Text -> Visual
- ed.onLoadContent.add( function() {
- var ifr_height, node = document.getElementById('content'),
- height = node ? parseInt( node.style.height, 10 ) : 0,
- tb_height = $('#content_tbl tr.mceFirst').height() || 33;
-
- // height cannot be under 50 or over 5000
- if ( !height || height < 50 || height > 5000 )
- height = 360; // default height for the main editor
-
- if ( getUserSetting( 'ed_size' ) > 5000 )
- setUserSetting( 'ed_size', 360 );
-
- // compensate for padding and toolbars
- ifr_height = ( height - tb_height ) + 12;
-
- // sanity check
- if ( ifr_height > 50 && ifr_height < 5000 ) {
- $('#content_tbl').css('height', '' );
- $('#content_ifr').css('height', ifr_height + 'px' );
- }
- });
-
- // resize the textarea to match TinyMCE's height when switching Visual -> Text
- ed.onSaveContent.add( function() {
- var height = getHeight();
-
- if ( !height || height < 50 || height > 5000 )
- return;
-
- $('textarea#content').css( 'height', height + 'px' );
- });
-
- // save on resizing TinyMCE
- ed.onPostRender.add(function() {
- $( '#content_resize' ).on( 'mousedown.wp-mce-resize', function() {
- $( document ).on( 'mouseup.wp-mce-resize', function() {
- var height;
-
- $(document).off('mouseup.wp-mce-resize');
-
- height = getHeight();
- // sanity check
- if ( height && height > 50 && height < 5000 )
- setUserSetting( 'ed_size', height );
- });
- });
- });
- });
-
+ if ( typeof tinymce !== 'undefined' ) {
// When changing post formats, change the editor body class
$( '#post-formats-select input.post-format' ).on( 'change.set-editor-class', function() {
var editor, body, format = this.id;
diff --git a/src/wp-admin/js/wp-fullscreen.js b/src/wp-admin/js/wp-fullscreen.js
index 6ffde31dc0..ffeec27b2f 100644
--- a/src/wp-admin/js/wp-fullscreen.js
+++ b/src/wp-admin/js/wp-fullscreen.js
@@ -1,132 +1,133 @@
/* global ajaxurl, deleteUserSetting, setUserSetting, switchEditors, tinymce, tinyMCEPreInit, wp_fullscreen_settings, wpActiveEditor:true, wpLink */
-/**
- * PubSub
- *
- * A lightweight publish/subscribe implementation.
- * Private use only!
- */
-var PubSub, fullscreen, wptitlehint;
-
-PubSub = function() {
- this.topics = {};
-};
-
-PubSub.prototype.subscribe = function( topic, callback ) {
- if ( ! this.topics[ topic ] )
- this.topics[ topic ] = [];
-
- this.topics[ topic ].push( callback );
- return callback;
-};
-
-PubSub.prototype.unsubscribe = function( topic, callback ) {
- var i, l,
- topics = this.topics[ topic ];
-
- if ( ! topics )
- return callback || [];
-
- // Clear matching callbacks
- if ( callback ) {
- for ( i = 0, l = topics.length; i < l; i++ ) {
- if ( callback == topics[i] )
- topics.splice( i, 1 );
- }
- return callback;
-
- // Clear all callbacks
- } else {
- this.topics[ topic ] = [];
- return topics;
- }
-};
-
-PubSub.prototype.publish = function( topic, args ) {
- var i, l, broken,
- topics = this.topics[ topic ];
-
- if ( ! topics )
- return;
-
- args = args || [];
-
- for ( i = 0, l = topics.length; i < l; i++ ) {
- broken = ( topics[i].apply( null, args ) === false || broken );
- }
- return ! broken;
-};
-
/**
* Distraction Free Writing
* (wp-fullscreen)
*
- * Access the API globally using the fullscreen variable.
+ * Access the API globally using the window.wp.editor.fullscreen variable.
*/
+( function( $, window ) {
+ var api, ps, s, toggleUI, uiTimer, PubSub,
+ oldheight = 0,
+ uiScrollTop = 0,
+ transitionend = 'transitionend webkitTransitionEnd',
+ $body = $( document.body ),
+ $document = $( document );
-(function($){
- var api, ps, bounder, s, timer, block, set_title_hint;
+ /**
+ * PubSub
+ *
+ * A lightweight publish/subscribe implementation.
+ *
+ * @access private
+ */
+ PubSub = function() {
+ this.topics = {};
+
+ this.subscribe = function( topic, callback ) {
+ if ( ! this.topics[ topic ] )
+ this.topics[ topic ] = [];
+
+ this.topics[ topic ].push( callback );
+ return callback;
+ };
+
+ this.unsubscribe = function( topic, callback ) {
+ var i, l,
+ topics = this.topics[ topic ];
+
+ if ( ! topics )
+ return callback || [];
+
+ // Clear matching callbacks
+ if ( callback ) {
+ for ( i = 0, l = topics.length; i < l; i++ ) {
+ if ( callback == topics[i] )
+ topics.splice( i, 1 );
+ }
+ return callback;
+
+ // Clear all callbacks
+ } else {
+ this.topics[ topic ] = [];
+ return topics;
+ }
+ };
+
+ this.publish = function( topic, args ) {
+ var i, l, broken,
+ topics = this.topics[ topic ];
+
+ if ( ! topics )
+ return;
+
+ args = args || [];
+
+ for ( i = 0, l = topics.length; i < l; i++ ) {
+ broken = ( topics[i].apply( null, args ) === false || broken );
+ }
+ return ! broken;
+ };
+ };
// Initialize the fullscreen/api object
- fullscreen = api = {};
+ api = {};
// Create the PubSub (publish/subscribe) interface.
ps = api.pubsub = new PubSub();
- timer = 0;
- block = false;
s = api.settings = { // Settings
- visible : false,
- mode : 'tinymce',
- editor_id : 'content',
- title_id : '',
- timer : 0,
- toolbar_shown : false
+ visible: false,
+ mode: 'tinymce',
+ id: '',
+ title_id: '',
+ timer: 0,
+ toolbar_shown: false
};
+ function _hideUI() {
+ $body.removeClass('wp-dfw-show-ui');
+ uiShown = false;
+ }
+
/**
- * Bounder
+ * toggleUI
*
- * Creates a function that publishes start/stop topics.
- * Used to throttle events.
+ * Toggle the CSS class to show/hide the toolbar, borders and statusbar.
*/
- bounder = api.bounder = function( start, stop, delay, e ) {
- var y, top;
+ toggleUI = api.toggleUI = function( hide ) {
+ clearTimeout( uiTimer );
- delay = delay || 1250;
-
- if ( e ) {
- y = e.pageY || e.clientY || e.offsetY;
- top = $(document).scrollTop();
-
- if ( !e.isDefaultPrevented ) // test if e ic jQuery normalized
- y = 135 + y;
-
- if ( y - top > 120 )
- return;
+ if ( ! $body.hasClass('wp-dfw-show-ui') ) {
+ $body.addClass('wp-dfw-show-ui');
}
- if ( block )
- return;
-
- block = true;
-
- setTimeout( function() {
- block = false;
- }, 400 );
-
- if ( s.timer )
- clearTimeout( s.timer );
- else
- ps.publish( start );
-
- function timed() {
- ps.publish( stop );
- s.timer = 0;
+ if ( hide === 'hide' ) {
+ uiTimer = setTimeout( _hideUI, 2000 );
}
-
- s.timer = setTimeout( timed, delay );
};
+ function resetCssPosition( add ) {
+ s.$dfwWrap.parents().each( function( i, parent ) {
+ var cssPosition, $parent = $(parent);
+
+ if ( add ) {
+ if ( parent.style.position ) {
+ $parent.data( 'wp-dfw-css-position', parent.style.position );
+ }
+
+ $parent.css( 'position', 'static' );
+ } else {
+ cssPosition = $parent.data( 'wp-dfw-css-position' );
+ cssPosition = cssPosition || '';
+ $parent.css( 'position', cssPosition );
+ }
+
+ if ( parent.nodeName === 'BODY' ) {
+ return false;
+ }
+ });
+ }
+
/**
* on()
*
@@ -135,29 +136,67 @@ PubSub.prototype.publish = function( topic, args ) {
* @param string mode Optional. Switch to the given mode before opening.
*/
api.on = function() {
- if ( s.visible )
+ var id, $dfwWrap, editor, titleId;
+
+ if ( s.visible ) {
return;
+ }
+
+ if ( ! s.$fullscreenFader ) {
+ api.ui.init();
+ }
// Settings can be added or changed by defining "wp_fullscreen_settings" JS object.
- if ( typeof(wp_fullscreen_settings) == 'object' )
- $.extend( s, wp_fullscreen_settings );
+ if ( typeof window.wp_fullscreen_settings === 'object' )
+ $.extend( s, window.wp_fullscreen_settings );
- s.editor_id = wpActiveEditor || 'content';
+ id = s.id || window.wpActiveEditor;
- if ( $('input#title').length && s.editor_id == 'content' )
- s.title_id = 'title';
- else if ( $('input#' + s.editor_id + '-title').length ) // the title input field should have [editor_id]-title HTML ID to be auto detected
- s.title_id = s.editor_id + '-title';
- else
- $('#wp-fullscreen-title, #wp-fullscreen-title-prompt-text').hide();
+ if ( ! id ) {
+ if ( s.hasTinymce ) {
+ id = tinymce.activeEditor.id;
+ } else {
+ return;
+ }
+ }
- s.mode = $('#' + s.editor_id).is(':hidden') ? 'tinymce' : 'html';
- s.qt_canvas = $('#' + s.editor_id).get(0);
+ s.id = id;
+ $dfwWrap = s.$dfwWrap = $( '#wp-' + id + '-wrap' );
- if ( ! s.element )
- api.ui.init();
+ if ( ! $dfwWrap.length ) {
+ return;
+ }
- s.is_mce_on = s.has_tinymce && typeof( tinymce.get(s.editor_id) ) != 'undefined';
+ s.$dfwTextarea = $( '#' + id );
+ s.$editorContainer = $dfwWrap.find( '.wp-editor-container' );
+ uiScrollTop = $document.scrollTop();
+
+ if ( s.hasTinymce ) {
+ s.editor = tinymce.get( id );
+ }
+
+ if ( s.editor && ! s.editor.isHidden() ) {
+ s.origHeight = $( '#' + id + '_ifr' ).height();
+ s.mode = 'tinymce';
+ } else {
+ s.origHeight = s.$dfwTextarea.height();
+ s.mode = 'html';
+ }
+
+ // Try to find title field
+ if ( typeof window.adminpage !== 'undefined' &&
+ ( window.adminpage === 'post-php' || window.adminpage === 'post-new-php' ) ) {
+
+ titleId = 'title';
+ } else {
+ titleId = id + '-title';
+ }
+
+ s.$dfwTitle = $( '#' + titleId );
+
+ if ( ! s.$dfwTitle.length ) {
+ s.$dfwTitle = null;
+ }
api.ui.fade( 'show', 'showing', 'shown' );
};
@@ -187,16 +226,32 @@ PubSub.prototype.publish = function( topic, args ) {
api.switchmode = function( to ) {
var from = s.mode;
- if ( ! to || ! s.visible || ! s.has_tinymce )
+ if ( ! to || ! s.visible || ! s.hasTinymce || typeof switchEditors === 'undefined' ) {
return from;
+ }
// Don't switch if the mode is the same.
if ( from == to )
return from;
- ps.publish( 'switchMode', [ from, to ] );
+ if ( to === 'tinymce' && ! s.editor ) {
+ s.editor = tinymce.get( s.id );
+
+ if ( ! s.editor && typeof tinyMCEPreInit !== 'undefined' &&
+ tinyMCEPreInit.mceInit && tinyMCEPreInit.mceInit[ s.id ] ) {
+
+ // If the TinyMCE instance hasn't been created, set the "wp_fulscreen" flag on creating it
+ tinyMCEPreInit.mceInit[ s.id ].wp_fullscreen = true;
+ }
+ }
+
s.mode = to;
- ps.publish( 'switchedMode', [ from, to ] );
+ switchEditors.go( s.id, to );
+ api.refreshButtons( true );
+
+ if ( to === 'html' ) {
+ setTimeout( api.resizeTextarea, 200 );
+ }
return to;
};
@@ -206,309 +261,190 @@ PubSub.prototype.publish = function( topic, args ) {
*/
api.save = function() {
- var hidden = $('#hiddenaction'), old = hidden.val(), spinner = $('#wp-fullscreen-save .spinner'),
- message = $('#wp-fullscreen-save span');
+ var $hidden = $('#hiddenaction'),
+ oldVal = $hidden.val(),
+ $spinner = $('#wp-fullscreen-save .spinner'),
+ $saveMessage = $('#wp-fullscreen-save .wp-fullscreen-saved-message')
+ $errorMessage = $('#wp-fullscreen-save .wp-fullscreen-error-message');
- spinner.show();
- api.savecontent();
+ $spinner.show();
+ $errorMessage.hide();
+ $hidden.val('wp-fullscreen-save-post');
- hidden.val('wp-fullscreen-save-post');
-
- $.post( ajaxurl, $('form#post').serialize(), function(r){
- spinner.hide();
- message.show();
-
- setTimeout( function(){
- message.fadeOut(1000);
- }, 3000 );
-
- if ( r.last_edited )
- $('#wp-fullscreen-save input').attr( 'title', r.last_edited );
-
- }, 'json');
-
- hidden.val(old);
- };
-
- api.savecontent = function() {
- var ed, content;
-
- if ( s.title_id )
- $('#' + s.title_id).val( $('#wp-fullscreen-title').val() );
-
- if ( s.mode === 'tinymce' && (ed = tinymce.get('wp_mce_fullscreen')) ) {
- content = ed.save();
- } else {
- content = $('#wp_mce_fullscreen').val();
+ if ( s.editor && ! s.editor.isHidden() ) {
+ s.editor.save();
}
- $('#' + s.editor_id).val( content );
- $(document).triggerHandler('wpcountwords', [ content ]);
+ $.ajax({
+ url: window.ajaxurl,
+ type: 'post',
+ data: $('form#post').serialize(),
+ dataType: 'json'
+ }).done( function( response ) {
+ $spinner.hide();
+
+ if ( response && response.success ) {
+ $saveMessage.show();
+
+ setTimeout( function() {
+ $saveMessage.fadeOut(300);
+ }, 3000 );
+
+ if ( response.data && response.data.last_edited ) {
+ $('#wp-fullscreen-save input').attr( 'title', response.data.last_edited );
+ }
+ } else {
+ $errorMessage.show();
+ }
+ }).fail( function() {
+ $spinner.hide();
+ $errorMessage.show();
+ });
+
+ $hidden.val( oldVal );
};
- set_title_hint = function( title ) {
- if ( ! title.val().length )
- title.siblings('label').css( 'visibility', '' );
- else
- title.siblings('label').css( 'visibility', 'hidden' );
- };
+ api.dfwWidth = function( pixels, total ) {
+ var width;
- api.dfw_width = function(n) {
- var el = $('#wp-fullscreen-wrap'), w = el.width();
+ if ( ! pixels ) {
+ // reset to theme width
+ width = $('#wp-fullscreen-body').data('theme-width') || 800;
+ s.$editorContainer.width( width );
+
+ if ( s.$dfwTitle ) {
+ s.$dfwTitle.width( width - 16 );
+ }
- if ( !n ) { // reset to theme width
- el.width( $('#wp-fullscreen-central-toolbar').width() );
deleteUserSetting('dfw_width');
return;
}
- w = n + w;
-
- if ( w < 200 || w > 1200 ) // sanity check
- return;
-
- el.width( w );
- setUserSetting('dfw_width', w);
- };
-
- ps.subscribe( 'showToolbar', function() {
- s.toolbars.removeClass('fade-1000').addClass('fade-300');
- api.fade.In( s.toolbars, 300, function(){ ps.publish('toolbarShown'); }, true );
- $('#wp-fullscreen-body').addClass('wp-fullscreen-focus');
- s.toolbar_shown = true;
- });
-
- ps.subscribe( 'hideToolbar', function() {
- s.toolbars.removeClass('fade-300').addClass('fade-1000');
- api.fade.Out( s.toolbars, 1000, function(){ ps.publish('toolbarHidden'); }, true );
- $('#wp-fullscreen-body').removeClass('wp-fullscreen-focus');
- });
-
- ps.subscribe( 'toolbarShown', function() {
- s.toolbars.removeClass('fade-300');
- });
-
- ps.subscribe( 'toolbarHidden', function() {
- s.toolbars.removeClass('fade-1000');
- s.toolbar_shown = false;
- });
-
- ps.subscribe( 'show', function() { // This event occurs before the overlay blocks the UI.
- var title;
-
- if ( s.title_id ) {
- title = $('#wp-fullscreen-title').val( $('#' + s.title_id).val() );
- set_title_hint( title );
+ if ( total ) {
+ width = pixels;
+ } else {
+ width = s.$editorContainer.width();
+ width += pixels;
}
- $('#wp-fullscreen-save input').attr( 'title', $('#last-edit').text() );
+ if ( width < 200 || width > 1200 ) {
+ // sanity check
+ return;
+ }
- s.textarea_obj.value = s.qt_canvas.value;
+ s.$editorContainer.width( width );
- if ( s.has_tinymce && s.mode === 'tinymce' )
- tinymce.execCommand('wpFullScreenInit');
+ if ( s.$dfwTitle ) {
+ s.$dfwTitle.width( width - 16 );
+ }
- s.orig_y = $(window).scrollTop();
+ setUserSetting( 'dfw_width', width );
+ };
+
+ // This event occurs before the overlay blocks the UI.
+ ps.subscribe( 'show', function() {
+ var title = $('#last-edit').text();
+
+ if ( title ) {
+ $('#wp-fullscreen-save input').attr( 'title', title );
+ }
});
- ps.subscribe( 'showing', function() { // This event occurs while the DFW overlay blocks the UI.
- $( document.body ).addClass( 'fullscreen-active' );
- api.refresh_buttons();
+ // This event occurs while the overlay blocks the UI.
+ ps.subscribe( 'showing', function() {
+ $body.addClass( 'wp-fullscreen-active' );
- $( document ).bind( 'mousemove.fullscreen', function(e) { bounder( 'showToolbar', 'hideToolbar', 2000, e ); } );
- bounder( 'showToolbar', 'hideToolbar', 2000 );
+ s.$dfwWrap.addClass( 'wp-fullscreen-wrap' );
+ s.$editorContainer.append( $('#wp-fullscreen-status') );
+
+ if ( s.$dfwTitle ) {
+ s.$dfwTitle.after( '' );
+ s.$dfwWrap.prepend( s.$dfwTitle.addClass('wp-fullscreen-title') );
+ }
+
+ api.refreshButtons();
+ resetCssPosition( true );
+ $('#wpadminbar').hide();
+
+ // Show the UI for 2 sec. when opening
+ toggleUI('hide');
api.bind_resize();
- setTimeout( api.resize_textarea, 200 );
+
+ if ( s.editor ) {
+ s.editor.execCommand( 'wpFullScreenOn' );
+ }
+
+ api.dfwWidth( $( '#wp-fullscreen-body' ).data('dfw-width') || 800, true );
// scroll to top so the user is not disoriented
scrollTo(0, 0);
-
- // needed it for IE7 and compat mode
- $('#wpadminbar').hide();
});
- ps.subscribe( 'shown', function() { // This event occurs after the DFW overlay is shown
- var interim_init;
-
+ // This event occurs after the overlay unblocks the UI
+ ps.subscribe( 'shown', function() {
s.visible = true;
- // init the standard TinyMCE instance if missing
- if ( s.has_tinymce && ! s.is_mce_on ) {
-
- interim_init = function(mce, ed) {
- var el = ed.getElement(), old_val = el.value, settings = tinyMCEPreInit.mceInit[s.editor_id];
-
- if ( settings && settings.wpautop && typeof(switchEditors) != 'undefined' )
- el.value = switchEditors.wpautop( el.value );
-
- ed.onInit.add(function(ed) {
- ed.hide();
- ed.getElement().value = old_val;
- tinymce.onAddEditor.remove(interim_init);
- });
- };
-
- tinymce.onAddEditor.add(interim_init);
- tinymce.init(tinyMCEPreInit.mceInit[s.editor_id]);
-
- s.is_mce_on = true;
+ if ( s.editor && ! s.editor.isHidden() ) {
+ s.editor.execCommand( 'wpAutoResize' );
+ } else {
+ api.resizeTextarea( 'force' );
}
-
- wpActiveEditor = 'wp_mce_fullscreen';
});
ps.subscribe( 'hide', function() { // This event occurs before the overlay blocks DFW.
- var htmled_is_hidden = $('#' + s.editor_id).is(':hidden');
- // Make sure the correct editor is displaying.
- if ( s.has_tinymce && s.mode === 'tinymce' && !htmled_is_hidden ) {
- switchEditors.go(s.editor_id, 'tmce');
- } else if ( s.mode === 'html' && htmled_is_hidden ) {
- switchEditors.go(s.editor_id, 'html');
- }
-
- // Save content must be after switchEditors or content will be overwritten. See #17229.
- api.savecontent();
-
- $( document ).unbind( '.fullscreen' );
- $(s.textarea_obj).unbind('.grow');
-
- if ( s.has_tinymce && s.mode === 'tinymce' )
- tinymce.execCommand('wpFullScreenSave');
-
- if ( s.title_id )
- set_title_hint( $('#' + s.title_id) );
-
- s.qt_canvas.value = s.textarea_obj.value;
+ $document.unbind( '.fullscreen' );
+ s.$dfwTextarea.unbind('.wp-dfw-resize');
});
ps.subscribe( 'hiding', function() { // This event occurs while the overlay blocks the DFW UI.
+ $body.removeClass( 'wp-fullscreen-active' );
+ $( '#wp-fullscreen-body' ).append( $('#wp-fullscreen-status') );
- $( document.body ).removeClass( 'fullscreen-active' );
- scrollTo(0, s.orig_y);
+ if ( s.$dfwTitle ) {
+ $( '#wp-fullscreen-title-placeholder' ).before( s.$dfwTitle.removeClass('wp-fullscreen-title') ).remove();
+ }
+
+ s.$dfwWrap.removeClass( 'wp-fullscreen-wrap' )
+ s.$editorContainer.css( 'width', '' );
+ s.$dfwTextarea.add( '#' + s.id + '_ifr' ).height( s.origHeight );
+
+ if ( s.editor ) {
+ s.editor.execCommand( 'wpFullScreenOff' );
+ }
+
+ resetCssPosition( false );
+
+ window.scrollTo( 0, uiScrollTop );
$('#wpadminbar').show();
});
- ps.subscribe( 'hidden', function() { // This event occurs after DFW is removed.
+ // This event occurs after DFW is removed.
+ ps.subscribe( 'hidden', function() {
s.visible = false;
- $('#wp_mce_fullscreen, #wp-fullscreen-title').removeAttr('style');
-
- if ( s.has_tinymce && s.is_mce_on )
- tinymce.execCommand('wpFullScreenClose');
-
- s.textarea_obj.value = '';
- api.oldheight = 0;
- wpActiveEditor = s.editor_id;
});
- ps.subscribe( 'switchMode', function( from, to ) {
- var ed;
-
- if ( !s.has_tinymce || !s.is_mce_on )
- return;
-
- ed = tinymce.get('wp_mce_fullscreen');
-
- if ( from === 'html' && to === 'tinymce' ) {
-
- if ( tinymce.get(s.editor_id).getParam('wpautop') && typeof(switchEditors) != 'undefined' )
- s.textarea_obj.value = switchEditors.wpautop( s.textarea_obj.value );
-
- if ( 'undefined' == typeof(ed) )
- tinymce.execCommand('wpFullScreenInit');
- else
- ed.show();
-
- } else if ( from === 'tinymce' && to === 'html' ) {
- if ( ed )
- ed.hide();
- }
- });
-
- ps.subscribe( 'switchedMode', function( from, to ) {
- api.refresh_buttons(true);
-
- if ( to === 'html' )
- setTimeout( api.resize_textarea, 200 );
- });
-
- /**
- * Buttons
- */
- api.b = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('Bold');
- };
-
- api.i = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('Italic');
- };
-
- api.ul = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('InsertUnorderedList');
- };
-
- api.ol = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('InsertOrderedList');
- };
-
- api.link = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('WP_Link');
- else
- wpLink.open();
- };
-
- api.unlink = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('unlink');
- };
-
- api.atd = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('mceWritingImprovementTool');
- };
-
- api.help = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('WP_Help');
- };
-
- api.blockquote = function() {
- if ( s.has_tinymce && 'tinymce' === s.mode )
- tinymce.execCommand('mceBlockQuote');
- };
-
- api.medialib = function() {
- if ( typeof wp !== 'undefined' && wp.media && wp.media.editor )
- wp.media.editor.open(s.editor_id);
- };
-
- api.refresh_buttons = function( fade ) {
- fade = fade || false;
-
+ api.refreshButtons = function( fade ) {
if ( s.mode === 'html' ) {
$('#wp-fullscreen-mode-bar').removeClass('wp-tmce-mode').addClass('wp-html-mode');
- if ( fade )
+ if ( fade ) {
$('#wp-fullscreen-button-bar').fadeOut( 150, function(){
$(this).addClass('wp-html-mode').fadeIn( 150 );
});
- else
+ } else {
$('#wp-fullscreen-button-bar').addClass('wp-html-mode');
-
+ }
} else if ( s.mode === 'tinymce' ) {
$('#wp-fullscreen-mode-bar').removeClass('wp-html-mode').addClass('wp-tmce-mode');
- if ( fade )
+ if ( fade ) {
$('#wp-fullscreen-button-bar').fadeOut( 150, function(){
$(this).removeClass('wp-html-mode').fadeIn( 150 );
});
- else
+ } else {
$('#wp-fullscreen-button-bar').removeClass('wp-html-mode');
+ }
}
};
@@ -519,29 +455,27 @@ PubSub.prototype.publish = function( topic, args ) {
*/
api.ui = {
init: function() {
- var topbar = $('#fullscreen-topbar'), txtarea = $('#wp_mce_fullscreen'), last = 0;
+ var toolbar, last = 0;
- s.toolbars = topbar.add( $('#wp-fullscreen-status') );
- s.element = $('#fullscreen-fader');
- s.textarea_obj = txtarea[0];
- s.has_tinymce = typeof(tinymce) != 'undefined';
+ s.toolbar = toolbar = $('#fullscreen-topbar');
+ s.$fullscreenFader = $('#fullscreen-fader');
+ s.hasTinymce = typeof tinymce !== 'undefined';
- if ( !s.has_tinymce )
+ if ( ! s.hasTinymce )
$('#wp-fullscreen-mode-bar').hide();
- if ( wptitlehint && $('#wp-fullscreen-title').length )
- wptitlehint('wp-fullscreen-title');
-
- $(document).keyup(function(e){
+ $document.keyup( function(e) {
var c = e.keyCode || e.charCode, a, data;
- if ( !fullscreen.settings.visible )
- return true;
+ if ( ! s.visible ) {
+ return;
+ }
- if ( navigator.platform && navigator.platform.indexOf('Mac') != -1 )
+ if ( navigator.platform && navigator.platform.indexOf('Mac') !== -1 ) {
a = e.ctrlKey; // Ctrl key for Mac
- else
+ } else {
a = e.altKey; // Alt key for Win & Linux
+ }
if ( 27 == c ) { // Esc
data = {
@@ -555,79 +489,102 @@ PubSub.prototype.publish = function( topic, args ) {
}
};
- if ( ! jQuery(document).triggerHandler( 'wp_CloseOnEscape', [data] ) )
+ if ( ! $(document).triggerHandler( 'wp_CloseOnEscape', [data] ) ) {
fullscreen.off();
+ }
}
if ( a && (61 == c || 107 == c || 187 == c) ) { // +
- api.dfw_width(25);
+ api.dfwWidth( 25 );
e.preventDefault();
}
if ( a && (45 == c || 109 == c || 189 == c) ) { // -
- api.dfw_width(-25);
+ api.dfwWidth( -25 );
e.preventDefault();
}
if ( a && 48 == c ) { // 0
- api.dfw_width(0);
+ api.dfwWidth( 0 );
e.preventDefault();
}
});
- // word count in Text mode
- if ( typeof(wpWordCount) != 'undefined' ) {
+ toolbar.on( 'mouseenter', function() {
+ toggleUI('show');
+ }).on( 'mouseleave', function() {
+ toggleUI('hide');
+ });
- txtarea.keyup( function(e) {
- var k = e.keyCode || e.charCode;
+ // Bind buttons
+ $('#wp-fullscreen-buttons').on( 'click.wp-fullscreen', function( event ) {
+ var command = event.target.id && event.target.id.substr(6);
- if ( k == last )
- return true;
+ if ( s.editor && 'tinymce' === s.mode ) {
+ switch( command ) {
+ case 'bold':
+ s.editor.execCommand('Bold');
+ break;
+ case 'italic':
+ s.editor.execCommand('Italic');
+ break;
+ case 'bullist':
+ s.editor.execCommand('InsertUnorderedList');
+ break;
+ case 'numlist':
+ s.editor.execCommand('InsertOrderedList');
+ break;
+ case 'link':
+ s.editor.execCommand('WP_Link');
+ break;
+ case 'unlink':
+ s.editor.execCommand('unlink');
+ break;
+ case 'image':
+ s.editor.execCommand('mceImage');
+ break;
+ case 'help':
+ s.editor.execCommand('WP_Help');
+ break;
+ case 'blockquote':
+ s.editor.execCommand('mceBlockQuote');
+ break;
+ }
+ } else if ( command === 'link' && window.wpLink ) {
+ window.wpLink.open();
+ }
- if ( 13 == k || 8 == last || 46 == last )
- $(document).triggerHandler('wpcountwords', [ txtarea.val() ]);
-
- last = k;
- return true;
- });
- }
-
- topbar.mouseenter(function(){
- s.toolbars.addClass('fullscreen-make-sticky');
- $( document ).unbind( '.fullscreen' );
- clearTimeout( s.timer );
- s.timer = 0;
- }).mouseleave(function(){
- s.toolbars.removeClass('fullscreen-make-sticky');
-
- if ( s.visible )
- $( document ).bind( 'mousemove.fullscreen', function(e) { bounder( 'showToolbar', 'hideToolbar', 2000, e ); } );
+ if ( command === 'wp-media-library' && typeof wp !== 'undefined' && wp.media && wp.media.editor ) {
+ wp.media.editor.open( s.id );
+ }
});
},
fade: function( before, during, after ) {
- if ( ! s.element )
+ if ( ! s.$fullscreenFader ) {
api.ui.init();
+ }
// If any callback bound to before returns false, bail.
- if ( before && ! ps.publish( before ) )
+ if ( before && ! ps.publish( before ) ) {
return;
+ }
- api.fade.In( s.element, 600, function() {
- if ( during )
+ api.fade.In( s.$fullscreenFader, 200, function() {
+ if ( during ) {
ps.publish( during );
+ }
- api.fade.Out( s.element, 600, function() {
- if ( after )
+ api.fade.Out( s.$fullscreenFader, 200, function() {
+ if ( after ) {
ps.publish( after );
+ }
});
});
}
};
api.fade = {
- transitionend: 'transitionend webkitTransitionEnd oTransitionEnd',
-
// Sensitivity to allow browsers to render the blank element before animating.
sensitivity: 100,
@@ -644,19 +601,22 @@ PubSub.prototype.publish = function( topic, args ) {
}
element.show();
- element.first().one( this.transitionend, function() {
+ element.first().one( transitionend, function() {
callback();
});
+
setTimeout( function() { element.addClass( 'fade-trigger' ); }, this.sensitivity );
} else {
- if ( stop )
+ if ( stop ) {
element.stop();
+ }
element.css( 'opacity', 1 );
element.first().fadeIn( speed, callback );
- if ( element.length > 1 )
+ if ( element.length > 1 ) {
element.not(':first').fadeIn( speed );
+ }
}
return element;
@@ -668,38 +628,43 @@ PubSub.prototype.publish = function( topic, args ) {
speed = speed || 400;
stop = stop || false;
- if ( ! element.is(':visible') )
+ if ( ! element.is(':visible') ) {
return element;
+ }
if ( api.fade.transitions ) {
- element.first().one( api.fade.transitionend, function() {
- if ( element.hasClass('fade-trigger') )
+ element.first().one( transitionend, function() {
+ if ( element.hasClass('fade-trigger') ) {
return;
+ }
element.hide();
callback();
});
setTimeout( function() { element.removeClass( 'fade-trigger' ); }, this.sensitivity );
} else {
- if ( stop )
+ if ( stop ) {
element.stop();
+ }
element.first().fadeOut( speed, callback );
- if ( element.length > 1 )
+ if ( element.length > 1 ) {
element.not(':first').fadeOut( speed );
+ }
}
return element;
},
- transitions: (function() { // Check if the browser supports CSS 3.0 transitions
- var s = document.documentElement.style;
+ // Check if the browser supports CSS 3.0 transitions
+ transitions: ( function() {
+ var style = document.documentElement.style;
- return ( typeof ( s.WebkitTransition ) == 'string' ||
- typeof ( s.MozTransition ) == 'string' ||
- typeof ( s.OTransition ) == 'string' ||
- typeof ( s.transition ) == 'string' );
+ return ( typeof style.WebkitTransition === 'string' ||
+ typeof style.MozTransition === 'string' ||
+ typeof style.OTransition === 'string' ||
+ typeof style.transition === 'string' );
})()
};
@@ -708,23 +673,23 @@ PubSub.prototype.publish = function( topic, args ) {
*
* Automatically updates textarea height.
*/
-
api.bind_resize = function() {
- $(s.textarea_obj).bind('keypress.grow click.grow paste.grow', function(){
- setTimeout( api.resize_textarea, 200 );
+ s.$dfwTextarea.on( 'keydown.wp-dfw-resize click.wp-dfw-resize paste.wp-dfw-resize', function(e) {
+ api.resizeTextarea(e);
});
};
- api.oldheight = 0;
- api.resize_textarea = function() {
- var txt = s.textarea_obj, newheight;
+ api.resizeTextarea = function( event ) {
+ var node = s.$dfwTextarea[0];
- newheight = txt.scrollHeight > 300 ? txt.scrollHeight : 300;
-
- if ( newheight != api.oldheight ) {
- txt.style.height = newheight + 'px';
- api.oldheight = newheight;
+ if ( node.scrollHeight > node.clientHeight ) {
+ node.style.height = node.scrollHeight + 50 + 'px';
}
};
-})(jQuery);
+ // Export
+ window.wp = window.wp || {};
+ window.wp.editor = window.wp.editor || {};
+ window.wp.editor.fullscreen = api;
+
+})( jQuery, window );
diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php
index 16a2e5e10f..7da0c55c21 100644
--- a/src/wp-includes/class-wp-editor.php
+++ b/src/wp-includes/class-wp-editor.php
@@ -189,46 +189,71 @@ final class _WP_Editors {
if ( self::$this_tinymce ) {
- if ( empty(self::$first_init) ) {
- self::$baseurl = includes_url('js/tinymce');
- self::$mce_locale = $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1
+ if ( empty( self::$first_init ) ) {
+ self::$baseurl = includes_url( 'js/tinymce' );
+ $mce_locale = get_locale();
+
+ if ( empty( $mce_locale ) || 'en' == substr( $mce_locale, 0, 2 ) ) {
+ $mce_locale = 'en';
+ }
+
+ self::$mce_locale = $mce_locale;
$no_captions = (bool) apply_filters( 'disable_captions', '' );
- $plugins = array( 'inlinepopups', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' );
$first_run = true;
$ext_plugins = '';
if ( $set['teeny'] ) {
- self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs' ), $editor_id );
+ self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'fullscreen', 'link', 'image', 'wordpress', 'wplink' ), $editor_id );
} else {
- /*
- The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
- It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin.
- The url should be absolute and should include the js file name to be loaded. Example:
- array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' )
- If the plugin uses a button, it should be added with one of the "$mce_buttons" filters.
- */
- $mce_external_plugins = apply_filters('mce_external_plugins', array());
+ /**
+ * TinyMCE external plugins filter
+ *
+ * Takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
+ * The url should be absolute and should include the js file name to be loaded.
+ * Example: 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js'.
+ * If the plugin adds a button, it should be added with one of the "$mce_buttons" filters.
+ */
+ $mce_external_plugins = apply_filters( 'mce_external_plugins', array() );
- if ( ! empty($mce_external_plugins) ) {
+ /**
+ * TinyMCE default plugins filter
+ *
+ * Specifies which of the default plugins that are included in WordPress should be added to
+ * the TinyMCE instance.
+ */
+ $plugins = array_unique( apply_filters( 'tiny_mce_plugins', array(
+ 'charmap',
+ 'link',
+ 'media',
+ 'paste',
+ 'tabfocus',
+ 'textcolor',
+ 'image',
+ 'fullscreen',
+ 'wordpress',
+ 'wpeditimage',
+ 'wpgallery',
+ 'wplink',
+ ) ) );
- /*
- The following filter loads external language files for TinyMCE plugins.
- It takes an associative array 'plugin_name' => 'path', where path is the
- include path to the file. The language file should follow the same format as
- /tinymce/langs/wp-langs.php and should define a variable $strings that
- holds all translated strings.
- When this filter is not used, the function will try to load {mce_locale}.js.
- If that is not found, en.js will be tried next.
- */
- $mce_external_languages = apply_filters('mce_external_languages', array());
+ if ( ! empty( $mce_external_plugins ) ) {
+ /**
+ * This filter loads translations for external TinyMCE 3.x plugins.
+ *
+ * Takes an associative array 'plugin_name' => 'path', where path is the
+ * include path to the file. The language file should follow the same format as
+ * wp_mce_translation() and should define a variable $strings that
+ * holds all translated strings.
+ */
+ $mce_external_languages = apply_filters( 'mce_external_languages', array() );
$loaded_langs = array();
$strings = '';
- if ( ! empty($mce_external_languages) ) {
+ if ( ! empty( $mce_external_languages ) ) {
foreach ( $mce_external_languages as $name => $path ) {
- if ( @is_file($path) && @is_readable($path) ) {
- include_once($path);
+ if ( @is_file( $path ) && @is_readable( $path ) ) {
+ include_once( $path );
$ext_plugins .= $strings . "\n";
$loaded_langs[] = $name;
}
@@ -236,48 +261,20 @@ final class _WP_Editors {
}
foreach ( $mce_external_plugins as $name => $url ) {
-
- $url = set_url_scheme( $url );
-
- $plugins[] = '-' . $name;
-
- $plugurl = dirname($url);
- $strings = $str1 = $str2 = '';
- if ( ! in_array($name, $loaded_langs) ) {
- $path = str_replace( content_url(), '', $plugurl );
- $path = WP_CONTENT_DIR . $path . '/langs/';
-
- if ( function_exists('realpath') )
- $path = trailingslashit( realpath($path) );
-
- if ( @is_file($path . $mce_locale . '.js') )
- $strings .= @file_get_contents($path . $mce_locale . '.js') . "\n";
-
- if ( @is_file($path . $mce_locale . '_dlg.js') )
- $strings .= @file_get_contents($path . $mce_locale . '_dlg.js') . "\n";
-
- if ( 'en' != $mce_locale && empty($strings) ) {
- if ( @is_file($path . 'en.js') ) {
- $str1 = @file_get_contents($path . 'en.js');
- $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n";
- }
-
- if ( @is_file($path . 'en_dlg.js') ) {
- $str2 = @file_get_contents($path . 'en_dlg.js');
- $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n";
- }
- }
-
- if ( ! empty($strings) )
- $ext_plugins .= "\n" . $strings . "\n";
+ if ( in_array( $name, $plugins, true ) ) {
+ unset( $mce_external_plugins[ $name ] );
+ continue;
}
- $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
- $ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
+ $url = set_url_scheme( $url );
+ $mce_external_plugins[ $name ] = $url;
+ $plugurl = dirname( $url );
+
+ if ( in_array( $name, $loaded_langs ) ) {
+ $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
+ }
}
}
-
- $plugins = array_unique( apply_filters('tiny_mce_plugins', $plugins) );
}
if ( $set['dfw'] )
@@ -286,82 +283,61 @@ final class _WP_Editors {
self::$plugins = $plugins;
self::$ext_plugins = $ext_plugins;
- if ( in_array( 'spellchecker', $plugins ) ) {
- /*
- translators: These languages show up in the spellchecker drop-down menu, in the order specified, and with the first
- language listed being the default language. They must be comma-separated and take the format of name=code, where name
- is the language name (which you may internationalize), and code is a valid ISO 639 language code. Please test the
- spellchecker with your values.
- */
- $mce_spellchecker_languages = __( 'English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv' );
-
- /*
- The following filter allows localization scripts to change the languages displayed in the spellchecker's drop-down menu.
- By default it uses Google's spellchecker API, but can be configured to use PSpell/ASpell if installed on the server.
- The + sign marks the default language. More: http://www.tinymce.com/wiki.php/Plugin:spellchecker.
- */
- $mce_spellchecker_languages = apply_filters( 'mce_spellchecker_languages', '+' . $mce_spellchecker_languages );
- }
-
self::$first_init = array(
- 'mode' => 'exact',
- 'width' => '100%',
- 'theme' => 'advanced',
- 'skin' => 'wp_theme',
+ 'theme' => 'modern',
+ 'skin' => 'lightgray',
'language' => self::$mce_locale,
- 'theme_advanced_toolbar_location' => 'top',
- 'theme_advanced_toolbar_align' => 'left',
- 'theme_advanced_statusbar_location' => 'bottom',
- 'theme_advanced_resizing' => true,
- 'theme_advanced_resize_horizontal' => false,
- 'dialog_type' => 'modal',
+ 'resize' => 'vertical',
'formats' => "{
- alignleft : [
- {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'left'}},
- {selector : 'img,table', classes : 'alignleft'}
+ alignleft: [
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign:'left'}},
+ {selector: 'img,table,dl.wp-caption', classes: 'alignleft'}
],
- aligncenter : [
- {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'center'}},
- {selector : 'img,table', classes : 'aligncenter'}
+ aligncenter: [
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign:'center'}},
+ {selector: 'img,table,dl.wp-caption', classes: 'aligncenter'}
],
- alignright : [
- {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign : 'right'}},
- {selector : 'img,table', classes : 'alignright'}
+ alignright: [
+ {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign:'right'}},
+ {selector: 'img,table,dl.wp-caption', classes: 'alignright'}
],
- strikethrough : {inline : 'del'}
+ strikethrough: {inline: 'del'}
}",
'relative_urls' => false,
'remove_script_host' => false,
'convert_urls' => false,
- 'remove_linebreaks' => true,
- 'gecko_spellcheck' => true,
+ 'browser_spellcheck' => true,
'fix_list_elements' => true,
- 'keep_styles' => false,
'entities' => '38,amp,60,lt,62,gt',
- 'accessibility_focus' => true,
- 'media_strict' => false,
+ 'entity_encoding' => 'raw',
+ 'menubar' => false,
+ 'object_resizing' => false,
+ 'keep_styles' => false,
'paste_remove_styles' => true,
- 'paste_remove_spans' => true,
- 'paste_strip_class_attributes' => 'all',
- 'paste_text_use_dialog' => true,
- 'webkit_fake_resize' => false,
- 'preview_styles' => 'font-family font-weight text-decoration text-transform',
- 'schema' => 'html5',
+
+ // limit the preview styles in the menu/toolbar
+ // 'preview_styles' => 'font-family font-weight font-style text-decoration text-transform color background-color border',
+
'wpeditimage_disable_captions' => $no_captions,
- 'wp_fullscreen_content_css' => self::$baseurl . '/plugins/wpfullscreen/css/wp-fullscreen.css',
- 'plugins' => implode( ',', $plugins )
+ 'plugins' => implode( ',', $plugins ),
);
- if ( in_array( 'spellchecker', $plugins ) ) {
- self::$first_init['spellchecker_rpc_url'] = self::$baseurl . '/plugins/spellchecker/rpc.php';
- self::$first_init['spellchecker_languages'] = $mce_spellchecker_languages;
+ if ( ! empty( $mce_external_plugins ) ) {
+ self::$first_init['external_plugins'] = json_encode( $mce_external_plugins );
}
+ if ( in_array( 'spellchecker', $plugins, true ) ) {
+ self::$first_init['spellchecker_rpc_url'] = self::$baseurl . '/plugins/spellchecker/rpc.php';
+ self::$first_init['spellchecker_language'] = self::$mce_locale;
+ }
+
+ // WordPress default stylesheet
+ $mce_css = array( self::$baseurl . '/skins/wordpress/wp-content.css' );
+
// load editor_style.css if the current theme supports it
if ( ! empty( $GLOBALS['editor_styles'] ) && is_array( $GLOBALS['editor_styles'] ) ) {
$editor_styles = $GLOBALS['editor_styles'];
- $mce_css = array();
$editor_styles = array_unique( array_filter( $editor_styles ) );
$style_uri = get_stylesheet_directory_uri();
$style_dir = get_stylesheet_directory();
@@ -389,24 +365,20 @@ final class _WP_Editors {
if ( $file && file_exists( "$style_dir/$file" ) )
$mce_css[] = "$style_uri/$file";
}
-
- $mce_css = implode( ',', $mce_css );
- } else {
- $mce_css = '';
}
- $mce_css = trim( apply_filters( 'mce_css', $mce_css ), ' ,' );
+ $mce_css = trim( apply_filters( 'mce_css', implode( ',', $mce_css ) ), ' ,' );
if ( ! empty($mce_css) )
self::$first_init['content_css'] = $mce_css;
}
if ( $set['teeny'] ) {
- $mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'undo', 'redo', 'link', 'unlink', 'fullscreen'), $editor_id );
+ $mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'unlink', 'fullscreen'), $editor_id );
$mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
} else {
- $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'justifyleft', 'justifycenter', 'justifyright', 'link', 'unlink', 'wp_more', 'spellchecker', 'fullscreen', 'wp_adv' ), $editor_id);
- $mce_buttons_2 = apply_filters('mce_buttons_2', array( 'formatselect', 'underline', 'justifyfull', 'forecolor', 'pastetext', 'pasteword', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' ), $editor_id);
+ $mce_buttons = apply_filters('mce_buttons', array('bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'image', 'link', 'unlink', 'wp_more', 'spellchecker', 'fullscreen', 'wp_adv' ), $editor_id);
+ $mce_buttons_2 = apply_filters('mce_buttons_2', array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' ), $editor_id);
$mce_buttons_3 = apply_filters('mce_buttons_3', array(), $editor_id);
$mce_buttons_4 = apply_filters('mce_buttons_4', array(), $editor_id);
}
@@ -442,40 +414,36 @@ final class _WP_Editors {
}
$mceInit = array (
- 'elements' => $editor_id,
+ 'selector' => "#$editor_id",
'wpautop' => (bool) $set['wpautop'],
- 'remove_linebreaks' => (bool) $set['wpautop'],
- 'apply_source_formatting' => (bool) !$set['wpautop'],
- 'theme_advanced_buttons1' => implode($mce_buttons, ','),
- 'theme_advanced_buttons2' => implode($mce_buttons_2, ','),
- 'theme_advanced_buttons3' => implode($mce_buttons_3, ','),
- 'theme_advanced_buttons4' => implode($mce_buttons_4, ','),
+ 'indent' => ! $set['wpautop'],
+ 'toolbar1' => implode($mce_buttons, ','),
+ 'toolbar2' => implode($mce_buttons_2, ','),
+ 'toolbar3' => implode($mce_buttons_3, ','),
+ 'toolbar4' => implode($mce_buttons_4, ','),
'tabfocus_elements' => $set['tabfocus_elements'],
'body_class' => $body_class
);
- // The main editor doesn't use the TinyMCE resizing cookie.
- $mceInit['theme_advanced_resizing_use_cookie'] = 'content' !== $editor_id || empty( $set['editor_height'] );
-
if ( $first_run )
- $mceInit = array_merge(self::$first_init, $mceInit);
+ $mceInit = array_merge( self::$first_init, $mceInit );
- if ( is_array($set['tinymce']) )
- $mceInit = array_merge($mceInit, $set['tinymce']);
+ if ( is_array( $set['tinymce'] ) )
+ $mceInit = array_merge( $mceInit, $set['tinymce'] );
// For people who really REALLY know what they're doing with TinyMCE
// You can modify $mceInit to add, remove, change elements of the config before tinyMCE.init
// Setting "valid_elements", "invalid_elements" and "extended_valid_elements" can be done through this filter.
// Best is to use the default cleanup by not specifying valid_elements, as TinyMCE contains full set of XHTML 1.0.
if ( $set['teeny'] ) {
- $mceInit = apply_filters('teeny_mce_before_init', $mceInit, $editor_id);
+ $mceInit = apply_filters( 'teeny_mce_before_init', $mceInit, $editor_id );
} else {
- $mceInit = apply_filters('tiny_mce_before_init', $mceInit, $editor_id);
+ $mceInit = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id );
}
- if ( empty($mceInit['theme_advanced_buttons3']) && !empty($mceInit['theme_advanced_buttons4']) ) {
- $mceInit['theme_advanced_buttons3'] = $mceInit['theme_advanced_buttons4'];
- $mceInit['theme_advanced_buttons4'] = '';
+ if ( empty( $mceInit['toolbar3'] ) && ! empty( $mceInit['toolbar4'] ) ) {
+ $mceInit['toolbar3'] = $mceInit['toolbar4'];
+ $mceInit['toolbar4'] = '';
}
self::$mce_settings[$editor_id] = $mceInit;
@@ -511,7 +479,7 @@ final class _WP_Editors {
if ( in_array('wplink', self::$plugins, true) || in_array('link', self::$qt_buttons, true) ) {
wp_enqueue_script('wplink');
- wp_enqueue_script('wpdialogs-popup');
+ wp_enqueue_script('wpdialogs');
wp_enqueue_style('wp-jquery-ui-dialog');
}
@@ -519,11 +487,210 @@ final class _WP_Editors {
wp_enqueue_script('wp-fullscreen');
if ( self::$has_medialib ) {
- add_thickbox();
+ // add_thickbox(); // ?
wp_enqueue_script('media-upload');
}
}
+ public static function wp_mce_translation() {
+
+ $mce_translation = array(
+ // Default TinyMCE strings
+ 'Cut' => __('Cut'),
+ 'Header 2' => __('Header 2'),
+ 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => __('Your browser does not support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.'),
+ 'Div' => __('Div'),
+ 'Paste' => __('Paste'),
+ 'Close' => __('Close'),
+ 'Pre' => __('Pre'),
+ 'Align right' => __('Align right'),
+ 'New document' => __('New document'),
+ 'Blockquote' => __('Blockquote'),
+ 'Numbered list' => __('Numbered list'),
+ 'Increase indent' => __('Increase indent'),
+ 'Formats' => __('Formats'),
+ 'Headers' => __('Headers'),
+ 'Select all' => __('Select all'),
+ 'Header 3' => __('Header 3'),
+ 'Blocks' => __('Blocks'),
+ 'Undo' => __('Undo'),
+ 'Strikethrough' => __('Strikethrough'),
+ 'Bullet list' => __('Bullet list'),
+ 'Header 1' => __('Header 1'),
+ 'Superscript' => __('Superscript'),
+ 'Clear formatting' => __('Clear formatting'),
+ 'Subscript' => __('Subscript'),
+ 'Header 6' => __('Header 6'),
+ 'Redo' => __('Redo'),
+ 'Paragraph' => __('Paragraph'),
+ 'Ok' => __('Ok'),
+ 'Bold' => __('Bold'),
+ 'Code' => __('Code'),
+ 'Italic' => __('Italic'),
+ 'Align center' => __('Align center'),
+ 'Header 5' => __('Header 5'),
+ 'Decrease indent' => __('Decrease indent'),
+ 'Header 4' => __('Header 4'),
+ 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => __('Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.'),
+ 'Underline' => __('Underline'),
+ 'Cancel' => __('Cancel'),
+ 'Justify' => __('Justify'),
+ 'Inline' => __('Inline'),
+ 'Copy' => __('Copy'),
+ 'Align left' => __('Align left'),
+ 'Visual aids' => __('Visual aids'),
+ 'Lower Greek' => __('Lower Greek'),
+ 'Square' => __('Square'),
+ 'Default' => __('Default'),
+ 'Lower Alpha' => __('Lower Alpha'),
+ 'Circle' => __('Circle'),
+ 'Disc' => __('Disc'),
+ 'Upper Alpha' => __('Upper Alpha'),
+ 'Upper Roman' => __('Upper Roman'),
+ 'Lower Roman' => __('Lower Roman'),
+ 'Name' => __('Name'),
+ 'Anchor' => __('Anchor'),
+ 'You have unsaved changes are you sure you want to navigate away?' => __('You have unsaved changes are you sure you want to navigate away?'),
+ 'Restore last draft' => __('Restore last draft'),
+ 'Special character' => __('Special character'),
+ 'Source code' => __('Source code'),
+ 'Right to left' => __('Right to left'),
+ 'Left to right' => __('Left to right'),
+ 'Emoticons' => __('Emoticons'),
+ 'Robots' => __('Robots'),
+ 'Document properties' => __('Document properties'),
+ 'Title' => __('Title'),
+ 'Keywords' => __('Keywords'),
+ 'Encoding' => __('Encoding'),
+ 'Description' => __('Description'),
+ 'Author' => __('Author'),
+ 'Fullscreen' => __('Fullscreen'),
+ 'Horizontal line' => __('Horizontal line'),
+ 'Horizontal space' => __('Horizontal space'),
+ 'Insert/edit image' => __('Insert/edit image'),
+ 'General' => __('General'),
+ 'Advanced' => __('Advanced'),
+ 'Source' => __('Source'),
+ 'Border' => __('Border'),
+ 'Constrain proportions' => __('Constrain proportions'),
+ 'Vertical space' => __('Vertical space'),
+ 'Image description' => __('Image description'),
+ 'Style' => __('Style'),
+ 'Dimensions' => __('Dimensions'),
+ 'Insert image' => __('Insert image'),
+ 'Insert date/time' => __('Insert date/time'),
+ 'Remove link' => __('Remove link'),
+ 'Url' => __('Url'),
+ 'Text to display' => __('Text to display'),
+ 'Anchors' => __('Anchors'),
+ 'Insert link' => __('Insert link'),
+ 'New window' => __('New window'),
+ 'None' => __('None'),
+ 'Target' => __('Target'),
+ 'Insert/edit link' => __('Insert/edit link'),
+ 'Insert/edit video' => __('Insert/edit video'),
+ 'Poster' => __('Poster'),
+ 'Alternative source' => __('Alternative source'),
+ 'Paste your embed code below:' => __('Paste your embed code below:'),
+ 'Insert video' => __('Insert video'),
+ 'Embed' => __('Embed'),
+ 'Nonbreaking space' => __('Nonbreaking space'),
+ 'Page break' => __('Page break'),
+ 'Paste as text' => __('Paste as text'),
+ 'Preview' => __('Preview'),
+ 'Print' => __('Print'),
+ 'Save' => __('Save'),
+ 'Could not find the specified string.' => __('Could not find the specified string.'),
+ 'Replace' => __('Replace'),
+ 'Next' => __('Next'),
+ 'Whole words' => __('Whole words'),
+ 'Find and replace' => __('Find and replace'),
+ 'Replace with' => __('Replace with'),
+ 'Find' => __('Find'),
+ 'Replace all' => __('Replace all'),
+ 'Match case' => __('Match case'),
+ 'Prev' => __('Prev'),
+ 'Spellcheck' => __('Spellcheck'),
+ 'Finish' => __('Finish'),
+ 'Ignore all' => __('Ignore all'),
+ 'Ignore' => __('Ignore'),
+ 'Insert row before' => __('Insert row before'),
+ 'Rows' => __('Rows'),
+ 'Height' => __('Height'),
+ 'Paste row after' => __('Paste row after'),
+ 'Alignment' => __('Alignment'),
+ 'Column group' => __('Column group'),
+ 'Row' => __('Row'),
+ 'Insert column before' => __('Insert column before'),
+ 'Split cell' => __('Split cell'),
+ 'Cell padding' => __('Cell padding'),
+ 'Cell spacing' => __('Cell spacing'),
+ 'Row type' => __('Row type'),
+ 'Insert table' => __('Insert table'),
+ 'Body' => __('Body'),
+ 'Caption' => __('Caption'),
+ 'Footer' => __('Footer'),
+ 'Delete row' => __('Delete row'),
+ 'Paste row before' => __('Paste row before'),
+ 'Scope' => __('Scope'),
+ 'Delete table' => __('Delete table'),
+ 'Header cell' => __('Header cell'),
+ 'Column' => __('Column'),
+ 'Cell' => __('Cell'),
+ 'Header' => __('Header'),
+ 'Cell type' => __('Cell type'),
+ 'Copy row' => __('Copy row'),
+ 'Row properties' => __('Row properties'),
+ 'Table properties' => __('Table properties'),
+ 'Row group' => __('Row group'),
+ 'Right' => __('Right'),
+ 'Insert column after' => __('Insert column after'),
+ 'Cols' => __('Cols'),
+ 'Insert row after' => __('Insert row after'),
+ 'Width' => __('Width'),
+ 'Cell properties' => __('Cell properties'),
+ 'Left' => __('Left'),
+ 'Cut row' => __('Cut row'),
+ 'Delete column' => __('Delete column'),
+ 'Center' => __('Center'),
+ 'Merge cells' => __('Merge cells'),
+ 'Insert template' => __('Insert template'),
+ 'Templates' => __('Templates'),
+ 'Background color' => __('Background color'),
+ 'Text color' => __('Text color'),
+ 'Show blocks' => __('Show blocks'),
+ 'Show invisible characters' => __('Show invisible characters'),
+ 'Words: {0}' => __('Words: {0}'),
+ 'Insert' => __('Insert'),
+ 'File' => __('File'),
+ 'Edit' => __('Edit'),
+ 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => __('Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help'),
+ 'Tools' => __('Tools'),
+ 'View' => __('View'),
+ 'Table' => __('Table'),
+ 'Format' => __('Format'),
+
+ // WordPress strings
+ 'Help' => __('Help'),
+ 'Toolbar Toggle' => __('Toolbar Toggle'),
+ 'Insert Read More tag' => __('Insert Read More tag'),
+ 'Distraction Free Writing' => __('Distraction Free Writing'),
+ );
+
+ $baseurl = self::$baseurl;
+ $mce_locale = self::$mce_locale;
+
+ $mce_translation = apply_filters( 'wp_mce_translation', $mce_translation, $mce_locale );
+
+ foreach ( $mce_translation as $key => $value ) {
+ if ( strpos( $value, '&' ) !== false )
+ $mce_translation[$key] = html_entity_decode( $value, ENT_QUOTES );
+ }
+
+ return "tinymce.addI18n( '$mce_locale', " . json_encode( $mce_translation ) . ");\n" .
+ "tinymce.ScriptLoader.markDone( '$baseurl/langs/$mce_locale.js' );\n";
+ }
+
public static function editor_js() {
global $tinymce_version, $concatenate_scripts, $compress_scripts;
@@ -543,9 +710,6 @@ final class _WP_Editors {
$compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
&& false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
- if ( $tmce_on && 'en' != self::$mce_locale )
- include_once(ABSPATH . WPINC . '/js/tinymce/langs/wp-langs.php');
-
$mceInit = $qtInit = '';
if ( $tmce_on ) {
foreach ( self::$mce_settings as $editor_id => $init ) {
@@ -569,27 +733,26 @@ final class _WP_Editors {
$ref = array(
'plugins' => implode( ',', self::$plugins ),
- 'theme' => 'advanced',
+ 'theme' => 'modern',
'language' => self::$mce_locale
);
- $suffix = ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ? '_src' : '';
+ $suffix = ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ? '' : '.min';
- do_action('before_wp_tiny_mce', self::$mce_settings);
-?>
+ do_action( 'before_wp_tiny_mce', self::$mce_settings );
+ ?>
-
-
+ \n";
} else {
- echo "\n";
- echo "\n";
+ echo "\n";
+ echo "\n";
}
- if ( 'en' != self::$mce_locale && isset($lang) )
- echo "\n";
- else
+ if ( 'en' != self::$mce_locale )
+ echo "\n";
+
+ if ( self::$ext_plugins ) {
+ // Load the old-format English strings to prevent unsightly labels in old style popups
echo "\n";
+ }
}
- $mce = ( self::$has_tinymce && wp_default_editor() == 'tinymce' ) || ! self::$has_quicktags;
-?>
+ // Allow scripts to be added after tinymce.js has been loaded but before any editor instances are created.
+ do_action( 'wp_tiny_mce_init', self::$mce_settings );
-
$content_width ? $content_width : 800;
+ $width = isset( $content_width ) && 800 > $content_width ? $content_width : 800;
$width = $width + 22; // compensate for the padding and border
$dfw_width = get_user_setting( 'dfw_width', $width );
- $save = isset($post->post_status) && $post->post_status == 'publish' ? __('Update') : __('Save');
- ?>
- >
-
-
-
+ $save = isset( $post->post_status ) && $post->post_status == 'publish' ? __('Update') : __('Save');
+
+ ?>
+ data-theme-width="" data-dfw-width="">
+
-
-
- post_type, 'title') ) { ?>
-
-
-
-
-
-
-
-
-
- 0' ); ?>
-
-
+
+ 0' ); ?>
+
diff --git a/src/wp-includes/css/editor.css b/src/wp-includes/css/editor.css
index 1af385de76..b35a1a8e4d 100644
--- a/src/wp-includes/css/editor.css
+++ b/src/wp-includes/css/editor.css
@@ -1,1146 +1,265 @@
-
/*------------------------------------------------------------------------------
-
TinyMCE and Quicklinks toolbars
------------------------------------------------------------------------------*/
-/* wp_theme/ui.css */
-.wp_themeSkin table,
-.wp_themeSkin tbody,
-.wp_themeSkin a,
-.wp_themeSkin img,
-.wp_themeSkin tr,
-.wp_themeSkin div,
-.wp_themeSkin td,
-.wp_themeSkin iframe,
-.wp_themeSkin span,
-.wp_themeSkin *,
-.wp_themeSkin .mceText {
+.mce-panel {
border: 0;
- margin: 0;
- padding: 0;
- white-space: nowrap;
- text-decoration: none;
- font-weight: normal;
- cursor: default;
- vertical-align: baseline;
- width: auto;
- border-collapse: separate;
-}
-
-.wp_themeSkin a:hover,
-.wp_themeSkin a:link,
-.wp_themeSkin a:visited,
-.wp_themeSkin a:active {
- text-decoration: none;
- font-weight: normal;
- cursor: default;
-}
-
-.wp_themeSkin table td {
- vertical-align: middle;
-}
-
-.wp_themeSkin *,
-.wp_themeSkin a:hover,
-.wp_themeSkin a:link,
-.wp_themeSkin a:visited,
-.wp_themeSkin a:active {
- color: #555;
-}
-
-/* These are part of TinyMCE, used in TinyMCE Advanced, but not WordPress. These are not updated for 3.8's design. */
-.wp_themeSkin span.mce_sup,
-.wp_themeSkin span.mce_sub,
-.wp_themeSkin span.mce_media,
-.wp_themeSkin span.mce_styleprops,
-.wp_themeSkin span.mce_search,
-.wp_themeSkin span.mce_emotions,
-.wp_themeSkin span.mce_print,
-.wp_themeSkin span.mce_attribs,
-.wp_themeSkin span.mce_hr,
-.wp_themeSkin span.mce_cut,
-.wp_themeSkin span.mce_copy,
-.wp_themeSkin span.mce_paste,
-.wp_themeSkin span.mce_cite,
-.wp_themeSkin span.mce_visualchars,
-.wp_themeSkin span.mce_advhr,
-.wp_themeSkin span.mce_insertdate,
-.wp_themeSkin span.mce_anchor,
-.wp_themeSkin span.mce_visualaid,
-.wp_themeSkin span.mce_cleanup,
-.wp_themeSkin span.mce_table,
-.wp_themeSkin span.mce_row_props,
-.wp_themeSkin span.mce_cell_props,
-.wp_themeSkin span.mce_row_before,
-.wp_themeSkin span.mce_row_after,
-.wp_themeSkin span.mce_delete_row,
-.wp_themeSkin span.mce_col_before,
-.wp_themeSkin span.mce_col_after,
-.wp_themeSkin span.mce_delete_col,
-.wp_themeSkin span.mce_split_cells,
-.wp_themeSkin span.mce_merge_cells,
-.wp_themeSkin span.mce_delete_table,
-.wp_themeSkin span.mce_ins,
-.wp_themeSkin span.mce_abbr,
-.wp_themeSkin span.mce_acronym,
-.wp_themeSkin span.mce_del,
-.wp_themeSkin span.mce_replace,
-.wp_themeSkin span.mce_code,
-.wp_themeSkin span.mce_nonbreaking,
-.wp_themeSkin span.mce_inserttime,
-.wp_themeSkin span.mce_insertlayer,
-.wp_themeSkin span.mce_moveforward,
-.wp_themeSkin span.mce_movebackward,
-.wp_themeSkin span.mce_absolute {
- -moz-transition: none;
- -webkit-transition: none;
- transition: none;
- background: url("../js/tinymce/themes/advanced/img/icons.gif") no-repeat 20px 20px;
-}
-
-/* No @font-face support */
-.no-font-face .wp_themeSkin span.mce_undo,
-.no-font-face .wp_themeSkin span.mce_redo,
-.no-font-face .wp_themeSkin span.mce_bullist,
-.no-font-face .wp_themeSkin span.mce_numlist,
-.no-font-face .wp_themeSkin span.mce_blockquote,
-.no-font-face .wp_themeSkin span.mce_charmap,
-.no-font-face .wp_themeSkin span.mce_bold,
-.no-font-face .wp_themeSkin span.mce_italic,
-.no-font-face .wp_themeSkin span.mce_underline,
-.no-font-face .wp_themeSkin span.mce_justifyleft,
-.no-font-face .wp_themeSkin span.mce_justifyright,
-.no-font-face .wp_themeSkin span.mce_justifycenter,
-.no-font-face .wp_themeSkin span.mce_justifyfull,
-.no-font-face .wp_themeSkin span.mce_indent,
-.no-font-face .wp_themeSkin span.mce_outdent,
-.no-font-face .wp_themeSkin span.mce_link,
-.no-font-face .wp_themeSkin span.mce_unlink,
-.no-font-face .wp_themeSkin span.mce_help,
-.no-font-face .wp_themeSkin span.mce_removeformat,
-.no-font-face .wp_themeSkin span.mce_fullscreen,
-.no-font-face .wp_themeSkin span.mce_wp_fullscreen,
-.no-font-face .wp_themeSkin span.mce_media,
-.no-font-face .wp_themeSkin span.mce_pastetext,
-.no-font-face .wp_themeSkin span.mce_pasteword,
-.no-font-face .wp_themeSkin span.mce_wp_help,
-.no-font-face .wp_themeSkin span.mce_wp_adv,
-.no-font-face .wp_themeSkin span.mce_wp_more,
-.no-font-face .wp_themeSkin span.mce_strikethrough,
-.no-font-face .wp_themeSkin span.mce_spellchecker,
-.no-font-face .wp_themeSkin span.mce_forecolor,
-.no-font-face .wp_themeSkin .mce_forecolorpicker,
-.no-font-face .wp_themeSkin .mceSplitButton .mce_spellchecker span.mce_spellchecker,
-.no-font-face .wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor,
-.no-font-face .wp_themeSkin .mceSplitButton span.mce_numlist,
-.no-font-face .wp_themeSkin .mceSplitButton span.mce_bullist {
- -moz-transition: none;
- -webkit-transition: none;
- transition: none;
- background-image: url('../images/wpicons.png?ver=20120720');
-}
-
-/* Theme */
-.no-font-face .wp_themeSkin span.mce_undo {background-position:-500px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_undo,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_undo {background-position:-500px 0}
-
-.no-font-face .wp_themeSkin span.mce_redo {background-position:-480px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_redo,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_redo {background-position:-480px 0}
-
-.no-font-face .wp_themeSkin span.mce_bullist {background-position:-40px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_bullist,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_bullist,
-.no-font-face .wp_themeSkin .mceSplitButton:hover span.mce_bullist {background-position:-40px 0}
-
-.no-font-face .wp_themeSkin span.mce_numlist {background-position:-60px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_numlist,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_numlist,
-.no-font-face .wp_themeSkin .mceSplitButton:hover span.mce_numlist {background-position:-60px 0}
-
-.no-font-face .wp_themeSkin span.mce_blockquote {background-position:-80px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_blockquote,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_blockquote {background-position:-80px 0}
-
-.no-font-face .wp_themeSkin span.mce_charmap {background-position:-420px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_charmap,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_charmap {background-position:-420px 0}
-
-.no-font-face .wp_themeSkin span.mce_bold {background-position:0 -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_bold,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_bold {background-position:0 0}
-
-.no-font-face .wp_themeSkin span.mce_italic {background-position:-20px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_italic,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_italic {background-position:-20px 0}
-
-.no-font-face .wp_themeSkin span.mce_underline {background-position:-280px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_underline,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_underline {background-position:-280px 0}
-
-.no-font-face .wp_themeSkin span.mce_justifyleft {background-position:-100px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyleft,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyleft {background-position:-100px 0}
-
-.no-font-face .wp_themeSkin span.mce_justifyright {background-position:-140px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyright,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyright {background-position:-140px 0}
-
-.no-font-face .wp_themeSkin span.mce_justifycenter {background-position:-120px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifycenter,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_justifycenter {background-position:-120px 0}
-
-.no-font-face .wp_themeSkin span.mce_justifyfull {background-position:-300px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyfull,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyfull {background-position:-300px 0}
-
-.no-font-face .wp_themeSkin span.mce_indent {background-position:-460px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_indent,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_indent {background-position:-460px 0}
-
-.no-font-face .wp_themeSkin span.mce_outdent {background-position:-440px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_outdent,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_outdent {background-position:-440px 0}
-
-.no-font-face .wp_themeSkin span.mce_link {background-position:-160px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_link,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_link {background-position:-160px 0}
-
-.no-font-face .wp_themeSkin span.mce_unlink {background-position:-180px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_unlink,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_unlink {background-position:-180px 0}
-
-.no-font-face .wp_themeSkin span.mce_help {background-position:-520px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_help,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_help {background-position:-520px 0}
-
-.no-font-face .wp_themeSkin span.mce_removeformat {background-position:-380px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_removeformat,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_removeformat {background-position:-380px 0}
-
-.no-font-face .wp_themeSkin span.mce_strikethrough {background-position:-540px -20px;}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_strikethrough,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_strikethrough {background-position:-540px 0}
-
-.no-font-face .wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor {background-position:-320px -20px}
-.no-font-face .wp_themeSkin .mceSplitButtonEnabled:hover span.mce_forecolor,
-.no-font-face .wp_themeSkin .mceSplitButtonSelected span.mce_forecolor {background-position:-320px 0}
-
-.no-font-face .wp_themeSkin .mce_forecolorpicker {background-position:-320px -20px}
-
-/* Plugins in WP */
-.no-font-face .wp_themeSkin span.mce_fullscreen {background-position:-240px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_fullscreen,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_fullscreen {background-position:-240px 0}
-
-.no-font-face .wp_themeSkin span.mce_wp_fullscreen {background-position:-240px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_fullscreen,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_fullscreen {background-position:-240px 0}
-
-.no-font-face .wp_themeSkin span.mce_media {background-position:-400px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_media,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_media {background-position:-400px 0}
-
-.no-font-face .wp_themeSkin span.mce_pastetext {background-position:-340px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_pastetext,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_pastetext {background-position:-340px 0}
-
-.no-font-face .wp_themeSkin span.mce_pasteword {background-position:-360px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_pasteword,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_pasteword {background-position:-360px 0}
-
-.no-font-face .wp_themeSkin span.mce_spellchecker {background-position:-220px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_spellchecker,
-.no-font-face .wp_themeSkin .mceSplitButtonEnabled:hover span.mce_spellchecker,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_spellchecker,
-.no-font-face .wp_themeSkin .mceSplitButtonSelected span.mce_spellchecker {background-position:-220px 0}
-
-.no-font-face .wp_themeSkin span.mce_wp_help {background-position:-520px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_help,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_help {background-position:-520px 0}
-
-.no-font-face .wp_themeSkin span.mce_wp_adv {background-position:-260px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_adv,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_adv {background-position:-260px 0}
-
-.no-font-face .wp_themeSkin span.mce_wp_more {background-position:-200px -20px}
-.no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_more,
-.no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_more {background-position:-200px 0}
-
-.no-font-face .mceIcon:before {
- display: none !important;
-}
-/* End no @font-face */
-
-/* Containers */
-.wp_themeSkin table {}
-
-.wp_themeSkin iframe {
- display: block;
-}
-
-.wp_themeSkin #mce_fullscreen_ifr {
- background-color: #fff;
-}
-
-.wp_themeSkin .mceToolbar {
- padding: 1px;
-}
-
-/* External */
-.wp_themeSkin .mceExternalToolbar {
- position: absolute;
- border-bottom: 0;
- display: none;
-}
-
-.wp_themeSkin .mceExternalToolbar td.mceToolbar {
- padding-right: 13px;
-}
-
-.wp_themeSkin .mceExternalClose {
- position: absolute;
- top: 3px;
- right: 3px;
- width: 7px;
- height: 7px;
- background: url("../js/tinymce/themes/advanced/img/icons.gif") -820px 0;
-}
-
-/* Layout */
-.wp_themeSkin table.mceToolbar,
-.wp_themeSkin tr.mceFirst .mceToolbar tr td,
-.wp_themeSkin tr.mceLast .mceToolbar tr td {
- border: 0;
- margin: 0;
- padding: 0;
-}
-
-.wp_themeSkin table.mceLayout {
- border: 0;
-}
-
-.wp_themeSkin .mceStatusbar {
background: #fff;
+}
+
+.mce-toolbar-grp {
+ border-bottom: 1px solid #dedede;
+ background: #f5f5f5;
+}
+
+.mce-toolbar {
+ padding: 1px 3px;
+}
+
+.mce-statusbar {
border-top: 1px solid #eee;
- color: #000;
- display: block;
- font-family: sans-serif;
- font-size: 12px;
- height: 20px;
- line-height: 16px;
- padding: 0 0 0 8px;
- overflow: visible;
}
-.wp_themeSkin .mceStatusbar * {
- color: #555;
+.mce-path {
+ padding: 0 8px 1px;
}
-.wp_themeSkin .mceStatusbar div {
- float: left;
- padding: 2px;
+.mce-path-item {
+ line-height: 1;
}
-.wp_themeSkin .mceStatusbar a.mceResize {
- display: block;
- float: right;
- background: url("../js/tinymce/themes/advanced/img/icons.gif") -800px 0;
- width: 20px;
- height: 20px;
- cursor: se-resize;
+.mce-toolbar .mce-btn {
+ border-color: transparent;
+ background: transparent;
+ box-shadow: none;
}
-.wp_themeSkin .mceStatusbar a:hover {
- text-decoration: underline;
-}
-
-.wp_themeSkin table.mceToolbar {
- margin: 0 6px 2px;
-}
-
-.wp_themeSkin table.mceToolbar :active,
-.wp_themeSkin table.mceToolbar :focus,
-.wp_themeSkin table.mceToolbar:focus,
-.wp_themeSkin span.mceSeparator:focus {
- outline: none;
-}
-
-.wp_themeSkin #content_toolbar1 {
- margin-top: 2px;
-}
-
-.wp_themeSkin .mceToolbar .mceToolbarEndListBox span {
- display: none;
-}
-
-.wp_themeSkin span.mceIcon,
-.wp_themeSkin img.mceIcon {
- display: block;
- width: 20px;
- height: 20px;
-}
-
-a .mceIcon, .mceAction {
- text-align: center;
- font: normal 20px/1 'dashicons' !important;
- speak: none;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-.mceAction {
- line-height:16px;
-}
-
-/* Button */
-.wp_themeSkin .mceButton {
- display: block;
- width: 20px;
- height: 20px;
- cursor: default;
- padding: 1px 2px;
- margin: 1px;
+#wp-fullscreen-buttons .mce-btn,
+.mce-toolbar .mce-btn-group .mce-btn {
+ border: 1px solid transparent;
+ margin: 0 1px;
-webkit-border-radius: 2px;
border-radius: 2px;
}
-.wp_themeSkin a.mceButtonEnabled:hover {
- background-image: inherit 0 -10px;
+#wp-fullscreen-buttons .mce-btn:hover,
+.mce-toolbar .mce-btn-group .mce-btn:hover,
+.mce-toolbar .mce-btn-group .mce-btn.mce-active {
+ box-shadow: 0 0 transparent;
+ border-color: #bbb;
+ background: #eee;
+ background-image: -webkit-gradient(linear, left bottom, left top, from(#e5e5e5), to(#fff));
+ background-image: -webkit-linear-gradient(bottom, #e5e5e5, #fff);
+ background-image: linear-gradient(to top, #e5e5e5, #fff);
}
-.wp_themeSkin .mceOldBoxModel a.mceButton span, .wp_themeSkin .mceOldBoxModel a.mceButton img {
- margin: 0 0 0 1px;
+.mce-toolbar .mce-btn-group .mce-disabled.mce-btn:hover {
+ border-color: transparent;
+ background: transparent;
}
-.wp_themeSkin .mceButtonDisabled .mceIcon {
- opacity: 0.2;
- filter: alpha(opacity=20);
+.mce-toolbar .mce-btn-group .mce-first,
+.mce-toolbar .mce-btn-group .mce-last {
+ border-color: transparent;
}
-/* Separator */
-.wp_themeSkin .mceSeparator {
- display: none;
+.mce-toolbar .mce-btn button {
+ padding: 2px 3px;
+ line-height: normal;
}
-/* ListBox */
-.wp_themeSkin .mceListBox,
-.wp_themeSkin .mceListBox a {
- display: block;
+.mce-toolbar .mce-btn i {
+ text-shadow: 0;
}
-.wp_themeSkin .mceListBox .mceText {
- padding: 1px 4px 1px 5px;
- width: 70px;
- text-align: left;
- text-decoration: none;
- -webkit-border-bottom-left-radius: 2px;
- -webkit-border-top-left-radius: 2px;
- border-bottom-left-radius: 2px;
- border-top-left-radius: 2px;
- font-family: sans-serif;
- font-size: 12px;
- height: 20px;
- line-height: 20px;
- overflow: hidden;
-}
-
-.wp_themeSkin .mceListBox {
- margin: 1px;
+.mce-toolbar .mce-btn-group .mce-btn.mce-listbox {
+ border-radius: 0;
direction: ltr;
- background-color: #fff;
+ background: #fff;
border: 1px solid #ddd;
-webkit-box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2);
box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2);
}
-.wp_themeSkin .mceListBox .mceOpen {
- width: 12px;
- height: 20px;
- border-collapse: separate;
- padding: 1px;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
-}
-
-.wp_themeSkin .mceListBox .mceFirst a {
- border-style: solid;
- border-width: 1px;
- border-bottom-right-radius: 2px;
- border-top-right-radius: 2px;
-}
-
-.wp_themeSkin .mceListBoxMenu .mce_formatPreview {
- line-height: normal;
-}
-
-.wp_themeSkin .mceListBox .mceOpen,
-.wp_themeSkin .mceListBoxHover .mceOpen,
-.wp_themeSkin .mceListBoxSelected .mceOpen,
-.wp_themeSkin table.mceListBoxEnabled .mceOpen {
- background-image: url("../images/down_arrow.gif");
- background-position: 3px 1px;
- background-repeat: no-repeat;
-}
-
-.wp_themeSkin .mceListBoxDisabled .mceText {
- color: gray;
-}
-
-.wp_themeSkin .mceListBoxMenu {
- overflow: auto;
- overflow-x: hidden;
-}
-
-.wp_themeSkin .mceOldBoxModel .mceListBox .mceText {
- height: 22px;
-}
-
-.wp_themeSkin select.mceListBox {
- font-family: sans-serif;
- font-size: 12px;
- border-color: #b2b2b2;
- background-color: #fff;
-}
-
-/* SplitButton */
-.wp_themeSkin .mceSplitButton a,
-.wp_themeSkin .mceSplitButton span {
- display: block;
- height: 20px;
-}
-
-.wp_themeSkin .mceSplitButton {
- display: block;
- direction: ltr;
-}
-
-.wp_themeSkin table.mceSplitButton td {
- padding: 2px;
- -webkit-border-radius: 2px;
- border-radius: 2px;
-}
-
-.wp_themeSkin table.mceSplitButton:hover td {
- background-image: inherit 0 -10px;
-}
-
-.wp_themeSkin .mceSplitButton a.mceAction {
- height: 20px;
- width: 20px;
- padding: 1px 2px;
- border-right: 0 none;
-}
-
-.wp_themeSkin .mceSplitButton span.mceAction {
- background-image: url("../js/tinymce/themes/advanced/img/icons.gif");
- background-repeat: no-repeat;
- background-color: transparent;
- width: 20px;
-}
-
-.wp_themeSkin .mceSplitButton span.mceAction.mce_bullist,
-.wp_themeSkin .mceSplitButton span.mceAction.mce_numlist {
+.mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover {
background-image: none;
-}
-
-.wp_themeSkin .mceSplitButton a.mceOpen {
- width: 11px;
- height: 20px;
- background-position: 0px 2px;
- background-repeat: no-repeat;
- padding: 1px 0;
-}
-
-.wp_themeSkin .mceSplitButton span.mceOpen {
- display: none;
-}
-
-.wp_themeSkin .mceSplitButtonDisabled .mceAction {
- opacity: 0.3;
- filter: alpha(opacity=30);
-}
-
-.wp_themeSkin .mceListBox a.mceText,
-.wp_themeSkin .mceSplitButton a.mceAction {
- -webkit-border-bottom-left-radius: 2px;
- -webkit-border-top-left-radius: 2px;
- border-bottom-left-radius: 2px;
- border-top-left-radius: 2px;
-}
-
-.wp_themeSkin .mceSplitButton a.mceOpen,
-.wp_themeSkin .mceListBox a.mceOpen {
- -webkit-border-bottom-right-radius: 2px;
- -webkit-border-top-right-radius: 2px;
- border-bottom-right-radius: 2px;
- border-top-right-radius: 2px;
-}
-
-/* ColorSplitButton */
-.wp_themeSkin div.mceColorSplitMenu table {
- background-color: #ebebeb;
border-color: #bbb;
}
-.wp_themeSkin .mceColorSplitMenu td {
- padding: 2px;
-}
-
-.wp_themeSkin .mceColorSplitMenu a {
- display: block;
- width: 9px;
- height: 9px;
- overflow: hidden;
- border-color: #B2B2B2;
-}
-
-.wp_themeSkin .mceColorSplitMenu td.mceMoreColors {
- padding: 1px 3px 1px 1px;
-}
-
-.wp_themeSkin .mceColorSplitMenu a.mceMoreColors {
- width: 100%;
- height: auto;
- text-align: center;
- font-family: "Open Sans", sans-serif;
- font-size: 11px;
- line-height: 20px;
- border-color: #fff;
-}
-
-.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {}
-.wp_themeSkin a.mceMoreColors:hover {}
-.wp_themeSkin .mceColorPreview {
- margin: -5px 0 0 2px;
- width: 16px;
- height: 4px;
- overflow: hidden;
-}
-
-/* Menu */
-.wp_themeSkin .mceMenu {
- position: absolute;
- left: 0;
- top: 0;
- z-index: 1000;
- border-color: #ddd;
- direction: ltr;
-}
-
-.wp_themeSkin .mceNoIcons span.mceIcon {
- width: 0;
-}
-
-.wp_themeSkin .mceNoIcons a .mceText {
- padding-left: 10px;
-}
-
-.wp_themeSkin .mceMenu table {
- background-color: #ebeaeb;
-}
-
-.wp_themeSkin .mceMenu a,
-.wp_themeSkin .mceMenu span,
-.wp_themeSkin .mceMenu {
- display: block;
-}
-
-.wp_themeSkin .mceMenu td {
- height: 20px;overflow: hidden;
-}
-
-.wp_themeSkin .mceMenu a {
- position: relative;
- padding: 3px 0 4px 0;
- text-decoration: none !important;
-}
-
-.wp_themeSkin .mceMenu .mceText {
- position: relative;
- display: block;
- font-family: "Open Sans", sans-serif;
- cursor: default;
- margin: 0;
- padding: 0 25px;
- color: #000;
-}
-
-.wp_themeSkin .mceMenu span.mceText, .wp_themeSkin .mceMenu .mcePreview {
- font-size: 12px;
-}
-
-.wp_themeSkin .mceMenu pre.mceText {
- font-family: Monospace;
-}
-
-.wp_themeSkin .mceMenu .mceIcon {
- position: absolute;
- top: 0;
- left: 0;
- width: 22px;
-}
-
-.wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover,
-.wp_themeSkin .mceMenu .mceMenuItemActive {
- background-color: #f5f5f5;
-}
-
-.wp_themeSkin td.mceMenuItemSeparator {
- height: 1px;
- background-color: #aaa;
-}
-
-.wp_themeSkin .mceMenuItemTitle a {
- border-top: 0;
+.mce-toolbar .mce-colorbutton .mce-open {
border-right: 0;
- border-left: 0;
- border-bottom: 1px solid #aaa;
- text-decoration: none !important;
- background-color: #ccc;
}
-.wp_themeSkin .mceMenuItemTitle span.mceText {
- font-weight: bold;
- padding-left: 4px;
- color: #000;
+.mce-toolbar .mce-colorbutton .mce-preview {
+ margin-left: -16px;
}
-.wp_themeSkin .mceMenuItemSelected .mceIcon {
- background: url("../js/tinymce/themes/advanced/skins/default/img/menu_check.gif");
- color: #888;
+/* Icons */
+.mce-toolbar .mce-ico {
+ color: #777;
+ line-height: 20px;
+ width: 20px;
+ height: 20px;
+ text-align: center;
}
-.wp_themeSkin .mceNoIcons .mceMenuItemSelected a {
- background: url("../js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif") no-repeat -6px center;
+.mce-toolbar .mce-btn:hover .mce-ico {
+ color: #333;
}
-.wp_themeSkin .mceMenu span.mceMenuLine {
- display: none;
+.mce-i-bold,
+.mce-i-italic,
+.mce-i-bullist,
+.mce-i-numlist,
+.mce-i-blockquote,
+.mce-i-alignleft,
+.mce-i-aligncenter,
+.mce-i-alignright,
+.mce-i-link,
+.mce-i-unlink,
+.mce-i-wp_more,
+.mce-i-strikethrough,
+.mce-i-spellchecker,
+.mce-i-fullscreen,
+.mce-i-wp_fullscreen,
+.mce-i-wp_adv,
+.mce-i-underline,
+.mce-i-alignjustify,
+.mce-i-forecolor,
+.mce-i-pastetext,
+.mce-i-pasteword,
+.mce-i-removeformat,
+.mce-i-charmap,
+.mce-i-outdent,
+.mce-i-indent,
+.mce-i-undo,
+.mce-i-redo,
+.mce-i-help,
+.mce-i-wp_help,
+.mce-i-wp-media-library,
+.mce-i-ltr {
+ font: normal 20px/1 'dashicons';
+ padding: 0;
+ vertical-align: top;
+ speak: none;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
}
-.wp_themeSkin .mceMenuItemSub a {
- background: url("../js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif") no-repeat top right;
-}
-
-/* Progress,Resize */
-.wp_themeSkin .mceBlocker {
- position: absolute;
- left: 0;
- top: 0;
- z-index: 1000;
- opacity: 0.5;
- filter: alpha(opacity=50);
- background: #FFF;
-}
-
-.wp_themeSkin .mceProgress {
- position: absolute;
- left: 0;
- top: 0;
- z-index: 1001;
- background: url("../js/tinymce/themes/advanced/skins/default/img/progress.gif") no-repeat;
- width: 32px;
- height: 32px;
- margin: -16px 0 0 -16px;
-}
-
-.wp_themeSkin .mcePlaceHolder {
- border: 1px dotted gray;
-}
-
-/* Rtl */
-.mceRtl .mceListBox .mceText {
- text-align: right;
- padding: 0 4px 0 0;
-}
-
-.mceRtl .mceMenuItem .mceText {
- text-align: right;
-}
-
-/* Formats */
-.wp_themeSkin .mce_p span.mceText {}
-.wp_themeSkin .mce_address span.mceText {
- font-style: italic;
-}
-
-.wp_themeSkin .mce_pre span.mceText {
- font-family: monospace;
-}
-
-.wp_themeSkin .mce_h1 span.mceText {
- font-weight: bolder;
- font-size: 18px;
-}
-
-.wp_themeSkin .mce_h2 span.mceText {
- font-weight: bolder;
- font-size: 14px;
-}
-
-.wp_themeSkin .mce_h3 span.mceText {
- font-weight: bolder;
- font-size: 12px;
-}
-
-.wp_themeSkin .mce_h4 span.mceText {
- font-weight: bolder;
- font-size: 11px;
-}
-
-.wp_themeSkin .mce_h5 span.mceText {
- font-weight: bolder;
- font-size: 11px;
-}
-
-.wp_themeSkin .mce_h6 span.mceText {
- font-weight: bolder;
- font-size: 10px;
-}
-
-span.mce_bold:before {
+.mce-i-bold:before {
content: '\f200';
}
-span.mce_italic:before {
+.mce-i-italic:before {
content: '\f201';
}
-span.mce_bullist:before {
+.mce-i-bullist:before {
content: '\f203';
}
-span.mce_numlist:before {
+.mce-i-numlist:before {
content: '\f204';
}
-span.mce_blockquote:before {
+.mce-i-blockquote:before {
content: '\f205';
}
-span.mce_justifyleft:before {
+.mce-i-alignleft:before {
content: '\f206';
}
-span.mce_justifycenter:before {
+.mce-i-aligncenter:before {
content: '\f207';
}
-span.mce_justifyright:before {
+.mce-i-alignright:before {
content: '\f208';
}
-span.mce_link:before {
+.mce-i-link:before {
content: '\f103';
}
-span.mce_unlink:before {
+.mce-i-unlink:before {
content: '\f225';
}
-span.mce_wp_more:before {
+.mce-i-wp_more:before {
content: '\f209';
}
-span.mce_strikethrough:before {
+.mce-i-strikethrough:before {
content: '\f224';
}
-span.mce_spellchecker {
- font-size: 20px;
- background: none !important;
- margin-top: 2px;
-}
-
-span.mce_spellchecker:before {
+.mce-i-spellchecker:before {
content: '\f210';
}
-span.mce_fullscreen:before,
-span.mce_wp_fullscreen:before {
+.mce-i-fullscreen:before,
+.mce-i-wp_fullscreen:before {
content: '\f211';
}
-span.mce_wp_adv:before {
+.mce-i-wp_adv:before {
content: '\f212';
}
-span.mce_underline:before {
+.mce-i-underline:before {
content: '\f213';
}
-span.mce_justifyfull:before {
+.mce-i-alignjustify:before {
content: '\f214';
}
-span.mce_forecolor {
- background: none !important;
-}
-
-span.mce_forecolor:before {
+.mce-i-forecolor:before {
content: '\f215';
}
-span.mce_pastetext:before {
+.mce-i-pastetext:before {
content: '\f217';
}
-span.mce_pasteword:before {
- content: '\f216';
-}
-
-span.mce_removeformat:before {
+.mce-i-removeformat:before {
content: '\f218';
}
-span.mce_charmap:before {
+.mce-i-charmap:before {
content: '\f220';
}
-span.mce_outdent:before {
+.mce-i-outdent:before {
content: '\f221';
}
-span.mce_indent:before {
+.mce-i-indent:before {
content: '\f222';
}
-span.mce_undo:before {
+.mce-i-undo:before {
content: '\f171';
}
-span.mce_redo:before {
+.mce-i-redo:before {
content: '\f172';
}
-span.mce_help:before,
-span.mce_wp_help:before {
+.mce-i-help:before,
+.mce-i-wp_help:before {
content: '\f223';
}
-span.mce_image:before {
+.mce-i-wp-media-library:before {
content: '\f104';
}
-span.mce_ltr:before {
+.mce-i-ltr:before {
content: '\f320';
}
-/* Default icons */
-.wp_themeSkin span.mce_cleanup {background-position:-380px -20px}
-.wp_themeSkin span.mce_anchor {background-position:-200px 0}
-.wp_themeSkin span.mce_sub {background-position:-600px 0}
-.wp_themeSkin span.mce_sup {background-position:-620px 0}
-.wp_themeSkin span.mce_newdocument {background-position:-520px 0}
-.wp_themeSkin span.mce_image {background-position:-380px 0}
-.wp_themeSkin span.mce_code {background-position:-260px 0}
-.wp_themeSkin span.mce_hr {background-position:-360px 0}
-.wp_themeSkin span.mce_visualaid {background-position:-660px 0}
-.wp_themeSkin span.mce_paste {background-position:-560px 0}
-.wp_themeSkin span.mce_copy {background-position:-700px 0}
-.wp_themeSkin span.mce_cut {background-position:-680px 0}
-.wp_themeSkin .mce_backcolor span.mceAction {background-position:-760px 0}
-.wp_themeSkin .mce_backcolorpicker {background-position:-760px 0}
-
-/* Plugins */
-.wp_themeSkin span.mce_advhr {background-position:-0px -20px}
-.wp_themeSkin span.mce_ltr {background-position:-20px -20px}
-.wp_themeSkin span.mce_rtl {background-position:-40px -20px}
-.wp_themeSkin span.mce_emotions {background-position:-60px -20px}
-.wp_themeSkin span.mce_fullpage {background-position:-80px -20px}
-.wp_themeSkin span.mce_iespell {background-position:-120px -20px}
-.wp_themeSkin span.mce_insertdate {background-position:-140px -20px}
-.wp_themeSkin span.mce_inserttime {background-position:-160px -20px}
-.wp_themeSkin span.mce_absolute {background-position:-180px -20px}
-.wp_themeSkin span.mce_backward {background-position:-200px -20px}
-.wp_themeSkin span.mce_forward {background-position:-220px -20px}
-.wp_themeSkin span.mce_insert_layer {background-position:-240px -20px}
-.wp_themeSkin span.mce_insertlayer {background-position:-260px -20px}
-.wp_themeSkin span.mce_movebackward {background-position:-280px -20px}
-.wp_themeSkin span.mce_moveforward {background-position:-300px -20px}
-.wp_themeSkin span.mce_media {background-position:-320px -20px}
-.wp_themeSkin span.mce_nonbreaking {background-position:-340px -20px}
-.wp_themeSkin span.mce_selectall {background-position:-400px -20px}
-.wp_themeSkin span.mce_preview {background-position:-420px -20px}
-.wp_themeSkin span.mce_print {background-position:-440px -20px}
-.wp_themeSkin span.mce_cancel {background-position:-460px -20px}
-.wp_themeSkin span.mce_save {background-position:-480px -20px}
-.wp_themeSkin span.mce_replace {background-position:-500px -20px}
-.wp_themeSkin span.mce_search {background-position:-520px -20px}
-.wp_themeSkin span.mce_styleprops {background-position:-560px -20px}
-.wp_themeSkin span.mce_table {background-position:-580px -20px}
-.wp_themeSkin span.mce_cell_props {background-position:-600px -20px}
-.wp_themeSkin span.mce_delete_table {background-position:-620px -20px}
-.wp_themeSkin span.mce_delete_col {background-position:-640px -20px}
-.wp_themeSkin span.mce_delete_row {background-position:-660px -20px}
-.wp_themeSkin span.mce_col_after {background-position:-680px -20px}
-.wp_themeSkin span.mce_col_before {background-position:-700px -20px}
-.wp_themeSkin span.mce_row_after {background-position:-720px -20px}
-.wp_themeSkin span.mce_row_before {background-position:-740px -20px}
-.wp_themeSkin span.mce_merge_cells {background-position:-760px -20px}
-.wp_themeSkin span.mce_table_props {background-position:-980px -20px}
-.wp_themeSkin span.mce_row_props {background-position:-780px -20px}
-.wp_themeSkin span.mce_split_cells {background-position:-800px -20px}
-.wp_themeSkin span.mce_template {background-position:-820px -20px}
-.wp_themeSkin span.mce_visualchars {background-position:-840px -20px}
-.wp_themeSkin span.mce_abbr {background-position:-860px -20px}
-.wp_themeSkin span.mce_acronym {background-position:-880px -20px}
-.wp_themeSkin span.mce_attribs {background-position:-900px -20px}
-.wp_themeSkin span.mce_cite {background-position:-920px -20px}
-.wp_themeSkin span.mce_del {background-position:-940px -20px}
-.wp_themeSkin span.mce_ins {background-position:-960px -20px}
-.wp_themeSkin span.mce_pagebreak {background-position:0 -40px}
-.wp_themeSkin span.mce_restoredraft {background-position:-20px -40px}
-.wp_themeSkin span.mce_visualblocks {background-position: -40px -40px}
-
-/* border */
-.wp_themeSkin .mceExternalToolbar,
-.wp_themeSkin .mceButton,
-.wp_themeSkin a.mceButtonEnabled:hover,
-.wp_themeSkin a.mceButtonActive,
-.wp_themeSkin a.mceButtonSelected,
-.wp_themeSkin .mceListBox .mceText,
-.wp_themeSkin .mceListBox .mceOpen,
-.wp_themeSkin select.mceListBox,
-.wp_themeSkin .mceSplitButton a.mceAction,
-.wp_themeSkin .mceSplitButton a.mceOpen,
-.wp_themeSkin .mceSplitButton a.mceOpen:hover,
-.wp_themeSkin .mceSplitButtonSelected a.mceOpen,
-.wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction,
-.wp_themeSkin .mceSplitButton a.mceAction:hover,
-.wp_themeSkin div.mceColorSplitMenu table,
-.wp_themeSkin .mceColorSplitMenu a,
-.wp_themeSkin .mceColorSplitMenu a.mceMoreColors,
-.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover,
-.wp_themeSkin a.mceMoreColors:hover,
-.wp_themeSkin .mceMenu {
- border-style: solid;
- border-width: 1px;
-}
-
-.wp_themeSkin .mceListBox .mceText {
- border-right: 0 none;
-}
-
-.wp_themeSkin iframe {
- background: transparent;
-}
-
-.wp_themeSkin .mceButton {
- border-color: transparent;
-}
-
-.wp_themeSkin .mceListBox .mceText,
-.wp_themeSkin .mceListBox .mceOpen {
- border-color: transparent;
-}
-
-.wp_themeSkin a.mceButtonEnabled:hover,
-.wp_themeSkin table.mceSplitButton:hover {
- border-color: #bbb;
- background: #eee;
- background-image: -webkit-gradient(linear, left bottom, left top, from(#e5e5e5), to(#fff));
- background-image: -webkit-linear-gradient(bottom, #e5e5e5, #fff);
- background-image: -moz-linear-gradient(bottom, #e5e5e5, #fff);
- background-image: -o-linear-gradient(bottom, #e5e5e5, #fff);
- background-image: linear-gradient(to top, #e5e5e5, #fff);
-}
-
-.wp_themeSkin a.mceButton:active,
-.wp_themeSkin a.mceButtonEnabled:active,
-.wp_themeSkin a.mceButtonSelected:active,
-.wp_themeSkin a.mceButtonActive,
-.wp_themeSkin a.mceButtonActive:active,
-.wp_themeSkin a.mceButtonActive:hover,
-.wp_themeSkin .mceSplitButtonSelected table,
-.wp_themeSkin .mceSplitButtonSelected table:hover {
- outline: none;
- border-color: #999 #ccc #ccc #999;
- background: #eee;
- background-image: -webkit-gradient(linear, left bottom, left top, from(#f6f6f6), to(#e3e3e3));
- background-image: -webkit-linear-gradient(bottom, #f6f6f6, #e3e3e3);
- background-image: -moz-linear-gradient(bottom, #f6f6f6, #e3e3e3);
- background-image: -o-linear-gradient(bottom, #f6f6f6, #e3e3e3);
- background-image: linear-gradient(to top, #f6f6f6, #e3e3e3);
-}
-
-.wp_themeSkin .mceSplitButtonSelected table a.mceOpen,
-.wp_themeSkin .mceSplitButtonSelected table a.mceAction {
- border-color: #999 #ccc #ccc #999;
-}
-
-.wp_themeSkin .mceButtonDisabled {
- border-color: transparent;
-}
-
-.wp_themeSkin .mceListBox .mceOpen {
- border-left: 0;
-}
-
-.wp_themeSkin .mceListBoxEnabled:hover,
-.wp_themeSkin .mceListBoxEnabled:active,
-.wp_themeSkin .mceListBoxHover,
-.wp_themeSkin .mceListBoxHover:active,
-.wp_themeSkin .mceListBoxSelected {
- -webkit-box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .3);
- box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .3);
- border-color: #bbb;
-}
-
-/* SplitButton */
-.wp_themeSkin .mceSplitButton .mceLast span.mceOpen .mceIconOnly {
- display: block;
-}
-
-.wp_themeSkin .mceSplitButton a.mceAction,
-.wp_themeSkin .mceSplitButton a.mceOpen {
- border-color: transparent;
-}
-
-.wp_themeSkin .mceSplitButton:hover a {
- border-color: #bbb;
-}
-
-.wp_themeSkin .mceSplitButtonEnabled a.mceOpen,
-.wp_themeSkin .mceSplitButtonSelected a.mceOpen,
-.wp_themeSkin .mceSplitButtonActive a.mceOpen,
-.wp_themeSkin .mceSplitButtonEnabled:hover a.mceOpen {
- background-image: url("../images/down_arrow.gif");
- background-position: 1px 2px;
- background-repeat: no-repeat;
- border-left: 0;
-}
-
-.wp_themeSkin .mceSplitButtonActive td {
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-.wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {
- border-color: #0A246A;
- background-color: #B6BDD2;
-}
-
-.wp_themeSkin a.mceMoreColors:hover {
- border-color: #0A246A;
-}
-
-.wp_themeSkin .mceMenuItemDisabled .mceText {
- color: #888;
-}
-
-#mceModalBlocker {
- background: #000;
- opacity: 0.7;
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
- filter: alpha(opacity=70);
-}
-
-/* WP specific */
+/* Editors */
.wp-editor-wrap {
position: relative;
}
@@ -1285,6 +404,7 @@ span.mce_ltr:before {
content: '\f104';
}
+/* Quicktags */
.quicktags-toolbar {
border-bottom-style: solid;
border-bottom-width: 1px;
@@ -1879,6 +999,7 @@ span.mce_ltr:before {
}
/* TinyMCE modal */
+/* TODO: restyle the TinyMCE 4.0 modals
.clearlooks2 .mceTop {
border-bottom: 1px solid #ccc;
}
@@ -1946,7 +1067,7 @@ span.mce_ltr:before {
color: #999;
padding-left: 12px;
}
-
+*/
/* Distraction Free Writing mode
* =Overlay Styles
-------------------------------------------------------------- */
@@ -1961,8 +1082,8 @@ span.mce_ltr:before {
filter: inherit;
}
-.fullscreen-active .fullscreen-overlay,
-.fullscreen-active #wp-fullscreen-body {
+.wp-fullscreen-active .fullscreen-overlay,
+.wp-fullscreen-active #wp-fullscreen-body {
display: block;
}
@@ -1970,76 +1091,76 @@ span.mce_ltr:before {
z-index: 200000;
}
-.fullscreen-active .fullscreen-fader {
+.wp-fullscreen-active .fullscreen-fader {
display: none;
}
/* =Overlay Body
-------------------------------------------------------------- */
+
#wp-fullscreen-body {
- width: 100%;
z-index: 150005;
display: none;
+}
+
+.wp-fullscreen-wrap {
+ margin: 0;
+ padding: 0;
position: absolute;
- top: 0;
left: 0;
- font-size: 12px;
+ right: 0;
+ bottom: 30px;
+ top: 60px;
+ z-index: 150010;
+
}
-#wp-fullscreen-wrap {
- margin: 0 auto 50px;
- position: relative;
- padding-top: 60px;
+.wp-fullscreen-wrap .wp-editor-container,
+#wp-fullscreen-central-toolbar {
+ max-width: 100%;
}
-#wp-fullscreen-title {
- font-size: 1.7em;
- line-height: 100%;
- outline: medium none;
- padding: 6px 7px;
- width: 100%;
- margin-bottom: 30px;
- -webkit-box-shadow: none;
- box-shadow: none;
+.wp-fullscreen-active .wp-editor-tools,
+.wp-fullscreen-active .quicktags-toolbar,
+.wp-fullscreen-active .mce-toolbar-grp,
+.wp-fullscreen-active .mce-statusbar {
+ display: none;
}
-#wp-fullscreen-container {
- padding: 4px 10px 50px;
+#wp-fullscreen-status {
+ margin: auto;
+ -webkit-transition: opacity 0.4s;
+ transition: opacity 0.4s;
}
-#wp-fullscreen-title,
-#wp-fullscreen-container {
+.wp-fullscreen-active .wp-fullscreen-title,
+.wp-fullscreen-active .wp-fullscreen-title:focus,
+.wp-fullscreen-active .wp-editor-container {
-webkit-border-radius: 0;
border-radius: 0;
border: 1px dashed transparent;
background: transparent;
- -moz-transition-property: border-color;
- -moz-transition-duration: 0.6s;
- -webkit-transition-property: border-color;
- -webkit-transition-duration: 0.6s;
- -o-transition-property: border-color;
- -o-transition-duration: 0.6s;
- transition-property: border-color;
- transition-duration: 0.6s;
-}
-
-#wp_mce_fullscreen {
- width: 100%;
- min-height: 300px;
- border: 0;
- background: transparent;
- font-family: Consolas, Monaco, monospace;
- line-height: 1.6em;
- padding: 0;
- overflow-y: hidden;
- outline: none;
- resize: none;
-webkit-box-shadow: none;
box-shadow: none;
+ -webkit-transition: border-color 0.4s;
+ transition: border-color 0.4s;
+}
+
+.wp-fullscreen-active .wp-editor-container {
+ margin: auto;
+}
+
+.wp-fullscreen-active .wp-fullscreen-title {
+ font-size: 1.7em;
+ line-height: 100%;
+ outline: medium none;
+ padding: 3px 7px;
+ margin: 10px auto 30px;
+ display: block;
}
#wp-fullscreen-tagline {
- color: #BBBBBB;
+ color: #bbb;
font-size: 18px;
float: right;
padding-top: 5px;
@@ -2050,20 +1171,21 @@ span.mce_ltr:before {
#fullscreen-topbar {
background: #f5f5f5;
border-bottom: 1px solid #fff;
- height: 40px;
- left: 0;
- min-width: 800px;
+ height: 45px;
position: fixed;
+ left: 0;
+ right: 0;
top: 0;
width: 100%;
z-index: 150050;
+ -webkit-transition: opacity 0.4s;
+ transition: opacity 0.4s;
}
#wp-fullscreen-toolbar {
padding: 6px 10px 0;
clear: both;
max-width: 1100px;
- min-width: 820px;
margin: 0 auto;
}
@@ -2074,6 +1196,10 @@ span.mce_ltr:before {
float: left;
}
+#wp-fullscreen-button-bar {
+ margin-top: 2px;
+}
+
#wp-fullscreen-save {
float: right;
padding: 2px 2px 0 5px;
@@ -2081,7 +1207,7 @@ span.mce_ltr:before {
#wp-fullscreen-count,
#wp-fullscreen-close {
- padding-top: 5px;
+ padding-top: 6px;
}
#wp-fullscreen-central-toolbar {
@@ -2094,7 +1220,7 @@ span.mce_ltr:before {
}
#wp-fullscreen-mode-bar {
- padding: 1px 14px 0 0;
+ padding: 3px 14px 0 0;
}
#wp-fullscreen-modes a {
@@ -2146,10 +1272,6 @@ span.mce_ltr:before {
border-bottom-right-radius: 3px;
}
-#wp-fullscreen-buttons .active a {
- background: inherit;
-}
-
#wp-fullscreen-buttons .hidden {
display: none;
}
@@ -2158,6 +1280,23 @@ span.mce_ltr:before {
opacity: 0.5;
}
+#wp-fullscreen-buttons .mce-btn button {
+ margin: 0;
+ outline: 0 none;
+ border: 0 none;
+ white-space: nowrap;
+ width: auto;
+ background: none;
+ color: #333333;
+ cursor: pointer;
+ font-size: 18px;
+ line-height: 20px;
+ overflow: visible;
+ text-align: center;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
.wp-html-mode #wp-fullscreen-buttons div {
display: none;
}
@@ -2166,10 +1305,6 @@ span.mce_ltr:before {
display: block;
}
-#fullscreen-topbar.fullscreen-make-sticky {
- display: block !important;
-}
-
#wp-fullscreen-save img {
vertical-align: middle;
}
@@ -2177,31 +1312,28 @@ span.mce_ltr:before {
#wp-fullscreen-save img,
#wp-fullscreen-save span {
padding-right: 4px;
+ line-height: 26px;
display: none;
}
/* =Thickbox Adjustments
-------------------------------------------------------------- */
-.fullscreen-active #TB_overlay {
+.wp-fullscreen-active #TB_overlay {
z-index: 150100;
}
-.fullscreen-active #TB_window {
+.wp-fullscreen-active #TB_window {
z-index: 150102;
}
/* =TinyMCE Adjustments
-------------------------------------------------------------- */
-#wp_mce_fullscreen_ifr {
- background: transparent;
+.wp-fullscreen-active #mce-modal-block {
+ z-index: 150100 !important;
}
-#wp_mce_fullscreen_parent #wp_mce_fullscreen_tbl tr.mceFirst {
- display : none;
-}
-
-#wp-fullscreen-container .wp_themeSkin table td {
- vertical-align: top;
+.wp-fullscreen-active .mce-window {
+ z-index: 150102 !important;
}
/* Colors */
@@ -2209,50 +1341,65 @@ span.mce_ltr:before {
background: #fff;
}
-.wp-fullscreen-focus #wp-fullscreen-title,
-.wp-fullscreen-focus #wp-fullscreen-container {
- border-color: #ccc;
-}
-
/* =CSS 3 transitions
-------------------------------------------------------------- */
+.wp-fullscreen-active #wp-fullscreen-status,
+.wp-fullscreen-active #fullscreen-topbar {
+ -webkit-transition-duration: 0.8s;
+ transition-duration: 0.8s;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+
+.wp-fullscreen-active.wp-dfw-show-ui #wp-fullscreen-status,
+.wp-fullscreen-active.wp-dfw-show-ui #fullscreen-topbar {
+ -webkit-transition-duration: 0.4s;
+ transition-duration: 0.4s;
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+.wp-fullscreen-active .wp-fullscreen-title,
+.wp-fullscreen-active .wp-editor-container {
+ -webkit-transition-duration: 0.8s;
+ transition-duration: 0.8s;
+ border-color: transparent;
+}
+
+.wp-fullscreen-active.wp-dfw-show-ui .wp-fullscreen-title,
+.wp-fullscreen-active.wp-dfw-show-ui .wp-editor-container {
+ -webkit-transition-duration: 0.4s;
+ transition-duration: 0.4s;
+ border-color: #ccc;
+}
+
.fade-1000,
.fade-600,
.fade-400,
.fade-300 {
opacity: 0;
- -moz-transition-property: opacity;
-webkit-transition-property: opacity;
- -o-transition-property: opacity;
transition-property: opacity;
}
.fade-1000 {
- -moz-transition-duration: 1s;
-webkit-transition-duration: 1s;
- -o-transition-duration: 1s;
transition-duration: 1s;
}
.fade-600 {
- -moz-transition-duration: 0.6s;
-webkit-transition-duration: 0.6s;
- -o-transition-duration: 0.6s;
transition-duration: 0.6s;
}
.fade-400 {
- -moz-transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
- -o-transition-duration: 0.4s;
transition-duration: 0.4s;
}
.fade-300 {
- -moz-transition-duration: 0.3s;
-webkit-transition-duration: 0.3s;
- -o-transition-duration: 0.3s;
transition-duration: 0.3s;
}
@@ -2262,21 +1409,13 @@ span.mce_ltr:before {
/* =Localization
-------------------------------------------------------------- */
-.rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors,
-.rtl .wp_themeSkin .mceMenu .mceText,
.rtl .wp-switch-editor,
-.rtl .quicktags-toolbar input,
-.rtl .clearlooks2 .mceTop span,
-.rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors {
+.rtl .quicktags-toolbar input {
font-family: Tahoma, sans-serif;
}
-html:lang(he-il) .rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors,
-html:lang(he-il) .rtl .wp_themeSkin .mceMenu .mceText,
html:lang(he-il) .rtl .wp-switch-editor,
-html:lang(he-il) .rtl .quicktags-toolbar input,
-html:lang(he-il) .rtl .clearlooks2 .mceTop span,
-html:lang(he-il) .rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors {
+html:lang(he-il) .rtl .quicktags-toolbar input {
font-family: Arial, sans-serif;
}
@@ -2291,24 +1430,12 @@ html:lang(he-il) .rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors {
background: none;
}
- .wp_themeSkin .mceListBox .mceOpen,
- .wp_themeSkin .mceListBoxHover .mceOpen,
- .wp_themeSkin .mceListBoxSelected .mceOpen,
- .wp_themeSkin table.mceListBoxEnabled .mceOpen {
- background-image: url('../images/down_arrow-2x.gif');
- background-size: 10px 20px;
- }
-
- .wp_themeSkin .mceSplitButtonEnabled a.mceOpen,
- .wp_themeSkin .mceSplitButtonSelected a.mceOpen,
- .wp_themeSkin .mceSplitButtonActive a.mceOpen,
- .wp_themeSkin .mceSplitButtonEnabled:hover a.mceOpen {
- background-image: url('../images/down_arrow-2x.gif');
- background-size: 10px 20px;
- }
-
#wp-link .toggle-arrow {
background: transparent url('../images/toggle-arrow-2x.png') top left no-repeat;
background-size: 19px 69px;
}
}
+
+/* TODO: DFW responsive */
+
+
diff --git a/src/wp-includes/js/autosave.js b/src/wp-includes/js/autosave.js
index 6345d36c0e..4c780a4a8a 100644
--- a/src/wp-includes/js/autosave.js
+++ b/src/wp-includes/js/autosave.js
@@ -43,23 +43,13 @@ jQuery(document).ready( function($) {
});
window.onbeforeunload = function(){
- var editor = typeof(tinymce) != 'undefined' ? tinymce.activeEditor : false, compareString;
+ var editor = typeof(tinymce) != 'undefined' ? tinymce.activeEditor : false;
if ( editor && ! editor.isHidden() ) {
if ( editor.isDirty() )
return autosaveL10n.saveAlert;
} else {
- if ( fullscreen && fullscreen.settings.visible ) {
- compareString = wp.autosave.getCompareString({
- post_title: $('#wp-fullscreen-title').val() || '',
- content: $('#wp_mce_fullscreen').val() || '',
- excerpt: $('#excerpt').val() || ''
- });
- } else {
- compareString = wp.autosave.getCompareString();
- }
-
- if ( compareString != autosaveLast )
+ if ( wp.autosave.getCompareString() != autosaveLast )
return autosaveL10n.saveAlert;
}
};
@@ -115,25 +105,23 @@ jQuery(document).ready( function($) {
};
// This code is meant to allow tabbing from Title to Post content.
- $('#title').on('keydown.editor-focus', function(e) {
- var ed;
+ $('#title').on( 'keydown.editor-focus', function( event ) {
+ var editor;
- if ( e.which != 9 )
- return;
+ if ( event.which === 9 && ! event.ctrlKey && ! event.altKey && ! event.shiftKey ) {
+ if ( typeof tinymce !== 'undefined' ) {
+ editor = tinymce.get('content');
+ }
- if ( !e.ctrlKey && !e.altKey && !e.shiftKey ) {
- if ( typeof(tinymce) != 'undefined' )
- ed = tinymce.get('content');
-
- if ( ed && !ed.isHidden() ) {
- $(this).one('keyup', function(){
- $('#content_tbl td.mceToolbar > a').focus();
+ if ( editor && ! editor.isHidden() ) {
+ $(this).one( 'keyup', function() {
+ editor.focus();
});
} else {
$('#content').focus();
}
- e.preventDefault();
+ event.preventDefault();
}
});
@@ -345,20 +333,12 @@ wp.autosave.getPostData = function() {
data.autosave = false;
return data;
} else {
- if ( 'mce_fullscreen' == ed.id )
- tinymce.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'});
-
tinymce.triggerSave();
}
}
- if ( typeof fullscreen != 'undefined' && fullscreen.settings.visible ) {
- data.post_title = $('#wp-fullscreen-title').val() || '';
- data.content = $('#wp_mce_fullscreen').val() || '';
- } else {
- data.post_title = $('#title').val() || '';
- data.content = $('#content').val() || '';
- }
+ data.post_title = $('#title').val() || '';
+ data.content = $('#content').val() || '';
/*
// We haven't been saving tags with autosave since 2.8... Start again?
diff --git a/src/wp-includes/js/media-editor.js b/src/wp-includes/js/media-editor.js
index 75b1c570d9..a44ea116ad 100644
--- a/src/wp-includes/js/media-editor.js
+++ b/src/wp-includes/js/media-editor.js
@@ -466,16 +466,13 @@
return false;
}
} else if ( mce ) {
- if ( tinymce.activeEditor && (tinymce.activeEditor.id == 'mce_fullscreen' || tinymce.activeEditor.id == 'wp_mce_fullscreen') )
- ed = tinymce.activeEditor;
- else
- ed = tinymce.get(wpActiveEditor);
+ ed = tinymce.get( wpActiveEditor );
}
- if ( ed && !ed.isHidden() ) {
+ if ( ed && ! ed.isHidden() ) {
// restore caret position on IE
- if ( tinymce.isIE && ed.windowManager.insertimagebookmark )
- ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);
+ // if ( tinymce.isIE && ed.windowManager.insertimagebookmark )
+ // ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);
if ( h.indexOf('[caption') !== -1 ) {
if ( ed.wpSetImgCaption )
@@ -664,7 +661,7 @@
options = options || {};
id = this.id( id );
-
+/*
// Save a bookmark of the caret position in IE.
if ( typeof tinymce !== 'undefined' ) {
editor = tinymce.get( id );
@@ -674,7 +671,7 @@
editor.windowManager.insertimagebookmark = editor.selection.getBookmark();
}
}
-
+*/
workflow = this.get( id );
// Redo workflow if state has changed
diff --git a/src/wp-includes/js/quicktags.js b/src/wp-includes/js/quicktags.js
index b55a55e3eb..da57be1abf 100644
--- a/src/wp-includes/js/quicktags.js
+++ b/src/wp-includes/js/quicktags.js
@@ -185,6 +185,9 @@ function edButton(id, display, tagStart, tagEnd, access) {
tb = document.createElement('div');
tb.id = toolbar_id;
tb.className = 'quicktags-toolbar';
+ tb.onclick = function() {
+ window.wpActiveEditor = id;
+ };
canvas.parentNode.insertBefore(tb, canvas);
t.toolbar = tb;
@@ -563,8 +566,8 @@ function edButton(id, display, tagStart, tagEnd, access) {
qt.LinkButton.prototype.callback = function(e, c, ed, defaultValue) {
var URL, t = this;
- if ( typeof(wpLink) !== 'undefined' ) {
- wpLink.open();
+ if ( typeof wpLink !== 'undefined' ) {
+ wpLink.open( ed.id );
return;
}
@@ -605,11 +608,11 @@ function edButton(id, display, tagStart, tagEnd, access) {
};
qt.FullscreenButton.prototype = new qt.Button();
qt.FullscreenButton.prototype.callback = function(e, c) {
- if ( !c.id || typeof(fullscreen) === 'undefined' ) {
+ if ( ! c.id || typeof wp === 'undefined' || ! wp.editor || ! wp.editor.fullscreen ) {
return;
}
- fullscreen.on();
+ wp.editor.fullscreen.on();
};
qt.TextDirectionButton = function() {
diff --git a/src/wp-includes/js/tinymce/langs/wp-langs-en.js b/src/wp-includes/js/tinymce/langs/wp-langs-en.js
index 8afafa61fd..f31606d681 100644
--- a/src/wp-includes/js/tinymce/langs/wp-langs-en.js
+++ b/src/wp-includes/js/tinymce/langs/wp-langs-en.js
@@ -1,504 +1,519 @@
-tinyMCE.addI18n({en:{
-common:{
-edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?",
-apply:"Apply",
-insert:"Insert",
-update:"Update",
-cancel:"Cancel",
-close:"Close",
-browse:"Browse",
-class_name:"Class",
-not_set:"-- Not set --",
-clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.",
-clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.",
-popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
-invalid_data:"ERROR: Invalid values entered, these are marked in red.",
-invalid_data_number:"{#field} must be a number",
-invalid_data_min:"{#field} must be a number greater than {#min}",
-invalid_data_size:"{#field} must be a number or percentage",
-more_colors:"More colors"
-},
-colors:{
-"000000":"Black",
-"993300":"Burnt orange",
-"333300":"Dark olive",
-"003300":"Dark green",
-"003366":"Dark azure",
-"000080":"Navy Blue",
-"333399":"Indigo",
-"333333":"Very dark gray",
-"800000":"Maroon",
-"FF6600":"Orange",
-"808000":"Olive",
-"008000":"Green",
-"008080":"Teal",
-"0000FF":"Blue",
-"666699":"Grayish blue",
-"808080":"Gray",
-"FF0000":"Red",
-"FF9900":"Amber",
-"99CC00":"Yellow green",
-"339966":"Sea green",
-"33CCCC":"Turquoise",
-"3366FF":"Royal blue",
-"800080":"Purple",
-"999999":"Medium gray",
-"FF00FF":"Magenta",
-"FFCC00":"Gold",
-"FFFF00":"Yellow",
-"00FF00":"Lime",
-"00FFFF":"Aqua",
-"00CCFF":"Sky blue",
-"993366":"Brown",
-"C0C0C0":"Silver",
-"FF99CC":"Pink",
-"FFCC99":"Peach",
-"FFFF99":"Light yellow",
-"CCFFCC":"Pale green",
-"CCFFFF":"Pale cyan",
-"99CCFF":"Light sky blue",
-"CC99FF":"Plum",
-"FFFFFF":"White"
-},
-contextmenu:{
-align:"Alignment",
-left:"Left",
-center:"Center",
-right:"Right",
-full:"Full"
-},
-insertdatetime:{
-date_fmt:"%Y-%m-%d",
-time_fmt:"%H:%M:%S",
-insertdate_desc:"Insert date",
-inserttime_desc:"Insert time",
-months_long:"January,February,March,April,May,June,July,August,September,October,November,December",
-months_short:"Jan_January_abbreviation,Feb_February_abbreviation,Mar_March_abbreviation,Apr_April_abbreviation,May_May_abbreviation,Jun_June_abbreviation,Jul_July_abbreviation,Aug_August_abbreviation,Sep_September_abbreviation,Oct_October_abbreviation,Nov_November_abbreviation,Dec_December_abbreviation",
-day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
-day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat"
-},
-print:{
-print_desc:"Print"
-},
-preview:{
-preview_desc:"Preview"
-},
-directionality:{
-ltr_desc:"Direction left to right",
-rtl_desc:"Direction right to left"
-},
-layer:{
-insertlayer_desc:"Insert new layer",
-forward_desc:"Move forward",
-backward_desc:"Move backward",
-absolute_desc:"Toggle absolute positioning",
-content:"New layer..."
-},
-save:{
-save_desc:"Save",
-cancel_desc:"Cancel all changes"
-},
-nonbreaking:{
-nonbreaking_desc:"Insert non-breaking space character"
-},
-iespell:{
-iespell_desc:"Run spell checking",
-download:"ieSpell not detected. Do you want to install it now?"
-},
-advhr:{
-advhr_desc:"Horizontal rule"
-},
-emotions:{
-emotions_desc:"Emotions"
-},
-searchreplace:{
-search_desc:"Find",
-replace_desc:"Find/Replace"
-},
-advimage:{
-image_desc:"Insert/edit image"
-},
-advlink:{
-link_desc:"Insert/edit link"
-},
-xhtmlxtras:{
-cite_desc:"Citation",
-abbr_desc:"Abbreviation",
-acronym_desc:"Acronym",
-del_desc:"Deletion",
-ins_desc:"Insertion",
-attribs_desc:"Insert/Edit Attributes"
-},
-style:{
-desc:"Edit CSS Style"
-},
-paste:{
-paste_text_desc:"Paste as Plain Text",
-paste_word_desc:"Paste from Word",
-selectall_desc:"Select All",
-plaintext_mode_sticky:"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
-plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode."
-},
-paste_dlg:{
-text_title:"Use CTRL + V on your keyboard to paste the text into the window.",
-text_linebreaks:"Keep linebreaks",
-word_title:"Use CTRL + V on your keyboard to paste the text into the window."
-},
-table:{
-desc:"Inserts a new table",
-row_before_desc:"Insert row before",
-row_after_desc:"Insert row after",
-delete_row_desc:"Delete row",
-col_before_desc:"Insert column before",
-col_after_desc:"Insert column after",
-delete_col_desc:"Remove column",
-split_cells_desc:"Split merged table cells",
-merge_cells_desc:"Merge table cells",
-row_desc:"Table row properties",
-cell_desc:"Table cell properties",
-props_desc:"Table properties",
-paste_row_before_desc:"Paste table row before",
-paste_row_after_desc:"Paste table row after",
-cut_row_desc:"Cut table row",
-copy_row_desc:"Copy table row",
-del:"Delete table",
-row:"Row",
-col:"Column",
-cell:"Cell"
-},
-autosave:{
-unload_msg:"The changes you made will be lost if you navigate away from this page."
-},
-fullscreen:{
-desc:"Toggle fullscreen mode (Alt + Shift + G)"
-},
-media:{
-desc:"Insert / edit embedded media",
-edit:"Edit embedded media"
-},
-fullpage:{
-desc:"Document properties"
-},
-template:{
-desc:"Insert predefined template content"
-},
-visualchars:{
-desc:"Visual control characters on/off."
-},
-spellchecker:{
-desc:"Toggle spellchecker (Alt + Shift + N)",
-menu:"Spellchecker settings",
-ignore_word:"Ignore word",
-ignore_words:"Ignore all",
-langs:"Languages",
-wait:"Please wait...",
-sug:"Suggestions",
-no_sug:"No suggestions",
-no_mpell:"No misspellings found.",
-learn_word:"Learn word"
-},
-pagebreak:{
-desc:"Insert Page Break"
-},
-advlist:{
-types:"Types",
-def:"Default",
-lower_alpha:"Lower alpha",
-lower_greek:"Lower greek",
-lower_roman:"Lower roman",
-upper_alpha:"Upper alpha",
-upper_roman:"Upper roman",
-circle:"Circle",
-disc:"Disc",
-square:"Square"
-},
-aria:{
-rich_text_area:"Rich Text Area"
-},
-wordcount:{
-words:"Words: "
-}
-}});
+/**
+ * TinyMCE 3.x language strings
+ *
+ * Loaded only when external plugins are added to TinyMCE.
+ */
+( function() {
+ var main = {}, lang = 'en';
-tinyMCE.addI18n("en.advanced",{
-style_select:"Styles",
-font_size:"Font size",
-fontdefault:"Font family",
-block:"Format",
-paragraph:"Paragraph",
-div:"Div",
-address:"Address",
-pre:"Preformatted",
-h1:"Heading 1",
-h2:"Heading 2",
-h3:"Heading 3",
-h4:"Heading 4",
-h5:"Heading 5",
-h6:"Heading 6",
-blockquote:"Blockquote",
-code:"Code",
-samp:"Code sample",
-dt:"Definition term ",
-dd:"Definition description",
-bold_desc:"Bold (Ctrl + B)",
-italic_desc:"Italic (Ctrl + I)",
-underline_desc:"Underline",
-striketrough_desc:"Strikethrough (Alt + Shift + D)",
-justifyleft_desc:"Align Left (Alt + Shift + L)",
-justifycenter_desc:"Align Center (Alt + Shift + C)",
-justifyright_desc:"Align Right (Alt + Shift + R)",
-justifyfull_desc:"Align Full (Alt + Shift + J)",
-bullist_desc:"Unordered list (Alt + Shift + U)",
-numlist_desc:"Ordered list (Alt + Shift + O)",
-outdent_desc:"Outdent",
-indent_desc:"Indent",
-undo_desc:"Undo (Ctrl + Z)",
-redo_desc:"Redo (Ctrl + Y)",
-link_desc:"Insert/edit link (Alt + Shift + A)",
-unlink_desc:"Unlink (Alt + Shift + S)",
-image_desc:"Insert/edit image (Alt + Shift + M)",
-cleanup_desc:"Cleanup messy code",
-code_desc:"Edit HTML Source",
-sub_desc:"Subscript",
-sup_desc:"Superscript",
-hr_desc:"Insert horizontal ruler",
-removeformat_desc:"Remove formatting",
-forecolor_desc:"Select text color",
-backcolor_desc:"Select background color",
-charmap_desc:"Insert custom character",
-visualaid_desc:"Toggle guidelines/invisible elements",
-anchor_desc:"Insert/edit anchor",
-cut_desc:"Cut",
-copy_desc:"Copy",
-paste_desc:"Paste",
-image_props_desc:"Image properties",
-newdocument_desc:"New document",
-help_desc:"Help",
-blockquote_desc:"Blockquote (Alt + Shift + Q)",
-clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.",
-path:"Path",
-newdocument:"Are you sure you want to clear all contents?",
-toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
-more_colors:"More colors",
-shortcuts_desc:"Accessibility Help",
-help_shortcut:" Press ALT F10 for toolbar. Press ALT 0 for help.",
-rich_text_area:"Rich Text Area",
-toolbar:"Toolbar"
-});
+ if ( typeof tinyMCEPreInit !== 'undefined' && tinyMCEPreInit.ref.language !== 'en' ) {
+ lang = tinyMCEPreInit.ref.language;
+ }
-tinyMCE.addI18n("en.advanced_dlg",{
-about_title:"About TinyMCE",
-about_general:"About",
-about_help:"Help",
-about_license:"License",
-about_plugins:"Plugins",
-about_plugin:"Plugin",
-about_author:"Author",
-about_version:"Version",
-about_loaded:"Loaded plugins",
-anchor_title:"Insert/edit anchor",
-anchor_name:"Anchor name",
-code_title:"HTML Source Editor",
-code_wordwrap:"Word wrap",
-colorpicker_title:"Select a color",
-colorpicker_picker_tab:"Picker",
-colorpicker_picker_title:"Color picker",
-colorpicker_palette_tab:"Palette",
-colorpicker_palette_title:"Palette colors",
-colorpicker_named_tab:"Named",
-colorpicker_named_title:"Named colors",
-colorpicker_color:"Color:",
-colorpicker_name:"Name:",
-charmap_title:"Select custom character",
-charmap_usage:"Use left and right arrows to navigate.",
-image_title:"Insert/edit image",
-image_src:"Image URL",
-image_alt:"Image description",
-image_list:"Image list",
-image_border:"Border",
-image_dimensions:"Dimensions",
-image_vspace:"Vertical space",
-image_hspace:"Horizontal space",
-image_align:"Alignment",
-image_align_baseline:"Baseline",
-image_align_top:"Top",
-image_align_middle:"Middle",
-image_align_bottom:"Bottom",
-image_align_texttop:"Text top",
-image_align_textbottom:"Text bottom",
-image_align_left:"Left",
-image_align_right:"Right",
-link_title:"Insert/edit link",
-link_url:"Link URL",
-link_target:"Target",
-link_target_same:"Open link in the same window",
-link_target_blank:"Open link in a new window",
-link_titlefield:"Title",
-link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
-link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?",
-link_list:"Link list",
-accessibility_help:"Accessibility Help",
-accessibility_usage_title:"General Usage"
-});
+ main[lang] = {
+ common: {
+ edit_confirm: "Do you want to use the WYSIWYG mode for this textarea?",
+ apply: "Apply",
+ insert: "Insert",
+ update: "Update",
+ cancel: "Cancel",
+ close: "Close",
+ browse: "Browse",
+ class_name: "Class",
+ not_set: "-- Not set --",
+ clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.",
+ clipboard_no_support: "Currently not supported by your browser, use keyboard shortcuts instead.",
+ popup_blocked: "Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
+ invalid_data: "ERROR: Invalid values entered, these are marked in red.",
+ invalid_data_number: "{#field} must be a number",
+ invalid_data_min: "{#field} must be a number greater than {#min}",
+ invalid_data_size: "{#field} must be a number or percentage",
+ more_colors: "More colors"
+ },
+ colors: {
+ "000000": "Black",
+ "993300": "Burnt orange",
+ "333300": "Dark olive",
+ "003300": "Dark green",
+ "003366": "Dark azure",
+ "000080": "Navy Blue",
+ "333399": "Indigo",
+ "333333": "Very dark gray",
+ "800000": "Maroon",
+ "FF6600": "Orange",
+ "808000": "Olive",
+ "008000": "Green",
+ "008080": "Teal",
+ "0000FF": "Blue",
+ "666699": "Grayish blue",
+ "808080": "Gray",
+ "FF0000": "Red",
+ "FF9900": "Amber",
+ "99CC00": "Yellow green",
+ "339966": "Sea green",
+ "33CCCC": "Turquoise",
+ "3366FF": "Royal blue",
+ "800080": "Purple",
+ "999999": "Medium gray",
+ "FF00FF": "Magenta",
+ "FFCC00": "Gold",
+ "FFFF00": "Yellow",
+ "00FF00": "Lime",
+ "00FFFF": "Aqua",
+ "00CCFF": "Sky blue",
+ "993366": "Brown",
+ "C0C0C0": "Silver",
+ "FF99CC": "Pink",
+ "FFCC99": "Peach",
+ "FFFF99": "Light yellow",
+ "CCFFCC": "Pale green",
+ "CCFFFF": "Pale cyan",
+ "99CCFF": "Light sky blue",
+ "CC99FF": "Plum",
+ "FFFFFF": "White"
+ },
+ contextmenu: {
+ align: "Alignment",
+ left: "Left",
+ center: "Center",
+ right: "Right",
+ full: "Full"
+ },
+ insertdatetime: {
+ date_fmt: "%Y-%m-%d",
+ time_fmt: "%H:%M:%S",
+ insertdate_desc: "Insert date",
+ inserttime_desc: "Insert time",
+ months_long: "January,February,March,April,May,June,July,August,September,October,November,December",
+ months_short: "Jan_January_abbreviation,Feb_February_abbreviation,Mar_March_abbreviation,Apr_April_abbreviation,May_May_abbreviation,Jun_June_abbreviation,Jul_July_abbreviation,Aug_August_abbreviation,Sep_September_abbreviation,Oct_October_abbreviation,Nov_November_abbreviation,Dec_December_abbreviation",
+ day_long: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
+ day_short: "Sun,Mon,Tue,Wed,Thu,Fri,Sat"
+ },
+ print: {
+ print_desc: "Print"
+ },
+ preview: {
+ preview_desc: "Preview"
+ },
+ directionality: {
+ ltr_desc: "Direction left to right",
+ rtl_desc: "Direction right to left"
+ },
+ layer: {
+ insertlayer_desc: "Insert new layer",
+ forward_desc: "Move forward",
+ backward_desc: "Move backward",
+ absolute_desc: "Toggle absolute positioning",
+ content: "New layer..."
+ },
+ save: {
+ save_desc: "Save",
+ cancel_desc: "Cancel all changes"
+ },
+ nonbreaking: {
+ nonbreaking_desc: "Insert non-breaking space character"
+ },
+ iespell: {
+ iespell_desc: "Run spell checking",
+ download: "ieSpell not detected. Do you want to install it now?"
+ },
+ advhr: {
+ advhr_desc: "Horizontal rule"
+ },
+ emotions: {
+ emotions_desc: "Emotions"
+ },
+ searchreplace: {
+ search_desc: "Find",
+ replace_desc: "Find/Replace"
+ },
+ advimage: {
+ image_desc: "Insert/edit image"
+ },
+ advlink: {
+ link_desc: "Insert/edit link"
+ },
+ xhtmlxtras: {
+ cite_desc: "Citation",
+ abbr_desc: "Abbreviation",
+ acronym_desc: "Acronym",
+ del_desc: "Deletion",
+ ins_desc: "Insertion",
+ attribs_desc: "Insert/Edit Attributes"
+ },
+ style: {
+ desc: "Edit CSS Style"
+ },
+ paste: {
+ paste_text_desc: "Paste as Plain Text",
+ paste_word_desc: "Paste from Word",
+ selectall_desc: "Select All",
+ plaintext_mode_sticky: "Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.",
+ plaintext_mode: "Paste is now in plain text mode. Click again to toggle back to regular paste mode."
+ },
+ paste_dlg: {
+ text_title: "Use CTRL + V on your keyboard to paste the text into the window.",
+ text_linebreaks: "Keep linebreaks",
+ word_title: "Use CTRL + V on your keyboard to paste the text into the window."
+ },
+ table: {
+ desc: "Inserts a new table",
+ row_before_desc: "Insert row before",
+ row_after_desc: "Insert row after",
+ delete_row_desc: "Delete row",
+ col_before_desc: "Insert column before",
+ col_after_desc: "Insert column after",
+ delete_col_desc: "Remove column",
+ split_cells_desc: "Split merged table cells",
+ merge_cells_desc: "Merge table cells",
+ row_desc: "Table row properties",
+ cell_desc: "Table cell properties",
+ props_desc: "Table properties",
+ paste_row_before_desc: "Paste table row before",
+ paste_row_after_desc: "Paste table row after",
+ cut_row_desc: "Cut table row",
+ copy_row_desc: "Copy table row",
+ del: "Delete table",
+ row: "Row",
+ col: "Column",
+ cell: "Cell"
+ },
+ autosave: {
+ unload_msg: "The changes you made will be lost if you navigate away from this page."
+ },
+ fullscreen: {
+ desc: "Toggle fullscreen mode (Alt + Shift + G)"
+ },
+ media: {
+ desc: "Insert / edit embedded media",
+ edit: "Edit embedded media"
+ },
+ fullpage: {
+ desc: "Document properties"
+ },
+ template: {
+ desc: "Insert predefined template content"
+ },
+ visualchars: {
+ desc: "Visual control characters on/off."
+ },
+ spellchecker: {
+ desc: "Toggle spellchecker (Alt + Shift + N)",
+ menu: "Spellchecker settings",
+ ignore_word: "Ignore word",
+ ignore_words: "Ignore all",
+ langs: "Languages",
+ wait: "Please wait...",
+ sug: "Suggestions",
+ no_sug: "No suggestions",
+ no_mpell: "No misspellings found.",
+ learn_word: "Learn word"
+ },
+ pagebreak: {
+ desc: "Insert Page Break"
+ },
+ advlist:{
+ types: "Types",
+ def: "Default",
+ lower_alpha: "Lower alpha",
+ lower_greek: "Lower greek",
+ lower_roman: "Lower roman",
+ upper_alpha: "Upper alpha",
+ upper_roman: "Upper roman",
+ circle: "Circle",
+ disc: "Disc",
+ square: "Square"
+ },
+ aria: {
+ rich_text_area: "Rich Text Area"
+ },
+ wordcount:{
+ words: "Words: "
+ }
+ };
-tinyMCE.addI18n("en.media_dlg",{
-title:"Insert / edit embedded media",
-general:"General",
-advanced:"Advanced",
-file:"File/URL",
-list:"List",
-size:"Dimensions",
-preview:"Preview",
-constrain_proportions:"Constrain proportions",
-type:"Type",
-id:"Id",
-name:"Name",
-class_name:"Class",
-vspace:"V-Space",
-hspace:"H-Space",
-play:"Auto play",
-loop:"Loop",
-menu:"Show menu",
-quality:"Quality",
-scale:"Scale",
-align:"Align",
-salign:"SAlign",
-wmode:"WMode",
-bgcolor:"Background",
-base:"Base",
-flashvars:"Flashvars",
-liveconnect:"SWLiveConnect",
-autohref:"AutoHREF",
-cache:"Cache",
-hidden:"Hidden",
-controller:"Controller",
-kioskmode:"Kiosk mode",
-playeveryframe:"Play every frame",
-targetcache:"Target cache",
-correction:"No correction",
-enablejavascript:"Enable JavaScript",
-starttime:"Start time",
-endtime:"End time",
-href:"href",
-qtsrcchokespeed:"Choke speed",
-target:"Target",
-volume:"Volume",
-autostart:"Auto start",
-enabled:"Enabled",
-fullscreen:"Fullscreen",
-invokeurls:"Invoke URLs",
-mute:"Mute",
-stretchtofit:"Stretch to fit",
-windowlessvideo:"Windowless video",
-balance:"Balance",
-baseurl:"Base URL",
-captioningid:"Captioning id",
-currentmarker:"Current marker",
-currentposition:"Current position",
-defaultframe:"Default frame",
-playcount:"Play count",
-rate:"Rate",
-uimode:"UI Mode",
-flash_options:"Flash options",
-qt_options:"QuickTime options",
-wmp_options:"Windows media player options",
-rmp_options:"Real media player options",
-shockwave_options:"Shockwave options",
-autogotourl:"Auto goto URL",
-center:"Center",
-imagestatus:"Image status",
-maintainaspect:"Maintain aspect",
-nojava:"No java",
-prefetch:"Prefetch",
-shuffle:"Shuffle",
-console:"Console",
-numloop:"Num loops",
-controls:"Controls",
-scriptcallbacks:"Script callbacks",
-swstretchstyle:"Stretch style",
-swstretchhalign:"Stretch H-Align",
-swstretchvalign:"Stretch V-Align",
-sound:"Sound",
-progress:"Progress",
-qtsrc:"QT Src",
-qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.",
-align_top:"Top",
-align_right:"Right",
-align_bottom:"Bottom",
-align_left:"Left",
-align_center:"Center",
-align_top_left:"Top left",
-align_top_right:"Top right",
-align_bottom_left:"Bottom left",
-align_bottom_right:"Bottom right",
-flv_options:"Flash video options",
-flv_scalemode:"Scale mode",
-flv_buffer:"Buffer",
-flv_startimage:"Start image",
-flv_starttime:"Start time",
-flv_defaultvolume:"Default volume",
-flv_hiddengui:"Hidden GUI",
-flv_autostart:"Auto start",
-flv_loop:"Loop",
-flv_showscalemodes:"Show scale modes",
-flv_smoothvideo:"Smooth video",
-flv_jscallback:"JS Callback",
-html5_video_options:"HTML5 Video Options",
-altsource1:"Alternative source 1",
-altsource2:"Alternative source 2",
-preload:"Preload",
-poster:"Poster",
-source:"Source"
-});
+ tinyMCE.addI18n( main );
-tinyMCE.addI18n("en.wordpress",{
-wp_adv_desc:"Show/Hide Kitchen Sink (Alt + Shift + Z)",
-wp_more_desc:"Insert More Tag (Alt + Shift + T)",
-wp_page_desc:"Insert Page break (Alt + Shift + P)",
-wp_help_desc:"Help (Alt + Shift + H)",
-wp_more_alt:"More...",
-wp_page_alt:"Next page...",
-add_media:"Add Media",
-add_image:"Add an Image",
-add_video:"Add Video",
-add_audio:"Add Audio",
-editgallery:"Edit Gallery",
-delgallery:"Delete Gallery",
-wp_fullscreen_desc:"Distraction Free Writing mode (Alt + Shift + W)"
-});
+ tinyMCE.addI18n( lang + ".advanced", {
+ style_select: "Styles",
+ font_size: "Font size",
+ fontdefault: "Font family",
+ block: "Format",
+ paragraph: "Paragraph",
+ div: "Div",
+ address: "Address",
+ pre: "Preformatted",
+ h1: "Heading 1",
+ h2: "Heading 2",
+ h3: "Heading 3",
+ h4: "Heading 4",
+ h5: "Heading 5",
+ h6: "Heading 6",
+ blockquote: "Blockquote",
+ code: "Code",
+ samp: "Code sample",
+ dt: "Definition term ",
+ dd: "Definition description",
+ bold_desc: "Bold (Ctrl + B)",
+ italic_desc: "Italic (Ctrl + I)",
+ underline_desc: "Underline",
+ striketrough_desc: "Strikethrough (Alt + Shift + D)",
+ justifyleft_desc: "Align Left (Alt + Shift + L)",
+ justifycenter_desc: "Align Center (Alt + Shift + C)",
+ justifyright_desc: "Align Right (Alt + Shift + R)",
+ justifyfull_desc: "Align Full (Alt + Shift + J)",
+ bullist_desc: "Unordered list (Alt + Shift + U)",
+ numlist_desc: "Ordered list (Alt + Shift + O)",
+ outdent_desc: "Outdent",
+ indent_desc: "Indent",
+ undo_desc: "Undo (Ctrl + Z)",
+ redo_desc: "Redo (Ctrl + Y)",
+ link_desc: "Insert/edit link (Alt + Shift + A)",
+ unlink_desc: "Unlink (Alt + Shift + S)",
+ image_desc: "Insert/edit image (Alt + Shift + M)",
+ cleanup_desc: "Cleanup messy code",
+ code_desc: "Edit HTML Source",
+ sub_desc: "Subscript",
+ sup_desc: "Superscript",
+ hr_desc: "Insert horizontal ruler",
+ removeformat_desc: "Remove formatting",
+ forecolor_desc: "Select text color",
+ backcolor_desc: "Select background color",
+ charmap_desc: "Insert custom character",
+ visualaid_desc: "Toggle guidelines/invisible elements",
+ anchor_desc: "Insert/edit anchor",
+ cut_desc: "Cut",
+ copy_desc: "Copy",
+ paste_desc: "Paste",
+ image_props_desc: "Image properties",
+ newdocument_desc: "New document",
+ help_desc: "Help",
+ blockquote_desc: "Blockquote (Alt + Shift + Q)",
+ clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.",
+ path: "Path",
+ newdocument: "Are you sure you want to clear all contents?",
+ toolbar_focus: "Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X",
+ more_colors: "More colors",
+ shortcuts_desc: "Accessibility Help",
+ help_shortcut: " Press ALT F10 for toolbar. Press ALT 0 for help.",
+ rich_text_area: "Rich Text Area",
+ toolbar: "Toolbar"
+ });
-tinyMCE.addI18n("en.wpeditimage",{
-edit_img:"Edit Image",
-del_img:"Delete Image",
-adv_settings:"Advanced Settings",
-none:"None",
-size:"Size",
-thumbnail:"Thumbnail",
-medium:"Medium",
-full_size:"Full Size",
-current_link:"Current Link",
-link_to_img:"Link to Image",
-link_help:"Enter a link URL or click above for presets.",
-adv_img_settings:"Advanced Image Settings",
-source:"Source",
-width:"Width",
-height:"Height",
-orig_size:"Original Size",
-css:"CSS Class",
-adv_link_settings:"Advanced Link Settings",
-link_rel:"Link Rel",
-height:"Height",
-orig_size:"Original Size",
-css:"CSS Class",
-s60:"60%",
-s70:"70%",
-s80:"80%",
-s90:"90%",
-s100:"100%",
-s110:"110%",
-s120:"120%",
-s130:"130%",
-img_title:"Title",
-caption:"Caption",
-alt:"Alternative Text"
-});
+ tinyMCE.addI18n( lang + ".advanced_dlg", {
+ about_title: "About TinyMCE",
+ about_general: "About",
+ about_help: "Help",
+ about_license: "License",
+ about_plugins: "Plugins",
+ about_plugin: "Plugin",
+ about_author: "Author",
+ about_version: "Version",
+ about_loaded: "Loaded plugins",
+ anchor_title: "Insert/edit anchor",
+ anchor_name: "Anchor name",
+ code_title: "HTML Source Editor",
+ code_wordwrap: "Word wrap",
+ colorpicker_title: "Select a color",
+ colorpicker_picker_tab: "Picker",
+ colorpicker_picker_title: "Color picker",
+ colorpicker_palette_tab: "Palette",
+ colorpicker_palette_title: "Palette colors",
+ colorpicker_named_tab: "Named",
+ colorpicker_named_title: "Named colors",
+ colorpicker_color: "Color: ",
+ colorpicker_name: "Name: ",
+ charmap_title: "Select custom character",
+ charmap_usage: "Use left and right arrows to navigate.",
+ image_title: "Insert/edit image",
+ image_src: "Image URL",
+ image_alt: "Image description",
+ image_list: "Image list",
+ image_border: "Border",
+ image_dimensions: "Dimensions",
+ image_vspace: "Vertical space",
+ image_hspace: "Horizontal space",
+ image_align: "Alignment",
+ image_align_baseline: "Baseline",
+ image_align_top: "Top",
+ image_align_middle: "Middle",
+ image_align_bottom: "Bottom",
+ image_align_texttop: "Text top",
+ image_align_textbottom: "Text bottom",
+ image_align_left: "Left",
+ image_align_right: "Right",
+ link_title: "Insert/edit link",
+ link_url: "Link URL",
+ link_target: "Target",
+ link_target_same: "Open link in the same window",
+ link_target_blank: "Open link in a new window",
+ link_titlefield: "Title",
+ link_is_email: "The URL you entered seems to be an email address, do you want to add the required mailto: prefix?",
+ link_is_external: "The URL you entered seems to be an external link, do you want to add the required http:// prefix?",
+ link_list: "Link list",
+ accessibility_help: "Accessibility Help",
+ accessibility_usage_title: "General Usage"
+ });
+
+ tinyMCE.addI18n( lang + ".media_dlg", {
+ title: "Insert / edit embedded media",
+ general: "General",
+ advanced: "Advanced",
+ file: "File/URL",
+ list: "List",
+ size: "Dimensions",
+ preview: "Preview",
+ constrain_proportions: "Constrain proportions",
+ type: "Type",
+ id: "Id",
+ name: "Name",
+ class_name: "Class",
+ vspace: "V-Space",
+ hspace: "H-Space",
+ play: "Auto play",
+ loop: "Loop",
+ menu: "Show menu",
+ quality: "Quality",
+ scale: "Scale",
+ align: "Align",
+ salign: "SAlign",
+ wmode: "WMode",
+ bgcolor: "Background",
+ base: "Base",
+ flashvars: "Flashvars",
+ liveconnect: "SWLiveConnect",
+ autohref: "AutoHREF",
+ cache: "Cache",
+ hidden: "Hidden",
+ controller: "Controller",
+ kioskmode: "Kiosk mode",
+ playeveryframe: "Play every frame",
+ targetcache: "Target cache",
+ correction: "No correction",
+ enablejavascript: "Enable JavaScript",
+ starttime: "Start time",
+ endtime: "End time",
+ href: "href",
+ qtsrcchokespeed: "Choke speed",
+ target: "Target",
+ volume: "Volume",
+ autostart: "Auto start",
+ enabled: "Enabled",
+ fullscreen: "Fullscreen",
+ invokeurls: "Invoke URLs",
+ mute: "Mute",
+ stretchtofit: "Stretch to fit",
+ windowlessvideo: "Windowless video",
+ balance: "Balance",
+ baseurl: "Base URL",
+ captioningid: "Captioning id",
+ currentmarker: "Current marker",
+ currentposition: "Current position",
+ defaultframe: "Default frame",
+ playcount: "Play count",
+ rate: "Rate",
+ uimode: "UI Mode",
+ flash_options: "Flash options",
+ qt_options: "QuickTime options",
+ wmp_options: "Windows media player options",
+ rmp_options: "Real media player options",
+ shockwave_options: "Shockwave options",
+ autogotourl: "Auto goto URL",
+ center: "Center",
+ imagestatus: "Image status",
+ maintainaspect: "Maintain aspect",
+ nojava: "No java",
+ prefetch: "Prefetch",
+ shuffle: "Shuffle",
+ console: "Console",
+ numloop: "Num loops",
+ controls: "Controls",
+ scriptcallbacks: "Script callbacks",
+ swstretchstyle: "Stretch style",
+ swstretchhalign: "Stretch H-Align",
+ swstretchvalign: "Stretch V-Align",
+ sound: "Sound",
+ progress: "Progress",
+ qtsrc: "QT Src",
+ qt_stream_warn: "Streamed rtsp resources should be added to the QT Src field under the advanced tab.",
+ align_top: "Top",
+ align_right: "Right",
+ align_bottom: "Bottom",
+ align_left: "Left",
+ align_center: "Center",
+ align_top_left: "Top left",
+ align_top_right: "Top right",
+ align_bottom_left: "Bottom left",
+ align_bottom_right: "Bottom right",
+ flv_options: "Flash video options",
+ flv_scalemode: "Scale mode",
+ flv_buffer: "Buffer",
+ flv_startimage: "Start image",
+ flv_starttime: "Start time",
+ flv_defaultvolume: "Default volume",
+ flv_hiddengui: "Hidden GUI",
+ flv_autostart: "Auto start",
+ flv_loop: "Loop",
+ flv_showscalemodes: "Show scale modes",
+ flv_smoothvideo: "Smooth video",
+ flv_jscallback: "JS Callback",
+ html5_video_options: "HTML5 Video Options",
+ altsource1: "Alternative source 1",
+ altsource2: "Alternative source 2",
+ preload: "Preload",
+ poster: "Poster",
+ source: "Source"
+ });
+
+ tinyMCE.addI18n( lang + ".wordpress", {
+ wp_adv_desc: "Show/Hide Kitchen Sink (Alt + Shift + Z)",
+ wp_more_desc: "Insert More Tag (Alt + Shift + T)",
+ wp_page_desc: "Insert Page break (Alt + Shift + P)",
+ wp_help_desc: "Help (Alt + Shift + H)",
+ wp_more_alt: "More...",
+ wp_page_alt: "Next page...",
+ add_media: "Add Media",
+ add_image: "Add an Image",
+ add_video: "Add Video",
+ add_audio: "Add Audio",
+ editgallery: "Edit Gallery",
+ delgallery: "Delete Gallery",
+ wp_fullscreen_desc: "Distraction Free Writing mode (Alt + Shift + W)"
+ });
+
+ tinyMCE.addI18n( lang + ".wpeditimage", {
+ edit_img: "Edit Image",
+ del_img: "Delete Image",
+ adv_settings: "Advanced Settings",
+ none: "None",
+ size: "Size",
+ thumbnail: "Thumbnail",
+ medium: "Medium",
+ full_size: "Full Size",
+ current_link: "Current Link",
+ link_to_img: "Link to Image",
+ link_help: "Enter a link URL or click above for presets.",
+ adv_img_settings: "Advanced Image Settings",
+ source: "Source",
+ width: "Width",
+ height: "Height",
+ orig_size: "Original Size",
+ css: "CSS Class",
+ adv_link_settings: "Advanced Link Settings",
+ link_rel: "Link Rel",
+ height: "Height",
+ orig_size: "Original Size",
+ css: "CSS Class",
+ s60: "60%",
+ s70: "70%",
+ s80: "80%",
+ s90: "90%",
+ s100: "100%",
+ s110: "110%",
+ s120: "120%",
+ s130: "130%",
+ img_title: "Title",
+ caption: "Caption",
+ alt: "Alternative Text"
+ });
+}());
diff --git a/src/wp-includes/js/tinymce/langs/wp-langs.php b/src/wp-includes/js/tinymce/langs/wp-langs.php
deleted file mode 100644
index 9de90c2e0b..0000000000
--- a/src/wp-includes/js/tinymce/langs/wp-langs.php
+++ /dev/null
@@ -1,565 +0,0 @@
- array(
- 'edit_confirm' => __('Do you want to use the WYSIWYG mode for this textarea?'),
- 'apply' => __('Apply'),
- 'insert' => __('Insert'),
- 'update' => __('Update'),
- 'cancel' => __('Cancel'),
- 'close' => __('Close'),
- 'browse' => __('Browse'),
- 'class_name' => __('Class'),
- 'not_set' => __('-- Not set --'),
- 'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox.'),
- 'clipboard_no_support' => __('Currently not supported by your browser, use keyboard shortcuts instead.'),
- 'popup_blocked' => __('Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.'),
- 'invalid_data' => __('ERROR: Invalid values entered, these are marked in red.'),
- 'invalid_data_number' => __('{#field} must be a number'),
- 'invalid_data_min' => __('{#field} must be a number greater than {#min}'),
- 'invalid_data_size' => __('{#field} must be a number or percentage'),
- 'more_colors' => __('More colors')
- ),
-
- 'colors' => array(
- '000000' => __('Black'),
- '993300' => __('Burnt orange'),
- '333300' => __('Dark olive'),
- '003300' => __('Dark green'),
- '003366' => __('Dark azure'),
- '000080' => __('Navy Blue'),
- '333399' => __('Indigo'),
- '333333' => __('Very dark gray'),
- '800000' => __('Maroon'),
- 'FF6600' => __('Orange'),
- '808000' => __('Olive'),
- '008000' => __('Green'),
- '008080' => __('Teal'),
- '0000FF' => __('Blue'),
- '666699' => __('Grayish blue'),
- '808080' => __('Gray'),
- 'FF0000' => __('Red'),
- 'FF9900' => __('Amber'),
- '99CC00' => __('Yellow green'),
- '339966' => __('Sea green'),
- '33CCCC' => __('Turquoise'),
- '3366FF' => __('Royal blue'),
- '800080' => __('Purple'),
- '999999' => __('Medium gray'),
- 'FF00FF' => __('Magenta'),
- 'FFCC00' => __('Gold'),
- 'FFFF00' => __('Yellow'),
- '00FF00' => __('Lime'),
- '00FFFF' => __('Aqua'),
- '00CCFF' => __('Sky blue'),
- '993366' => __('Brown'),
- 'C0C0C0' => __('Silver'),
- 'FF99CC' => __('Pink'),
- 'FFCC99' => __('Peach'),
- 'FFFF99' => __('Light yellow'),
- 'CCFFCC' => __('Pale green'),
- 'CCFFFF' => __('Pale cyan'),
- '99CCFF' => __('Light sky blue'),
- 'CC99FF' => __('Plum'),
- 'FFFFFF' => __('White')
- ),
-
- 'contextmenu' => array(
- 'align' => __('Alignment'), /* translators: alignment */
- 'left' => __('Left'), /* translators: alignment */
- 'center' => __('Center'), /* translators: alignment */
- 'right' => __('Right'), /* translators: alignment */
- 'full' => __('Full') /* translators: alignment */
- ),
-
- 'insertdatetime' => array(
- 'date_fmt' => __('%Y-%m-%d'), /* translators: year, month, date */
- 'time_fmt' => __('%H:%M:%S'), /* translators: hours, minutes, seconds */
- 'insertdate_desc' => __('Insert date'),
- 'inserttime_desc' => __('Insert time'),
- 'months_long' => __('January').','.__('February').','.__('March').','.__('April').','.__('May').','.__('June').','.__('July').','.__('August').','.__('September').','.__('October').','.__('November').','.__('December'),
- 'months_short' => __('Jan_January_abbreviation').','.__('Feb_February_abbreviation').','.__('Mar_March_abbreviation').','.__('Apr_April_abbreviation').','.__('May_May_abbreviation').','.__('Jun_June_abbreviation').','.__('Jul_July_abbreviation').','.__('Aug_August_abbreviation').','.__('Sep_September_abbreviation').','.__('Oct_October_abbreviation').','.__('Nov_November_abbreviation').','.__('Dec_December_abbreviation'),
- 'day_long' => __('Sunday').','.__('Monday').','.__('Tuesday').','.__('Wednesday').','.__('Thursday').','.__('Friday').','.__('Saturday'),
- 'day_short' => __('Sun').','.__('Mon').','.__('Tue').','.__('Wed').','.__('Thu').','.__('Fri').','.__('Sat')
- ),
-
- 'print' => array(
- 'print_desc' => __('Print')
- ),
-
- 'preview' => array(
- 'preview_desc' => __('Preview')
- ),
-
- 'directionality' => array(
- 'ltr_desc' => __('Direction left to right'),
- 'rtl_desc' => __('Direction right to left')
- ),
-
- 'layer' => array(
- 'insertlayer_desc' => __('Insert new layer'),
- 'forward_desc' => __('Move forward'),
- 'backward_desc' => __('Move backward'),
- 'absolute_desc' => __('Toggle absolute positioning'),
- 'content' => __('New layer...')
- ),
-
- 'save' => array(
- 'save_desc' => __('Save'),
- 'cancel_desc' => __('Cancel all changes')
- ),
-
- 'nonbreaking' => array(
- 'nonbreaking_desc' => __('Insert non-breaking space character')
- ),
-
- 'iespell' => array(
- 'iespell_desc' => __('Run spell checking'),
- 'download' => __('ieSpell not detected. Do you want to install it now?')
- ),
-
- 'advhr' => array(
- 'advhr_desc' => __('Horizontal rule')
- ),
-
- 'emotions' => array(
- 'emotions_desc' => __('Emotions')
- ),
-
- 'searchreplace' => array(
- 'search_desc' => __('Find'),
- 'replace_desc' => __('Find/Replace')
- ),
-
- 'advimage' => array(
- 'image_desc' => __('Insert/edit image')
- ),
-
- 'advlink' => array(
- 'link_desc' => __('Insert/edit link')
- ),
-
- 'xhtmlxtras' => array(
- 'cite_desc' => __('Citation'),
- 'abbr_desc' => __('Abbreviation'),
- 'acronym_desc' => __('Acronym'),
- 'del_desc' => __('Deletion'),
- 'ins_desc' => __('Insertion'),
- 'attribs_desc' => __('Insert/Edit Attributes')
- ),
-
- 'style' => array(
- 'desc' => __('Edit CSS Style')
- ),
-
- 'paste' => array(
- 'paste_text_desc' => __('Paste as Plain Text'),
- 'paste_word_desc' => __('Paste from Word'),
- 'selectall_desc' => __('Select All'),
- 'plaintext_mode_sticky' => __('Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.'),
- 'plaintext_mode' => __('Paste is now in plain text mode. Click again to toggle back to regular paste mode.')
- ),
-
- 'paste_dlg' => array(
- 'text_title' => __('Use CTRL+V on your keyboard to paste the text into the window.'),
- 'text_linebreaks' => __('Keep linebreaks'),
- 'word_title' => __('Use CTRL+V on your keyboard to paste the text into the window.')
- ),
-
- 'table' => array(
- 'desc' => __('Inserts a new table'),
- 'row_before_desc' => __('Insert row before'),
- 'row_after_desc' => __('Insert row after'),
- 'delete_row_desc' => __('Delete row'),
- 'col_before_desc' => __('Insert column before'),
- 'col_after_desc' => __('Insert column after'),
- 'delete_col_desc' => __('Remove column'),
- 'split_cells_desc' => __('Split merged table cells'),
- 'merge_cells_desc' => __('Merge table cells'),
- 'row_desc' => __('Table row properties'),
- 'cell_desc' => __('Table cell properties'),
- 'props_desc' => __('Table properties'),
- 'paste_row_before_desc' => __('Paste table row before'),
- 'paste_row_after_desc' => __('Paste table row after'),
- 'cut_row_desc' => __('Cut table row'),
- 'copy_row_desc' => __('Copy table row'),
- 'del' => __('Delete table'),
- 'row' => __('Row'),
- 'col' => __('Column'),
- 'cell' => __('Cell')
- ),
-
- 'autosave' => array(
- 'unload_msg' => __('The changes you made will be lost if you navigate away from this page.')
- ),
-
- 'fullscreen' => array(
- 'desc' => __('Toggle fullscreen mode (Alt + Shift + G)')
- ),
-
- 'media' => array(
- 'desc' => __('Insert / edit embedded media'),
- 'edit' => __('Edit embedded media')
- ),
-
- 'fullpage' => array(
- 'desc' => __('Document properties')
- ),
-
- 'template' => array(
- 'desc' => __('Insert predefined template content')
- ),
-
- 'visualchars' => array(
- 'desc' => __('Visual control characters on/off.')
- ),
-
- 'spellchecker' => array(
- 'desc' => __('Toggle spellchecker (Alt + Shift + N)'),
- 'menu' => __('Spellchecker settings'),
- 'ignore_word' => __('Ignore word'),
- 'ignore_words' => __('Ignore all'),
- 'langs' => __('Languages'),
- 'wait' => __('Please wait...'),
- 'sug' => __('Suggestions'),
- 'no_sug' => __('No suggestions'),
- 'no_mpell' => __('No misspellings found.'),
- 'learn_word' => __('Learn word')
- ),
-
- 'pagebreak' => array(
- 'desc' => __('Insert Page Break')
- ),
-
- 'advlist' => array(
- 'types' => __('Types'),
- 'def' => __('Default'),
- 'lower_alpha' => __('Lower alpha'),
- 'lower_greek' => __('Lower greek'),
- 'lower_roman' => __('Lower roman'),
- 'upper_alpha' => __('Upper alpha'),
- 'upper_roman' => __('Upper roman'),
- 'circle' => __('Circle'),
- 'disc' => __('Disc'),
- 'square' => __('Square')
- ),
-
- 'aria' => array(
- 'rich_text_area' => __('Rich Text Area')
- ),
-
- 'wordcount' => array(
- 'words' => __('Words:')
- )
- );
-
- $advanced = array(
- 'style_select' => __('Styles'), /* translators: TinyMCE inline styles */
- 'font_size' => __('Font size'),
- 'fontdefault' => __('Font family'),
- 'block' => __('Format'),
- 'paragraph' => __('Paragraph'),
- 'div' => __('Div'),
- 'address' => __('Address'),
- 'pre' => __('Preformatted'),
- 'h1' => __('Heading 1'),
- 'h2' => __('Heading 2'),
- 'h3' => __('Heading 3'),
- 'h4' => __('Heading 4'),
- 'h5' => __('Heading 5'),
- 'h6' => __('Heading 6'),
- 'blockquote' => __('Blockquote'),
- 'code' => __('Code'),
- 'samp' => __('Code sample'),
- 'dt' => __('Definition term '),
- 'dd' => __('Definition description'),
- 'bold_desc' => __('Bold (Ctrl + B)'),
- 'italic_desc' => __('Italic (Ctrl + I)'),
- 'underline_desc' => __('Underline'),
- 'striketrough_desc' => __('Strikethrough (Alt + Shift + D)'),
- 'justifyleft_desc' => __('Align Left (Alt + Shift + L)'),
- 'justifycenter_desc' => __('Align Center (Alt + Shift + C)'),
- 'justifyright_desc' => __('Align Right (Alt + Shift + R)'),
- 'justifyfull_desc' => __('Align Full (Alt + Shift + J)'),
- 'bullist_desc' => __('Unordered list (Alt + Shift + U)'),
- 'numlist_desc' => __('Ordered list (Alt + Shift + O)'),
- 'outdent_desc' => __('Outdent'),
- 'indent_desc' => __('Indent'),
- 'undo_desc' => __('Undo (Ctrl + Z)'),
- 'redo_desc' => __('Redo (Ctrl + Y)'),
- 'link_desc' => __('Insert/edit link (Alt + Shift + A)'),
- 'unlink_desc' => __('Unlink (Alt + Shift + S)'),
- 'image_desc' => __('Insert/edit image (Alt + Shift + M)'),
- 'cleanup_desc' => __('Cleanup messy code'),
- 'code_desc' => __('Edit HTML Source'),
- 'sub_desc' => __('Subscript'),
- 'sup_desc' => __('Superscript'),
- 'hr_desc' => __('Insert horizontal ruler'),
- 'removeformat_desc' => __('Remove formatting'),
- 'forecolor_desc' => __('Select text color'),
- 'backcolor_desc' => __('Select background color'),
- 'charmap_desc' => __('Insert custom character'),
- 'visualaid_desc' => __('Toggle guidelines/invisible elements'),
- 'anchor_desc' => __('Insert/edit anchor'),
- 'cut_desc' => __('Cut'),
- 'copy_desc' => __('Copy'),
- 'paste_desc' => __('Paste'),
- 'image_props_desc' => __('Image properties'),
- 'newdocument_desc' => __('New document'),
- 'help_desc' => __('Help'),
- 'blockquote_desc' => __('Blockquote (Alt + Shift + Q)'),
- 'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox.'),
- 'path' => __('Path'),
- 'newdocument' => __('Are you sure you want to clear all contents?'),
- 'toolbar_focus' => __('Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X'),
- 'more_colors' => __('More colors'),
- 'shortcuts_desc' => __('Accessibility Help'),
- 'help_shortcut' => __('Press ALT F10 for toolbar. Press ALT 0 for help.'),
- 'rich_text_area' => __('Rich Text Area'),
- 'toolbar' => __('Toolbar')
- );
-
- $advanced_dlg = array(
- 'about_title' => __('About TinyMCE'),
- 'about_general' => __('About'),
- 'about_help' => __('Help'),
- 'about_license' => __('License'),
- 'about_plugins' => __('Plugins'),
- 'about_plugin' => __('Plugin'),
- 'about_author' => __('Author'),
- 'about_version' => __('Version'),
- 'about_loaded' => __('Loaded plugins'),
- 'anchor_title' => __('Insert/edit anchor'),
- 'anchor_name' => __('Anchor name'),
- 'code_title' => __('HTML Source Editor'),
- 'code_wordwrap' => __('Word wrap'),
- 'colorpicker_title' => __('Select a color'),
- 'colorpicker_picker_tab' => __('Picker'),
- 'colorpicker_picker_title' => __('Color picker'),
- 'colorpicker_palette_tab' => __('Palette'),
- 'colorpicker_palette_title' => __('Palette colors'),
- 'colorpicker_named_tab' => __('Named'),
- 'colorpicker_named_title' => __('Named colors'),
- 'colorpicker_color' => __('Color:'),
- 'colorpicker_name' => _x('Name:', 'html attribute'),
- 'charmap_title' => __('Select custom character'),
- 'charmap_usage' => __('Use left and right arrows to navigate.'),
- 'image_title' => __('Insert/edit image'),
- 'image_src' => __('Image URL'),
- 'image_alt' => __('Image description'),
- 'image_list' => __('Image list'),
- 'image_border' => __('Border'),
- 'image_dimensions' => __('Dimensions'),
- 'image_vspace' => __('Vertical space'),
- 'image_hspace' => __('Horizontal space'),
- 'image_align' => __('Alignment'),
- 'image_align_baseline' => __('Baseline'),
- 'image_align_top' => __('Top'),
- 'image_align_middle' => __('Middle'),
- 'image_align_bottom' => __('Bottom'),
- 'image_align_texttop' => __('Text top'),
- 'image_align_textbottom' => __('Text bottom'),
- 'image_align_left' => __('Left'),
- 'image_align_right' => __('Right'),
- 'link_title' => __('Insert/edit link'),
- 'link_url' => __('Link URL'),
- 'link_target' => __('Target'),
- 'link_target_same' => __('Open link in the same window'),
- 'link_target_blank' => __('Open link in a new window'),
- 'link_titlefield' => __('Title'),
- 'link_is_email' => __('The URL you entered seems to be an email address, do you want to add the required mailto: prefix?'),
- 'link_is_external' => __('The URL you entered seems to external link, do you want to add the required http:// prefix?'),
- 'link_list' => __('Link list'),
- 'accessibility_help' => __('Accessibility Help'),
- 'accessibility_usage_title' => __('General Usage')
- );
-
- $media_dlg = array(
- 'title' => __('Insert / edit embedded media'),
- 'general' => __('General'),
- 'advanced' => __('Advanced'),
- 'file' => __('File/URL'),
- 'list' => __('List'),
- 'size' => __('Dimensions'),
- 'preview' => __('Preview'),
- 'constrain_proportions' => __('Constrain proportions'),
- 'type' => __('Type'),
- 'id' => __('Id'),
- 'name' => _x('Name', 'html attribute'),
- 'class_name' => __('Class'),
- 'vspace' => __('V-Space'),
- 'hspace' => __('H-Space'),
- 'play' => __('Auto play'),
- 'loop' => __('Loop'),
- 'menu' => __('Show menu'),
- 'quality' => __('Quality'),
- 'scale' => __('Scale'),
- 'align' => __('Align'),
- 'salign' => __('SAlign'),
- 'wmode' => __('WMode'),
- 'bgcolor' => __('Background'),
- 'base' => __('Base'),
- 'flashvars' => __('Flashvars'),
- 'liveconnect' => __('SWLiveConnect'),
- 'autohref' => __('AutoHREF'),
- 'cache' => __('Cache'),
- 'hidden' => __('Hidden'),
- 'controller' => __('Controller'),
- 'kioskmode' => __('Kiosk mode'),
- 'playeveryframe' => __('Play every frame'),
- 'targetcache' => __('Target cache'),
- 'correction' => __('No correction'),
- 'enablejavascript' => __('Enable JavaScript'),
- 'starttime' => __('Start time'),
- 'endtime' => __('End time'),
- 'href' => __('href'),
- 'qtsrcchokespeed' => __('Choke speed'),
- 'target' => __('Target'),
- 'volume' => __('Volume'),
- 'autostart' => __('Auto start'),
- 'enabled' => __('Enabled'),
- 'fullscreen' => __('Fullscreen'),
- 'invokeurls' => __('Invoke URLs'),
- 'mute' => __('Mute'),
- 'stretchtofit' => __('Stretch to fit'),
- 'windowlessvideo' => __('Windowless video'),
- 'balance' => __('Balance'),
- 'baseurl' => __('Base URL'),
- 'captioningid' => __('Captioning id'),
- 'currentmarker' => __('Current marker'),
- 'currentposition' => __('Current position'),
- 'defaultframe' => __('Default frame'),
- 'playcount' => __('Play count'),
- 'rate' => __('Rate'),
- 'uimode' => __('UI Mode'),
- 'flash_options' => __('Flash options'),
- 'qt_options' => __('QuickTime options'),
- 'wmp_options' => __('Windows media player options'),
- 'rmp_options' => __('Real media player options'),
- 'shockwave_options' => __('Shockwave options'),
- 'autogotourl' => __('Auto goto URL'),
- 'center' => __('Center'),
- 'imagestatus' => __('Image status'),
- 'maintainaspect' => __('Maintain aspect'),
- 'nojava' => __('No java'),
- 'prefetch' => __('Prefetch'),
- 'shuffle' => __('Shuffle'),
- 'console' => __('Console'),
- 'numloop' => __('Num loops'),
- 'controls' => __('Controls'),
- 'scriptcallbacks' => __('Script callbacks'),
- 'swstretchstyle' => __('Stretch style'),
- 'swstretchhalign' => __('Stretch H-Align'),
- 'swstretchvalign' => __('Stretch V-Align'),
- 'sound' => __('Sound'),
- 'progress' => __('Progress'),
- 'qtsrc' => __('QT Src'),
- 'qt_stream_warn' => __('Streamed rtsp resources should be added to the QT Src field under the advanced tab.'),
- 'align_top' => __('Top'),
- 'align_right' => __('Right'),
- 'align_bottom' => __('Bottom'),
- 'align_left' => __('Left'),
- 'align_center' => __('Center'),
- 'align_top_left' => __('Top left'),
- 'align_top_right' => __('Top right'),
- 'align_bottom_left' => __('Bottom left'),
- 'align_bottom_right' => __('Bottom right'),
- 'flv_options' => __('Flash video options'),
- 'flv_scalemode' => __('Scale mode'),
- 'flv_buffer' => __('Buffer'),
- 'flv_startimage' => __('Start image'),
- 'flv_starttime' => __('Start time'),
- 'flv_defaultvolume' => __('Default volume'),
- 'flv_hiddengui' => __('Hidden GUI'),
- 'flv_autostart' => __('Auto start'),
- 'flv_loop' => __('Loop'),
- 'flv_showscalemodes' => __('Show scale modes'),
- 'flv_smoothvideo' => __('Smooth video'),
- 'flv_jscallback' => __('JS Callback'),
- 'html5_video_options' => __('HTML5 Video Options'),
- 'altsource1' => __('Alternative source 1'),
- 'altsource2' => __('Alternative source 2'),
- 'preload' => __('Preload'),
- 'poster' => __('Poster'),
- 'source' => __('Source')
- );
-
- $wordpress = array(
- 'wp_adv_desc' => __('Show/Hide Kitchen Sink (Alt + Shift + Z)'),
- 'wp_more_desc' => __('Insert More Tag (Alt + Shift + T)'),
- 'wp_page_desc' => __('Insert Page break (Alt + Shift + P)'),
- 'wp_help_desc' => __('Help (Alt + Shift + H)'),
- 'wp_more_alt' => __('More...'),
- 'wp_page_alt' => __('Next page...'),
- 'add_media' => __('Add Media'),
- 'add_image' => __('Add an Image'),
- 'add_video' => __('Add Video'),
- 'add_audio' => __('Add Audio'),
- 'editgallery' => __('Edit Gallery'),
- 'delgallery' => __('Delete Gallery'),
- 'wp_fullscreen_desc' => __('Distraction Free Writing mode (Alt + Shift + W)')
- );
-
- $wpeditimage = array(
- 'edit_img' => __('Edit Image'),
- 'del_img' => __('Delete Image'),
- 'adv_settings' => __('Advanced Settings'),
- 'none' => __('None'),
- 'size' => __('Size'),
- 'thumbnail' => __('Thumbnail'),
- 'medium' => __('Medium'),
- 'full_size' => __('Full Size'),
- 'current_link' => __('Current Link'),
- 'link_to_img' => __('Link to Image'),
- 'link_help' => __('Enter a link URL or click above for presets.'),
- 'adv_img_settings' => __('Advanced Image Settings'),
- 'source' => __('Source'),
- 'width' => __('Width'),
- 'height' => __('Height'),
- 'orig_size' => __('Original Size'),
- 'css' => __('CSS Class'),
- 'adv_link_settings' => __('Advanced Link Settings'),
- 'link_rel' => __('Link Rel'),
- 'height' => __('Height'),
- 'orig_size' => __('Original Size'),
- 'css' => __('CSS Class'),
- 's60' => __('60%'),
- 's70' => __('70%'),
- 's80' => __('80%'),
- 's90' => __('90%'),
- 's100' => __('100%'),
- 's110' => __('110%'),
- 's120' => __('120%'),
- 's130' => __('130%'),
- 'img_title' => __('Title'),
- 'caption' => __('Caption'),
- 'alt' => __('Alternative Text')
- );
-
- $locale = _WP_Editors::$mce_locale;
-
- $translated = 'tinyMCE.addI18n({' . $locale . ':' . json_encode( $default ) . "});\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.advanced", ' . json_encode( $advanced ) . ");\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.advanced_dlg", ' . json_encode( $advanced_dlg ) . ");\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.media_dlg", ' . json_encode( $media_dlg ) . ");\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.wordpress", ' . json_encode( $wordpress ) . ");\n";
- $translated .= 'tinyMCE.addI18n("' . $locale . '.wpeditimage", ' . json_encode( $wpeditimage ) . ');';
-
- return $translated;
-}
-
-$lang = wp_mce_translation();
-
diff --git a/src/wp-includes/js/tinymce/mark_loaded_src.js b/src/wp-includes/js/tinymce/mark_loaded_src.js
deleted file mode 100644
index a2d08cd8b2..0000000000
--- a/src/wp-includes/js/tinymce/mark_loaded_src.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/* global tinyMCEPreInit, tinymce */
-(function(){
- if ( typeof tinyMCEPreInit === 'undefined' )
- return;
-
- var t = tinyMCEPreInit, baseurl = t.base, markDone = tinymce.ScriptLoader.markDone, lang = t.ref.language,
- theme = t.ref.theme, plugins = t.ref.plugins, suffix = t.suffix;
-
- markDone( baseurl+'/langs/'+lang+'.js' );
- markDone( baseurl+'/themes/'+theme+'/editor_template'+suffix+'.js' );
- markDone( baseurl+'/themes/'+theme+'/langs/'+lang+'.js' );
- markDone( baseurl+'/themes/'+theme+'/langs/'+lang+'_dlg.js' );
-
- tinymce.each( plugins.split(','), function(plugin){
- if ( plugin && plugin.charAt(0) != '-' ) {
- markDone( baseurl+'/plugins/'+plugin+'/editor_plugin'+suffix+'.js' );
- markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'.js' );
- markDone( baseurl+'/plugins/'+plugin+'/langs/'+lang+'_dlg.js' );
- }
- });
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/charmap/plugin.js b/src/wp-includes/js/tinymce/plugins/charmap/plugin.js
new file mode 100644
index 0000000000..7a3c5ff890
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/charmap/plugin.js
@@ -0,0 +1,362 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true */
+
+tinymce.PluginManager.add('charmap', function(editor) {
+ var charmap = [
+ ['160', 'no-break space'],
+ ['38', 'ampersand'],
+ ['34', 'quotation mark'],
+ // finance
+ ['162', 'cent sign'],
+ ['8364', 'euro sign'],
+ ['163', 'pound sign'],
+ ['165', 'yen sign'],
+ // signs
+ ['169', 'copyright sign'],
+ ['174', 'registered sign'],
+ ['8482', 'trade mark sign'],
+ ['8240', 'per mille sign'],
+ ['181', 'micro sign'],
+ ['183', 'middle dot'],
+ ['8226', 'bullet'],
+ ['8230', 'three dot leader'],
+ ['8242', 'minutes / feet'],
+ ['8243', 'seconds / inches'],
+ ['167', 'section sign'],
+ ['182', 'paragraph sign'],
+ ['223', 'sharp s / ess-zed'],
+ // quotations
+ ['8249', 'single left-pointing angle quotation mark'],
+ ['8250', 'single right-pointing angle quotation mark'],
+ ['171', 'left pointing guillemet'],
+ ['187', 'right pointing guillemet'],
+ ['8216', 'left single quotation mark'],
+ ['8217', 'right single quotation mark'],
+ ['8220', 'left double quotation mark'],
+ ['8221', 'right double quotation mark'],
+ ['8218', 'single low-9 quotation mark'],
+ ['8222', 'double low-9 quotation mark'],
+ ['60', 'less-than sign'],
+ ['62', 'greater-than sign'],
+ ['8804', 'less-than or equal to'],
+ ['8805', 'greater-than or equal to'],
+ ['8211', 'en dash'],
+ ['8212', 'em dash'],
+ ['175', 'macron'],
+ ['8254', 'overline'],
+ ['164', 'currency sign'],
+ ['166', 'broken bar'],
+ ['168', 'diaeresis'],
+ ['161', 'inverted exclamation mark'],
+ ['191', 'turned question mark'],
+ ['710', 'circumflex accent'],
+ ['732', 'small tilde'],
+ ['176', 'degree sign'],
+ ['8722', 'minus sign'],
+ ['177', 'plus-minus sign'],
+ ['247', 'division sign'],
+ ['8260', 'fraction slash'],
+ ['215', 'multiplication sign'],
+ ['185', 'superscript one'],
+ ['178', 'superscript two'],
+ ['179', 'superscript three'],
+ ['188', 'fraction one quarter'],
+ ['189', 'fraction one half'],
+ ['190', 'fraction three quarters'],
+ // math / logical
+ ['402', 'function / florin'],
+ ['8747', 'integral'],
+ ['8721', 'n-ary sumation'],
+ ['8734', 'infinity'],
+ ['8730', 'square root'],
+ ['8764', 'similar to'],
+ ['8773', 'approximately equal to'],
+ ['8776', 'almost equal to'],
+ ['8800', 'not equal to'],
+ ['8801', 'identical to'],
+ ['8712', 'element of'],
+ ['8713', 'not an element of'],
+ ['8715', 'contains as member'],
+ ['8719', 'n-ary product'],
+ ['8743', 'logical and'],
+ ['8744', 'logical or'],
+ ['172', 'not sign'],
+ ['8745', 'intersection'],
+ ['8746', 'union'],
+ ['8706', 'partial differential'],
+ ['8704', 'for all'],
+ ['8707', 'there exists'],
+ ['8709', 'diameter'],
+ ['8711', 'backward difference'],
+ ['8727', 'asterisk operator'],
+ ['8733', 'proportional to'],
+ ['8736', 'angle'],
+ // undefined
+ ['180', 'acute accent'],
+ ['184', 'cedilla'],
+ ['170', 'feminine ordinal indicator'],
+ ['186', 'masculine ordinal indicator'],
+ ['8224', 'dagger'],
+ ['8225', 'double dagger'],
+ // alphabetical special chars
+ ['192', 'A - grave'],
+ ['193', 'A - acute'],
+ ['194', 'A - circumflex'],
+ ['195', 'A - tilde'],
+ ['196', 'A - diaeresis'],
+ ['197', 'A - ring above'],
+ ['198', 'ligature AE'],
+ ['199', 'C - cedilla'],
+ ['200', 'E - grave'],
+ ['201', 'E - acute'],
+ ['202', 'E - circumflex'],
+ ['203', 'E - diaeresis'],
+ ['204', 'I - grave'],
+ ['205', 'I - acute'],
+ ['206', 'I - circumflex'],
+ ['207', 'I - diaeresis'],
+ ['208', 'ETH'],
+ ['209', 'N - tilde'],
+ ['210', 'O - grave'],
+ ['211', 'O - acute'],
+ ['212', 'O - circumflex'],
+ ['213', 'O - tilde'],
+ ['214', 'O - diaeresis'],
+ ['216', 'O - slash'],
+ ['338', 'ligature OE'],
+ ['352', 'S - caron'],
+ ['217', 'U - grave'],
+ ['218', 'U - acute'],
+ ['219', 'U - circumflex'],
+ ['220', 'U - diaeresis'],
+ ['221', 'Y - acute'],
+ ['376', 'Y - diaeresis'],
+ ['222', 'THORN'],
+ ['224', 'a - grave'],
+ ['225', 'a - acute'],
+ ['226', 'a - circumflex'],
+ ['227', 'a - tilde'],
+ ['228', 'a - diaeresis'],
+ ['229', 'a - ring above'],
+ ['230', 'ligature ae'],
+ ['231', 'c - cedilla'],
+ ['232', 'e - grave'],
+ ['233', 'e - acute'],
+ ['234', 'e - circumflex'],
+ ['235', 'e - diaeresis'],
+ ['236', 'i - grave'],
+ ['237', 'i - acute'],
+ ['238', 'i - circumflex'],
+ ['239', 'i - diaeresis'],
+ ['240', 'eth'],
+ ['241', 'n - tilde'],
+ ['242', 'o - grave'],
+ ['243', 'o - acute'],
+ ['244', 'o - circumflex'],
+ ['245', 'o - tilde'],
+ ['246', 'o - diaeresis'],
+ ['248', 'o slash'],
+ ['339', 'ligature oe'],
+ ['353', 's - caron'],
+ ['249', 'u - grave'],
+ ['250', 'u - acute'],
+ ['251', 'u - circumflex'],
+ ['252', 'u - diaeresis'],
+ ['253', 'y - acute'],
+ ['254', 'thorn'],
+ ['255', 'y - diaeresis'],
+ ['913', 'Alpha'],
+ ['914', 'Beta'],
+ ['915', 'Gamma'],
+ ['916', 'Delta'],
+ ['917', 'Epsilon'],
+ ['918', 'Zeta'],
+ ['919', 'Eta'],
+ ['920', 'Theta'],
+ ['921', 'Iota'],
+ ['922', 'Kappa'],
+ ['923', 'Lambda'],
+ ['924', 'Mu'],
+ ['925', 'Nu'],
+ ['926', 'Xi'],
+ ['927', 'Omicron'],
+ ['928', 'Pi'],
+ ['929', 'Rho'],
+ ['931', 'Sigma'],
+ ['932', 'Tau'],
+ ['933', 'Upsilon'],
+ ['934', 'Phi'],
+ ['935', 'Chi'],
+ ['936', 'Psi'],
+ ['937', 'Omega'],
+ ['945', 'alpha'],
+ ['946', 'beta'],
+ ['947', 'gamma'],
+ ['948', 'delta'],
+ ['949', 'epsilon'],
+ ['950', 'zeta'],
+ ['951', 'eta'],
+ ['952', 'theta'],
+ ['953', 'iota'],
+ ['954', 'kappa'],
+ ['955', 'lambda'],
+ ['956', 'mu'],
+ ['957', 'nu'],
+ ['958', 'xi'],
+ ['959', 'omicron'],
+ ['960', 'pi'],
+ ['961', 'rho'],
+ ['962', 'final sigma'],
+ ['963', 'sigma'],
+ ['964', 'tau'],
+ ['965', 'upsilon'],
+ ['966', 'phi'],
+ ['967', 'chi'],
+ ['968', 'psi'],
+ ['969', 'omega'],
+ // symbols
+ ['8501', 'alef symbol'],
+ ['982', 'pi symbol'],
+ ['8476', 'real part symbol'],
+ ['978', 'upsilon - hook symbol'],
+ ['8472', 'Weierstrass p'],
+ ['8465', 'imaginary part'],
+ // arrows
+ ['8592', 'leftwards arrow'],
+ ['8593', 'upwards arrow'],
+ ['8594', 'rightwards arrow'],
+ ['8595', 'downwards arrow'],
+ ['8596', 'left right arrow'],
+ ['8629', 'carriage return'],
+ ['8656', 'leftwards double arrow'],
+ ['8657', 'upwards double arrow'],
+ ['8658', 'rightwards double arrow'],
+ ['8659', 'downwards double arrow'],
+ ['8660', 'left right double arrow'],
+ ['8756', 'therefore'],
+ ['8834', 'subset of'],
+ ['8835', 'superset of'],
+ ['8836', 'not a subset of'],
+ ['8838', 'subset of or equal to'],
+ ['8839', 'superset of or equal to'],
+ ['8853', 'circled plus'],
+ ['8855', 'circled times'],
+ ['8869', 'perpendicular'],
+ ['8901', 'dot operator'],
+ ['8968', 'left ceiling'],
+ ['8969', 'right ceiling'],
+ ['8970', 'left floor'],
+ ['8971', 'right floor'],
+ ['9001', 'left-pointing angle bracket'],
+ ['9002', 'right-pointing angle bracket'],
+ ['9674', 'lozenge'],
+ ['9824', 'black spade suit'],
+ ['9827', 'black club suit'],
+ ['9829', 'black heart suit'],
+ ['9830', 'black diamond suit'],
+ ['8194', 'en space'],
+ ['8195', 'em space'],
+ ['8201', 'thin space'],
+ ['8204', 'zero width non-joiner'],
+ ['8205', 'zero width joiner'],
+ ['8206', 'left-to-right mark'],
+ ['8207', 'right-to-left mark'],
+ ['173', 'soft hyphen']
+ ];
+
+ function showDialog() {
+ var gridHtml, x, y, win;
+
+ function getParentTd(elm) {
+ while (elm) {
+ if (elm.nodeName == 'TD') {
+ return elm;
+ }
+
+ elm = elm.parentNode;
+ }
+ }
+
+ gridHtml = '';
+
+ var width = 25;
+ for (y = 0; y < 10; y++) {
+ gridHtml += '';
+
+ for (x = 0; x < width; x++) {
+ var chr = charmap[y * width + x];
+ var id = 'g' + (y * width + x);
+
+ gridHtml += '' +
+ (chr ? String.fromCharCode(parseInt(chr[0], 10)) : ' ') + ' ';
+ }
+
+ gridHtml += ' ';
+ }
+
+ gridHtml += '
';
+
+ var charMapPanel = {
+ type: 'container',
+ html: gridHtml,
+ onclick: function(e) {
+ var target = e.target;
+ if (target.nodeName == 'DIV') {
+ editor.execCommand('mceInsertContent', false, target.firstChild.nodeValue);
+ }
+ },
+ onmouseover: function(e) {
+ var td = getParentTd(e.target);
+
+ if (td) {
+ win.find('#preview').text(td.firstChild.firstChild.data);
+ }
+ }
+ };
+
+ win = editor.windowManager.open({
+ title: "Special character",
+ spacing: 10,
+ padding: 10,
+ items: [
+ charMapPanel,
+ {
+ type: 'label',
+ name: 'preview',
+ text: ' ',
+ style: 'font-size: 40px; text-align: center',
+ border: 1,
+ minWidth: 100,
+ minHeight: 80
+ }
+ ],
+ buttons: [
+ {text: "Close", onclick: function() {
+ win.close();
+ }}
+ ]
+ });
+ }
+
+ editor.addButton('charmap', {
+ icon: 'charmap',
+ tooltip: 'Special character',
+ onclick: showDialog
+ });
+
+ editor.addMenuItem('charmap', {
+ icon: 'charmap',
+ text: 'Special character',
+ onclick: showDialog,
+ context: 'insert'
+ });
+});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/charmap/plugin.min.js b/src/wp-includes/js/tinymce/plugins/charmap/plugin.min.js
new file mode 100644
index 0000000000..dff18e6e55
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/charmap/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("charmap",function(e){function t(){function t(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var i,a,r,o;i='';var s=25;for(r=0;10>r;r++){for(i+="",a=0;s>a;a++){var l=n[r*s+a],c="g"+(r*s+a);i+=''+(l?String.fromCharCode(parseInt(l[0],10)):" ")+" "}i+=" "}i+="
";var u={type:"container",html:i,onclick:function(t){var n=t.target;"DIV"==n.nodeName&&e.execCommand("mceInsertContent",!1,n.firstChild.nodeValue)},onmouseover:function(e){var n=t(e.target);n&&o.find("#preview").text(n.firstChild.firstChild.data)}};o=e.windowManager.open({title:"Special character",spacing:10,padding:10,items:[u,{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:100,minHeight:80}],buttons:[{text:"Close",onclick:function(){o.close()}}]})}var n=[["160","no-break space"],["38","ampersand"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"],["173","soft hyphen"]];e.addButton("charmap",{icon:"charmap",tooltip:"Special character",onclick:t}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:t,context:"insert"})});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css b/src/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css
similarity index 88%
rename from src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css
rename to src/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css
index b56d9e67ff..0b79056e7c 100644
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css
+++ b/src/wp-includes/js/tinymce/plugins/compat3x/css/dialog.css
@@ -1,213 +1,212 @@
-@import url('//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin-ext,latin');
-
-/* Generic */
-body {
-font-family: "Open Sans", sans-serif;
-font-size:13px;
-background:#fcfcfc;
-padding:0;
-margin:8px 8px 0 8px;
-}
-
-textarea {resize:none;outline:none;}
-
-a:link, a:hover {
- color: #2B6FB6;
-}
-
-a:visited {
- color: #3C2BB6;
-}
-
-.nowrap {white-space: nowrap}
-
-/* Forms */
-form {margin: 0;}
-fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;}
-legend {color:#2B6FB6; font-weight:bold;}
-label.msg {display:none;}
-label.invalid {color:#EE0000; display:inline;}
-input.invalid {border:1px solid #EE0000;}
-input {background:#FFF; border:1px solid #dfdfdf;}
-input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-input, select, textarea {border:1px solid #dfdfdf;}
-input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
-input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
-.input_noborder {border:0;}
-
-/* Buttons */
-#insert,
-#cancel,
-#apply,
-.mceActionPanel .button,
-input.mceButton,
-.updateButton {
- display: inline-block;
- text-decoration: none;
- border: 1px solid #adadad;
- margin: 0;
- padding: 0 10px 1px;
- font-size: 13px;
- height: 24px;
- line-height: 22px;
- color: #333;
- cursor: pointer;
- -webkit-border-radius: 3px;
- -webkit-appearance: none;
- border-radius: 3px;
- white-space: nowrap;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- background: #fafafa;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#e9e9e9));
- background-image: -webkit-linear-gradient(top, #fafafa, #e9e9e9);
- background-image: -moz-linear-gradient(top, #fafafa, #e9e9e9);
- background-image: -o-linear-gradient(top, #fafafa, #e9e9e9);
- background-image: linear-gradient(to bottom, #fafafa, #e9e9e9);
-
- text-shadow: 0 1px 0 #fff;
- -webkit-box-shadow: inset 0 1px 0 #fff;
- -moz-box-shadow: inset 0 1px 0 #fff;
- box-shadow: inset 0 1px 0 #fff;
-}
-
-#insert {
- background: #2ea2cc;
- background: -webkit-gradient(linear, left top, left bottom, from(#2ea2cc), to(#1e8cbe));
- background: -webkit-linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
- background: linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2ea2cc', endColorstr='#1e8cbe',GradientType=0 );
- border-color: #0074a2;
- -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
- box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
- color: #fff;
- text-decoration: none;
- text-shadow: 0 1px 0 rgba(0,86,132,0.7);
-}
-
-#cancel:hover,
-input.mceButton:hover,
-.updateButton:hover,
-#cancel:focus,
-input.mceButton:focus,
-.updateButton:focus {
- background: #f3f3f3;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
- background-image: -webkit-linear-gradient(top, #fff, #f3f3f3);
- background-image: -moz-linear-gradient(top, #fff, #f3f3f3);
- background-image: -ms-linear-gradient(top, #fff, #f3f3f3);
- background-image: -o-linear-gradient(top, #fff, #f3f3f3);
- background-image: linear-gradient(to bottom, #fff, #f3f3f3);
- border-color: #999;
- color: #222;
-}
-
-#insert:hover,
-#insert:focus {
- background: #1e8cbe;
- background: -webkit-gradient(linear, left top, left bottom, from(#1e8cbe), to(#0074a2));
- background: -webkit-linear-gradient(top, #1e8cbe 0%,#0074a2 100%);
- background: linear-gradient(top, #1e8cbe 0%,#0074a2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e8cbe', endColorstr='#0074a2',GradientType=0 );
- border-color: #0074a2;
- -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
- box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
- color: #fff;
-}
-
-.mceActionPanel #insert {
- float: right;
-}
-
-/* Browse */
-a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
-.mceOldBoxModel a.browse span {width:22px; height:20px;}
-a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
-a.browse span.disabled {border:1px solid white; -moz-opacity:0.3; opacity:0.3; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);}
-a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
-a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
-.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
-a.pickcolor:hover span {background-color:#B2BBD0;}
-a.pickcolor, a.browse {text-decoration:none}
-div.iframecontainer {background: #fff;}
-
-/* Charmap */
-table.charmap {border:1px solid #AAA; text-align:center}
-td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
-#charmap a {display:block; color:#000; text-decoration:none; border:0}
-#charmap a:hover {background:#CCC;color:#2B6FB6}
-#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
-#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
-#charmap #charmapView {background-color:#fff;}
-
-/* Source */
-.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
-.mceActionPanel {margin-top:5px;}
-
-/* Tabs classes */
-.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
-.tabs ul {margin:0; padding:0; list-style:none;}
-.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
-.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
-.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
-.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
-.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
-.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
-
-.wp-core-ui #tabs {
- padding-bottom: 5px;
- background-color: transparent;
-}
-
-.wp-core-ui #tabs a {
- padding: 6px 10px;
- margin: 0 2px;
-}
-
-/* Panels */
-.panel_wrapper div.panel {display:none;}
-.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
-.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
-
-/* Columns */
-.column {float:left;}
-.properties {width:100%;}
-.properties .column1 {}
-.properties .column2 {text-align:left;}
-
-/* Titles */
-h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
-h3 {font-size:14px;}
-.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
-
-/* Dialog specific */
-#link .panel_wrapper, #link div.current {height:125px;}
-#image .panel_wrapper, #image div.current {height:200px;}
-#plugintable thead {font-weight:bold; background:#DDD;}
-#plugintable, #about #plugintable td {border:1px solid #919B9C;}
-#plugintable {width:96%; margin-top:10px;}
-#pluginscontainer {height:290px; overflow:auto;}
-#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
-#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
-#colorpicker #preview_wrapper {text-align:center; padding-top:4px; white-space: nowrap; float: right;}
-#colorpicker #insert, #colorpicker #cancel {width: 90px}
-#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
-#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
-#colorpicker #light div {overflow:hidden;}
-#colorpicker .panel_wrapper div.current {height:175px;}
-#colorpicker #namedcolors {width:150px;}
-#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
-#colorpicker #colornamecontainer {margin-top:5px;}
-#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
-
-
-/* Localization */
-
-body[dir="rtl"],
-body[dir="rtl"] fieldset,
-body[dir="rtl"] input, body[dir="rtl"] select, body[dir="rtl"] textarea,
-body[dir="rtl"] #charmap #codeN,
-body[dir="rtl"] .tabs a {
- font-family: Tahoma, sans-serif;
-}
\ No newline at end of file
+@import url('//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin-ext,latin');
+
+/* Generic */
+body {
+font-family: "Open Sans", sans-serif;
+font-size:13px;
+background:#fcfcfc;
+padding:0;
+margin:8px 8px 0 8px;
+}
+
+textarea {resize:none;outline:none;}
+
+a:link, a:hover {
+ color: #2B6FB6;
+}
+
+a:visited {
+ color: #3C2BB6;
+}
+
+.nowrap {white-space: nowrap}
+
+/* Forms */
+form {margin: 0;}
+fieldset {margin:0; padding:4px; border:1px solid #dfdfdf; font-family:Verdana, Arial; font-size:10px;}
+legend {color:#2B6FB6; font-weight:bold;}
+label.msg {display:none;}
+label.invalid {color:#EE0000; display:inline;}
+input.invalid {border:1px solid #EE0000;}
+input {background:#FFF; border:1px solid #dfdfdf;}
+input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
+input, select, textarea {border:1px solid #dfdfdf;}
+input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
+input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
+.input_noborder {border:0;}
+
+/* Buttons */
+#insert,
+#cancel,
+#apply,
+.mceActionPanel .button,
+input.mceButton,
+.updateButton {
+ display: inline-block;
+ text-decoration: none;
+ border: 1px solid #adadad;
+ margin: 0;
+ padding: 0 10px 1px;
+ font-size: 13px;
+ height: 24px;
+ line-height: 22px;
+ color: #333;
+ cursor: pointer;
+ -webkit-border-radius: 3px;
+ -webkit-appearance: none;
+ border-radius: 3px;
+ white-space: nowrap;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ background: #fafafa;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fafafa), to(#e9e9e9));
+ background-image: -webkit-linear-gradient(top, #fafafa, #e9e9e9);
+ background-image: -moz-linear-gradient(top, #fafafa, #e9e9e9);
+ background-image: -o-linear-gradient(top, #fafafa, #e9e9e9);
+ background-image: linear-gradient(to bottom, #fafafa, #e9e9e9);
+
+ text-shadow: 0 1px 0 #fff;
+ -webkit-box-shadow: inset 0 1px 0 #fff;
+ -moz-box-shadow: inset 0 1px 0 #fff;
+ box-shadow: inset 0 1px 0 #fff;
+}
+
+#insert {
+ background: #2ea2cc;
+ background: -webkit-gradient(linear, left top, left bottom, from(#2ea2cc), to(#1e8cbe));
+ background: -webkit-linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
+ background: linear-gradient(top, #2ea2cc 0%,#1e8cbe 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2ea2cc', endColorstr='#1e8cbe',GradientType=0 );
+ border-color: #0074a2;
+ -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
+ box-shadow: inset 0 1px 0 rgba(120,200,230,0.5);
+ color: #fff;
+ text-decoration: none;
+ text-shadow: 0 1px 0 rgba(0,86,132,0.7);
+}
+
+#cancel:hover,
+input.mceButton:hover,
+.updateButton:hover,
+#cancel:focus,
+input.mceButton:focus,
+.updateButton:focus {
+ background: #f3f3f3;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f3f3f3));
+ background-image: -webkit-linear-gradient(top, #fff, #f3f3f3);
+ background-image: -moz-linear-gradient(top, #fff, #f3f3f3);
+ background-image: -ms-linear-gradient(top, #fff, #f3f3f3);
+ background-image: -o-linear-gradient(top, #fff, #f3f3f3);
+ background-image: linear-gradient(to bottom, #fff, #f3f3f3);
+ border-color: #999;
+ color: #222;
+}
+
+#insert:hover,
+#insert:focus {
+ background: #1e8cbe;
+ background: -webkit-gradient(linear, left top, left bottom, from(#1e8cbe), to(#0074a2));
+ background: -webkit-linear-gradient(top, #1e8cbe 0%,#0074a2 100%);
+ background: linear-gradient(top, #1e8cbe 0%,#0074a2 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e8cbe', endColorstr='#0074a2',GradientType=0 );
+ border-color: #0074a2;
+ -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
+ box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
+ color: #fff;
+}
+
+.mceActionPanel #insert {
+ float: right;
+}
+
+/* Browse */
+a.pickcolor, a.browse {text-decoration:none}
+a.browse span {display:block; width:20px; height:18px; border:1px solid #FFF; margin-left:1px;}
+.mceOldBoxModel a.browse span {width:22px; height:20px;}
+a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
+a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30);}
+a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
+a.pickcolor span {display:block; width:20px; height:16px; margin-left:2px;}
+.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
+a.pickcolor:hover span {background-color:#B2BBD0;}
+div.iframecontainer {background: #fff;}
+
+/* Charmap */
+table.charmap {border:1px solid #AAA; text-align:center}
+td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
+#charmap a {display:block; color:#000; text-decoration:none; border:0}
+#charmap a:hover {background:#CCC;color:#2B6FB6}
+#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
+#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
+#charmap #charmapView {background-color:#fff;}
+
+/* Source */
+.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
+.mceActionPanel {margin-top:5px;}
+
+/* Tabs classes */
+.tabs {width:100%; height:19px; line-height:normal; border-bottom: 1px solid #aaa;}
+.tabs ul {margin:0; padding:0; list-style:none;}
+.tabs li {float:left; border: 1px solid #aaa; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
+.tabs li.current {border-bottom: 1px solid #fff; margin-right:2px;}
+.tabs span {float:left; display:block; padding:0px 10px 0 0;}
+.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
+.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
+
+.wp-core-ui #tabs {
+ padding-bottom: 5px;
+ background-color: transparent;
+}
+
+.wp-core-ui #tabs a {
+ padding: 6px 10px;
+ margin: 0 2px;
+}
+
+/* Panels */
+.panel_wrapper div.panel {display:none;}
+.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
+.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
+
+/* Columns */
+.column {float:left;}
+.properties {width:100%;}
+.properties .column1 {}
+.properties .column2 {text-align:left;}
+
+/* Titles */
+h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
+h3 {font-size:14px;}
+.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
+
+/* Dialog specific */
+#link .panel_wrapper, #link div.current {height:125px;}
+#image .panel_wrapper, #image div.current {height:200px;}
+#plugintable thead {font-weight:bold; background:#DDD;}
+#plugintable, #about #plugintable td {border:1px solid #919B9C;}
+#plugintable {width:96%; margin-top:10px;}
+#pluginscontainer {height:290px; overflow:auto;}
+#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
+#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
+#colorpicker #preview_wrapper {text-align:center; padding-top:4px; white-space: nowrap; float: right;}
+#colorpicker #insert, #colorpicker #cancel {width: 90px}
+#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
+#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
+#colorpicker #light div {overflow:hidden;}
+#colorpicker .panel_wrapper div.current {height:175px;}
+#colorpicker #namedcolors {width:150px;}
+#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
+#colorpicker #colornamecontainer {margin-top:5px;}
+#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
+
+
+/* Localization */
+
+body[dir="rtl"],
+body[dir="rtl"] fieldset,
+body[dir="rtl"] input, body[dir="rtl"] select, body[dir="rtl"] textarea,
+body[dir="rtl"] #charmap #codeN,
+body[dir="rtl"] .tabs a {
+ font-family: Tahoma, sans-serif;
+}
diff --git a/src/wp-includes/js/tinymce/plugins/compat3x/plugin.js b/src/wp-includes/js/tinymce/plugins/compat3x/plugin.js
new file mode 100644
index 0000000000..76f438627f
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/compat3x/plugin.js
@@ -0,0 +1,235 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true, console:true */
+
+/**
+ * This plugin adds missing events form the 4.x API back. Not every event is
+ * properly supported but most things should work.
+ *
+ * Unsupported things:
+ * - No editor.onEvent
+ * - Can't cancel execCommands with beforeExecCommand
+ */
+(function(tinymce) {
+ var reported;
+
+ function log(apiCall) {
+ if (!reported && window && window.console) {
+ reported = true;
+ console.log("Deprecated TinyMCE API call: " + apiCall);
+ }
+ }
+
+ function Dispatcher(target, newEventName, argsMap, defaultScope) {
+ target = target || this;
+
+ this.add = function(callback, scope) {
+ log('.on' + newEventName + ".add(..)");
+
+ // Convert callback({arg1:x, arg2:x}) -> callback(arg1, arg2)
+ function patchedEventCallback(e) {
+ var callbackArgs = [];
+
+ if (typeof argsMap == "string") {
+ argsMap = argsMap.split(" ");
+ }
+
+ if (argsMap && typeof argsMap != "function") {
+ for (var i = 0; i < argsMap.length; i++) {
+ callbackArgs.push(e[argsMap[i]]);
+ }
+ }
+
+ if (typeof argsMap == "function") {
+ callbackArgs = argsMap(newEventName, e, target);
+ if (!callbackArgs) {
+ return;
+ }
+ }
+
+ if (!argsMap) {
+ callbackArgs = [e];
+ }
+
+ callbackArgs.unshift(defaultScope || target);
+
+ if (callback.apply(scope || defaultScope || target, callbackArgs) === false) {
+ e.stopImmediatePropagation();
+ }
+ }
+
+ target.on(newEventName, patchedEventCallback);
+
+ return patchedEventCallback;
+ };
+
+ // Not supported to just use add
+ this.addToTop = this.add;
+
+ this.remove = function(callback) {
+ return target.off(newEventName, callback);
+ };
+
+ this.dispatch = function() {
+ target.fire(newEventName);
+
+ return true;
+ };
+ }
+
+ tinymce.onBeforeUnload = new Dispatcher(tinymce, "BeforeUnload");
+ tinymce.onAddEditor = new Dispatcher(tinymce, "AddEditor", "editor");
+ tinymce.onRemoveEditor = new Dispatcher(tinymce, "RemoveEditor", "editor");
+
+ function patchEditor(editor) {
+ function patchEditorEvents(oldEventNames, argsMap) {
+ tinymce.each(oldEventNames.split(" "), function(oldName) {
+ editor["on" + oldName] = new Dispatcher(editor, oldName, argsMap);
+ });
+ }
+
+ function convertUndoEventArgs(type, event, target) {
+ return [
+ event.level,
+ target
+ ];
+ }
+
+ function filterSelectionEvents(needsSelection) {
+ return function(type, e) {
+ if ((!e.selection && !needsSelection) || e.selection == needsSelection) {
+ return [e];
+ }
+ };
+ }
+
+ if (editor.controlManager) {
+ return;
+ }
+
+ editor.controlManager = {
+ buttons: {},
+
+ setDisabled: function(name, state) {
+ log("controlManager.setDisabled(..)");
+
+ if (this.buttons[name]) {
+ this.buttons[name].disabled(state);
+ }
+ },
+
+ setActive: function(name, state) {
+ log("controlManager.setActive(..)");
+
+ if (this.buttons[name]) {
+ this.buttons[name].active(state);
+ }
+ },
+ };
+
+ patchEditorEvents("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate", "editor");
+ patchEditorEvents("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset");
+ patchEditorEvents("BeforeExecCommand ExecCommand", "command ui value args"); // args.terminate not supported
+ patchEditorEvents("PreProcess PostProcess LoadContent SaveContent Change");
+ patchEditorEvents("BeforeSetContent BeforeGetContent SetContent GetContent", filterSelectionEvents(false));
+ patchEditorEvents("SetProgressState", "state time");
+ patchEditorEvents("VisualAid", "element hasVisual");
+ patchEditorEvents("Undo Redo", convertUndoEventArgs);
+
+ patchEditorEvents("NodeChange", function(type, e) {
+ return [
+ editor.controlManager,
+ e.element,
+ editor.selection.isCollapsed(),
+ e
+ ];
+ });
+
+ var originalAddButton = editor.addButton;
+ editor.addButton = function(name, settings) {
+ var originalOnPostRender;
+
+ function patchedPostRender() {
+ editor.controlManager.buttons[name] = this;
+
+ if (originalOnPostRender) {
+ return originalOnPostRender.call(this);
+ }
+ }
+
+ for (var key in settings) {
+ if (key.toLowerCase() === "onpostrender") {
+ originalOnPostRender = settings[key];
+ settings.onPostRender = patchedPostRender;
+ }
+ }
+
+ if (!originalOnPostRender) {
+ settings.onPostRender = patchedPostRender;
+ }
+
+ settings.title = tinymce.i18n.translate((editor.settings.language || "en") + "." + settings.title);
+
+ return originalAddButton.call(this, name, settings);
+ };
+
+ editor.on('init', function() {
+ var undoManager = editor.undoManager, selection = editor.selection;
+
+ undoManager.onUndo = new Dispatcher(editor, "Undo", convertUndoEventArgs, null, undoManager);
+ undoManager.onRedo = new Dispatcher(editor, "Redo", convertUndoEventArgs, null, undoManager);
+ undoManager.onBeforeAdd = new Dispatcher(editor, "BeforeAddUndo", null, undoManager);
+ undoManager.onAdd = new Dispatcher(editor, "AddUndo", null, undoManager);
+
+ selection.onBeforeGetContent = new Dispatcher(editor, "BeforeGetContent", filterSelectionEvents(true), selection);
+ selection.onGetContent = new Dispatcher(editor, "GetContent", filterSelectionEvents(true), selection);
+ selection.onBeforeSetContent = new Dispatcher(editor, "BeforeSetContent", filterSelectionEvents(true), selection);
+ selection.onSetContent = new Dispatcher(editor, "SetContent", filterSelectionEvents(true), selection);
+
+ editor.windowManager.createInstance = function(className, a, b, c, d, e) {
+ log("windowManager.createInstance(..)");
+
+ var constr = tinymce.resolve(className);
+ return new constr(a, b, c, d, e);
+ };
+ });
+ }
+
+ tinymce.on('SetupEditor', patchEditor);
+ tinymce.PluginManager.add("compat3x", patchEditor);
+
+ tinymce.addI18n = function(prefix, o) {
+ var I18n = tinymce.util.I18n, each = tinymce.each;
+
+ if (typeof(prefix) == "string" && prefix.indexOf('.') === -1) {
+ I18n.add(prefix, o);
+ return;
+ }
+
+ if (!tinymce.is(prefix, 'string')) {
+ each(prefix, function(o, lc) {
+ each(o, function(o, g) {
+ each(o, function(o, k) {
+ if (g === 'common') {
+ I18n.data[lc + '.' + k] = o;
+ } else {
+ I18n.data[lc + '.' + g + '.' + k] = o;
+ }
+ });
+ });
+ });
+ } else {
+ each(o, function(o, k) {
+ I18n.data[prefix + '.' + k] = o;
+ });
+ }
+ };
+})(tinymce);
diff --git a/src/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js b/src/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js
new file mode 100644
index 0000000000..d01f2d77d0
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/compat3x/plugin.min.js
@@ -0,0 +1 @@
+!function(n){function e(n){!i&&window&&window.console&&(i=!0,console.log("Deprecated TinyMCE API call: "+n))}function t(n,t,o,i){n=n||this,this.add=function(r,a){function d(e){var d=[];if("string"==typeof o&&(o=o.split(" ")),o&&"function"!=typeof o)for(var s=0;s.on"+t+".add(..)"),n.on(t,d),d},this.addToTop=this.add,this.remove=function(e){return n.off(t,e)},this.dispatch=function(){return n.fire(t),!0}}function o(o){function i(e,i){n.each(e.split(" "),function(n){o["on"+n]=new t(o,n,i)})}function r(n,e,t){return[e.level,t]}function a(n){return function(e,t){return!t.selection&&!n||t.selection==n?[t]:void 0}}if(!o.controlManager){o.controlManager={buttons:{},setDisabled:function(n,t){e("controlManager.setDisabled(..)"),this.buttons[n]&&this.buttons[n].disabled(t)},setActive:function(n,t){e("controlManager.setActive(..)"),this.buttons[n]&&this.buttons[n].active(t)}},i("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate","editor"),i("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset"),i("BeforeExecCommand ExecCommand","command ui value args"),i("PreProcess PostProcess LoadContent SaveContent Change"),i("BeforeSetContent BeforeGetContent SetContent GetContent",a(!1)),i("SetProgressState","state time"),i("VisualAid","element hasVisual"),i("Undo Redo",r),i("NodeChange",function(n,e){return[o.controlManager,e.element,o.selection.isCollapsed(),e]});var d=o.addButton;o.addButton=function(e,t){function i(){return o.controlManager.buttons[e]=this,r?r.call(this):void 0}var r;for(var a in t)"onpostrender"===a.toLowerCase()&&(r=t[a],t.onPostRender=i);return r||(t.onPostRender=i),t.title=n.i18n.translate((o.settings.language||"en")+"."+t.title),d.call(this,e,t)},o.on("init",function(){var i=o.undoManager,d=o.selection;i.onUndo=new t(o,"Undo",r,null,i),i.onRedo=new t(o,"Redo",r,null,i),i.onBeforeAdd=new t(o,"BeforeAddUndo",null,i),i.onAdd=new t(o,"AddUndo",null,i),d.onBeforeGetContent=new t(o,"BeforeGetContent",a(!0),d),d.onGetContent=new t(o,"GetContent",a(!0),d),d.onBeforeSetContent=new t(o,"BeforeSetContent",a(!0),d),d.onSetContent=new t(o,"SetContent",a(!0),d),o.windowManager.createInstance=function(t,o,i,r,a,d){e("windowManager.createInstance(..)");var s=n.resolve(t);return new s(o,i,r,a,d)}})}}var i;n.onBeforeUnload=new t(n,"BeforeUnload"),n.onAddEditor=new t(n,"AddEditor","editor"),n.onRemoveEditor=new t(n,"RemoveEditor","editor"),n.on("SetupEditor",o),n.PluginManager.add("compat3x",o),n.addI18n=function(e,t){var o=n.util.I18n,i=n.each;return"string"==typeof e&&-1===e.indexOf(".")?(o.add(e,t),void 0):(n.is(e,"string")?i(t,function(n,t){o.data[e+"."+t]=n}):i(e,function(n,e){i(n,function(n,t){i(n,function(n,i){"common"===t?o.data[e+"."+i]=n:o.data[e+"."+t+"."+i]=n})})}),void 0)}}(tinymce);
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js b/src/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js
deleted file mode 100644
index 90847e78e3..0000000000
--- a/src/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(b,c){var d=this;d.editor=b;function a(e){var h=b.dom,g,f=b.selection.getSelectedBlocks();if(f.length){g=h.getAttrib(f[0],"dir");tinymce.each(f,function(i){if(!h.getParent(i.parentNode,"*[dir='"+e+"']",h.getRoot())){if(g!=e){h.setAttrib(i,"dir",e)}else{h.setAttrib(i,"dir",null)}}});b.nodeChanged()}}b.addCommand("mceDirectionLTR",function(){a("ltr")});b.addCommand("mceDirectionRTL",function(){a("rtl")});b.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});b.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});b.onNodeChange.add(d._nodeChange,d)},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+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js
deleted file mode 100644
index c90732bbd6..0000000000
--- a/src/wp-includes/js/tinymce/plugins/directionality/editor_plugin_src.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * 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;
-
- function setDir(dir) {
- var dom = ed.dom, curDir, blocks = ed.selection.getSelectedBlocks();
-
- if (blocks.length) {
- curDir = dom.getAttrib(blocks[0], "dir");
-
- tinymce.each(blocks, function(block) {
- // Add dir to block if the parent block doesn't already have that dir
- if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) {
- if (curDir != dir) {
- dom.setAttrib(block, "dir", dir);
- } else {
- dom.setAttrib(block, "dir", null);
- }
- }
- });
-
- ed.nodeChanged();
- }
- }
-
- ed.addCommand('mceDirectionLTR', function() {
- setDir("ltr");
- });
-
- ed.addCommand('mceDirectionRTL', function() {
- setDir("rtl");
- });
-
- 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 + "." + 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 == "ltr");
- cm.setDisabled('ltr', 0);
- cm.setActive('rtl', dir == "rtl");
- cm.setDisabled('rtl', 0);
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
-})();
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/directionality/plugin.js b/src/wp-includes/js/tinymce/plugins/directionality/plugin.js
new file mode 100644
index 0000000000..3fd0dabc49
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/directionality/plugin.js
@@ -0,0 +1,64 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true */
+
+tinymce.PluginManager.add('directionality', function(editor) {
+ function setDir(dir) {
+ var dom = editor.dom, curDir, blocks = editor.selection.getSelectedBlocks();
+
+ if (blocks.length) {
+ curDir = dom.getAttrib(blocks[0], "dir");
+
+ tinymce.each(blocks, function(block) {
+ // Add dir to block if the parent block doesn't already have that dir
+ if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) {
+ if (curDir != dir) {
+ dom.setAttrib(block, "dir", dir);
+ } else {
+ dom.setAttrib(block, "dir", null);
+ }
+ }
+ });
+
+ editor.nodeChanged();
+ }
+ }
+
+ function generateSelector(dir) {
+ var selector = [];
+
+ tinymce.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function(name) {
+ selector.push(name + '[dir=' + dir + ']');
+ });
+
+ return selector.join(',');
+ }
+
+ editor.addCommand('mceDirectionLTR', function() {
+ setDir("ltr");
+ });
+
+ editor.addCommand('mceDirectionRTL', function() {
+ setDir("rtl");
+ });
+
+ editor.addButton('ltr', {
+ title: 'Left to right',
+ cmd: 'mceDirectionLTR',
+ stateSelector: generateSelector('ltr')
+ });
+
+ editor.addButton('rtl', {
+ title: 'Right to left',
+ cmd: 'mceDirectionRTL',
+ stateSelector: generateSelector('rtl')
+ });
+});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/directionality/plugin.min.js b/src/wp-includes/js/tinymce/plugins/directionality/plugin.min.js
new file mode 100644
index 0000000000..60c7f9d537
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/directionality/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("directionality",function(e){function t(t){var n,i=e.dom,a=e.selection.getSelectedBlocks();a.length&&(n=i.getAttrib(a[0],"dir"),tinymce.each(a,function(e){i.getParent(e.parentNode,"*[dir='"+t+"']",i.getRoot())||(n!=t?i.setAttrib(e,"dir",t):i.setAttrib(e,"dir",null))}),e.nodeChanged())}function n(e){var t=[];return tinymce.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(n){t.push(n+"[dir="+e+"]")}),t.join(",")}e.addCommand("mceDirectionLTR",function(){t("ltr")}),e.addCommand("mceDirectionRTL",function(){t("rtl")}),e.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),e.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js b/src/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js
deleted file mode 100644
index 1aa8cc443a..0000000000
--- a/src/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var b=tinymce.DOM;var a=function(d,f,e){var c=function(g){var i=d.controlManager.get(g);var h=f.controlManager.get(g);if(i&&h){h.displayColor(i.value)}};c("forecolor");c("backcolor");f.setContent(d.getContent({format:"raw"}),{format:"raw"});f.selection.moveToBookmark(e);if(d.plugins.spellchecker&&f.plugins.spellchecker){f.plugins.spellchecker.setLanguage(d.plugins.spellchecker.selectedLang)}};tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(i,c){var l=this,m={},k=b.doc.documentElement,d,o,h,g,f,e,j;i.addCommand("mceFullScreen",function(){var q,r;if(i.getParam("fullscreen_is_enabled")){if(i.getParam("fullscreen_new_window")){closeFullscreen()}else{b.win.setTimeout(function(){var t=i;var s=tinyMCE.get(t.getParam("fullscreen_editor_id"));s.plugins.fullscreen.saveState(t);tinyMCE.remove(t)},10)}return}if(i.getParam("fullscreen_new_window")){l.fullscreenSettings={bookmark:i.selection.getBookmark()};q=b.win.open(c+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{q.resizeTo(screen.availWidth,screen.availHeight)}catch(p){}}else{o=b.getStyle(b.doc.body,"overflow",1)||"auto";h=b.getStyle(k,"overflow",1);d=b.getViewPort();g=d.x;f=d.y;if(tinymce.isOpera&&o=="visible"){o="auto"}if(tinymce.isIE&&o=="scroll"){o="auto"}if(tinymce.isIE&&(h=="visible"||h=="scroll")){h="auto"}if(o=="0px"){o=""}b.setStyle(b.doc.body,"overflow","hidden");k.style.overflow="hidden";d=b.getViewPort();b.win.scrollTo(0,0);if(tinymce.isIE){d.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){e="absolute;top:"+d.y}else{e="fixed;top:0"}n=b.add(b.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+e+";left:0;width:"+d.w+"px;height:"+d.h+"px;z-index:200000;"});b.add(n,"div",{id:"mce_fullscreen"});tinymce.each(i.settings,function(s,t){m[t]=s});m.id="mce_fullscreen";m.width=n.clientWidth;m.height=n.clientHeight-15;m.fullscreen_is_enabled=true;m.fullscreen_editor_id=i.id;m.theme_advanced_resizing=false;m.save_onsavecallback=function(){i.setContent(tinyMCE.get(m.id).getContent());i.execCommand("mceSave")};tinymce.each(i.getParam("fullscreen_settings"),function(t,s){m[s]=t});l.fullscreenSettings={bookmark:i.selection.getBookmark(),fullscreen_overflow:o,fullscreen_html_overflow:h,fullscreen_scrollx:g,fullscreen_scrolly:f};if(m.theme_advanced_toolbar_location==="external"){m.theme_advanced_toolbar_location="top"}tinyMCE.oldSettings=tinyMCE.settings;l.fullscreenEditor=new tinymce.Editor("mce_fullscreen",m);l.fullscreenEditor.onInit.add(function(){l.loadState(l.fullscreenEditor)});l.fullscreenEditor.render();l.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");l.fullscreenElement.update();l.resizeFunc=tinymce.dom.Event.add(b.win,"resize",function(){var v=tinymce.DOM.getViewPort(),t=l.fullscreenEditor,s,u;s=t.dom.getSize(t.getContainer().getElementsByTagName("table")[0]);u=t.dom.getSize(t.getContainer().getElementsByTagName("iframe")[0]);t.theme.resizeTo(v.w-s.w+u.w,v.h-s.h+u.h)})}});i.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});i.onNodeChange.add(function(q,p){p.setActive("fullscreen",q.getParam("fullscreen_is_enabled"))});l.loadState=function(p){if(!(p&&l.fullscreenSettings)){throw"No fullscreen editor to load to"}a(i,p,l.fullscreenSettings.bookmark);p.focus()};l.saveState=function(q){if(!(q&&l.fullscreenSettings)){throw"No fullscreen editor to restore from"}var p=l.fullscreenSettings;a(q,i,q.selection.getBookmark());if(!i.getParam("fullscreen_new_window")){tinymce.dom.Event.remove(b.win,"resize",l.resizeFunc);delete l.resizeFunc;b.remove("mce_fullscreen_container");b.doc.documentElement.style.overflow=p.fullscreen_html_overflow;b.setStyle(b.doc.body,"overflow",p.fullscreen_overflow);b.win.scrollTo(p.fullscreen_scrollx,p.fullscreen_scrolly)}tinyMCE.settings=tinyMCE.oldSettings;delete tinyMCE.oldSettings;delete l.fullscreenEditor;delete l.fullscreenElement;delete l.fullscreenSettings;b.win.setTimeout(function(){i.selection.moveToBookmark(j);i.focus()},10)}},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+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js
deleted file mode 100644
index a1f39a0421..0000000000
--- a/src/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin_src.js
+++ /dev/null
@@ -1,234 +0,0 @@
-/**
- * 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;
-
- // State Transfer function
- var transferState = function(oldEditor, newEditor, bookmark) {
- var transferColorButtonState = function(swapme) {
- var c = oldEditor.controlManager.get(swapme);
- var newC = newEditor.controlManager.get(swapme);
-
- if (c && newC) {
- newC.displayColor(c.value);
- }
-
- };
-
- transferColorButtonState('forecolor');
- transferColorButtonState('backcolor');
- newEditor.setContent(oldEditor.getContent({format : 'raw'}), {format : 'raw'});
- newEditor.selection.moveToBookmark(bookmark);
-
- if (oldEditor.plugins.spellchecker && newEditor.plugins.spellchecker) {
- newEditor.plugins.spellchecker.setLanguage(oldEditor.plugins.spellchecker.selectedLang);
- }
- };
-
- tinymce.create('tinymce.plugins.FullScreenPlugin', {
- init : function(ed, url) {
- var t = this, s = {}, de = DOM.doc.documentElement, vp, fullscreen_overflow, fullscreen_html_overflow, fullscreen_scrollx, fullscreen_scrolly, posCss, bookmark;
-
- // Register commands
- ed.addCommand('mceFullScreen', function() {
- var win, oed;
-
- if (ed.getParam('fullscreen_is_enabled')) {
- if (ed.getParam('fullscreen_new_window'))
- closeFullscreen(); // Call to close in fullscreen.htm
- else {
- DOM.win.setTimeout(function() {
- var fullscreenEditor = ed;
-
- // find the editor that opened this one, execute restore function there
- var originalEditor = tinyMCE.get(fullscreenEditor.getParam('fullscreen_editor_id'));
- originalEditor.plugins.fullscreen.saveState(fullscreenEditor);
-
- tinyMCE.remove(fullscreenEditor);
- }, 10);
- }
-
- return;
- }
-
- if (ed.getParam('fullscreen_new_window')) {
- t.fullscreenSettings = {
- bookmark: ed.selection.getBookmark()
- };
- win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
- try {
- win.resizeTo(screen.availWidth, screen.availHeight);
- } catch (e) {
- // Ignore
- }
- } else {
- fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
- fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
- vp = DOM.getViewPort();
- fullscreen_scrollx = vp.x;
- fullscreen_scrolly = vp.y;
-
- // Fixes an Opera bug where the scrollbars doesn't reappear
- if (tinymce.isOpera && fullscreen_overflow == 'visible')
- fullscreen_overflow = 'auto';
-
- // Fixes an IE bug where horizontal scrollbars would appear
- if (tinymce.isIE && fullscreen_overflow == 'scroll')
- fullscreen_overflow = 'auto';
-
- // Fixes an IE bug where the scrollbars doesn't reappear
- if (tinymce.isIE && (fullscreen_html_overflow == 'visible' || fullscreen_html_overflow == 'scroll'))
- fullscreen_html_overflow = 'auto';
-
- if (fullscreen_overflow == '0px')
- 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 || document.compatMode == 'BackCompat')
- 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;
- });
-
- t.fullscreenSettings = {
- bookmark: ed.selection.getBookmark(),
- fullscreen_overflow: fullscreen_overflow,
- fullscreen_html_overflow: fullscreen_html_overflow,
- fullscreen_scrollx: fullscreen_scrollx,
- fullscreen_scrolly: fullscreen_scrolly
- };
-
- if (s.theme_advanced_toolbar_location === 'external')
- s.theme_advanced_toolbar_location = 'top';
-
- tinyMCE.oldSettings = tinyMCE.settings; // Store old settings, the Editor constructor overwrites them
- t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
- t.fullscreenEditor.onInit.add(function() {
- t.loadState(t.fullscreenEditor);
- });
-
- 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().getElementsByTagName('table')[0]);
- 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'));
- });
-
- // fullscreenEditor is a param here because in window mode we don't create it
- t.loadState = function(fullscreenEditor) {
- if (!(fullscreenEditor && t.fullscreenSettings)) {
- throw "No fullscreen editor to load to";
- }
-
- transferState(ed, fullscreenEditor, t.fullscreenSettings.bookmark);
- fullscreenEditor.focus();
-
- };
-
- // fullscreenEditor is a param here because in window mode we don't create it
- t.saveState = function(fullscreenEditor) {
- if (!(fullscreenEditor && t.fullscreenSettings)) {
- throw "No fullscreen editor to restore from";
- }
- var settings = t.fullscreenSettings;
-
- transferState(fullscreenEditor, ed, fullscreenEditor.selection.getBookmark());
-
- // cleanup only required if window mode isn't used
- if (!ed.getParam('fullscreen_new_window')) {
- tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
- delete t.resizeFunc;
-
- DOM.remove('mce_fullscreen_container');
-
- DOM.doc.documentElement.style.overflow = settings.fullscreen_html_overflow;
- DOM.setStyle(DOM.doc.body, 'overflow', settings.fullscreen_overflow);
- DOM.win.scrollTo(settings.fullscreen_scrollx, settings.fullscreen_scrolly);
- }
- tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
-
- // clear variables
- delete tinyMCE.oldSettings;
- delete t.fullscreenEditor;
- delete t.fullscreenElement;
- delete t.fullscreenSettings;
-
- // allow the fullscreen editor to be removed before restoring focus and selection
- DOM.win.setTimeout(function() {
- ed.selection.moveToBookmark(bookmark);
- ed.focus();
- }, 10);
- };
- },
-
- 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 + "." + tinymce.minorVersion
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm b/src/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm
deleted file mode 100644
index 9b0fb9aeac..0000000000
--- a/src/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/plugins/fullscreen/plugin.js b/src/wp-includes/js/tinymce/plugins/fullscreen/plugin.js
new file mode 100644
index 0000000000..e518701526
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/fullscreen/plugin.js
@@ -0,0 +1,136 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true */
+
+tinymce.PluginManager.add('fullscreen', function(editor) {
+ var fullscreenState = false, DOM = tinymce.DOM, iframeWidth, iframeHeight, resizeHandler;
+ var containerWidth, containerHeight;
+
+ if (editor.settings.inline) {
+ return;
+ }
+
+ function getWindowSize() {
+ var w, h, win = window, doc = document;
+ var body = doc.body;
+
+ // Old IE
+ if (body.offsetWidth) {
+ w = body.offsetWidth;
+ h = body.offsetHeight;
+ }
+
+ // Modern browsers
+ if (win.innerWidth && win.innerHeight) {
+ w = win.innerWidth;
+ h = win.innerHeight;
+ }
+
+ return {w: w, h: h};
+ }
+
+ function toggleFullscreen() {
+ var body = document.body, documentElement = document.documentElement, editorContainerStyle;
+ var editorContainer, iframe, iframeStyle;
+
+ function resize() {
+ DOM.setStyle(iframe, 'height', getWindowSize().h - (editorContainer.clientHeight - iframe.clientHeight));
+ }
+
+ fullscreenState = !fullscreenState;
+
+ editorContainer = editor.getContainer();
+ editorContainerStyle = editorContainer.style;
+ iframe = editor.getContentAreaContainer().firstChild;
+ iframeStyle = iframe.style;
+
+ if (fullscreenState) {
+ iframeWidth = iframeStyle.width;
+ iframeHeight = iframeStyle.height;
+ iframeStyle.width = iframeStyle.height = '100%';
+ containerWidth = editorContainerStyle.width;
+ containerHeight = editorContainerStyle.height;
+ editorContainerStyle.width = editorContainerStyle.height = '';
+
+ DOM.addClass(body, 'mce-fullscreen');
+ DOM.addClass(documentElement, 'mce-fullscreen');
+ DOM.addClass(editorContainer, 'mce-fullscreen');
+
+ DOM.bind(window, 'resize', resize);
+ resize();
+ resizeHandler = resize;
+ } else {
+ iframeStyle.width = iframeWidth;
+ iframeStyle.height = iframeHeight;
+
+ if (containerWidth) {
+ editorContainerStyle.width = containerWidth;
+ }
+
+ if (containerHeight) {
+ editorContainerStyle.height = containerHeight;
+ }
+
+ DOM.removeClass(body, 'mce-fullscreen');
+ DOM.removeClass(documentElement, 'mce-fullscreen');
+ DOM.removeClass(editorContainer, 'mce-fullscreen');
+ DOM.unbind(window, 'resize', resizeHandler);
+ }
+
+ editor.fire('FullscreenStateChanged', {state: fullscreenState});
+ }
+
+ editor.on('init', function() {
+ editor.addShortcut('Ctrl+Alt+F', '', toggleFullscreen);
+ });
+
+ editor.on('remove', function() {
+ if (resizeHandler) {
+ DOM.unbind(window, 'resize', resizeHandler);
+ }
+ });
+
+ editor.addCommand('mceFullScreen', toggleFullscreen);
+
+ editor.addMenuItem('fullscreen', {
+ text: 'Fullscreen',
+ shortcut: 'Ctrl+Alt+F',
+ selectable: true,
+ onClick: toggleFullscreen,
+ onPostRender: function() {
+ var self = this;
+
+ editor.on('FullscreenStateChanged', function(e) {
+ self.active(e.state);
+ });
+ },
+ context: 'view'
+ });
+
+ editor.addButton('fullscreen', {
+ tooltip: 'Fullscreen',
+ shortcut: 'Ctrl+Alt+F',
+ onClick: toggleFullscreen,
+ onPostRender: function() {
+ var self = this;
+
+ editor.on('FullscreenStateChanged', function(e) {
+ self.active(e.state);
+ });
+ }
+ });
+
+ return {
+ isFullscreen: function() {
+ return fullscreenState;
+ }
+ };
+});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js b/src/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js
new file mode 100644
index 0000000000..1bb1940dd9
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/fullscreen/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,i=document,l=i.body;return l.offsetWidth&&(e=l.offsetWidth,t=l.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){d.setStyle(a,"height",t().h-(h.clientHeight-a.clientHeight))}var u,h,a,f,m=document.body,g=document.documentElement;s=!s,h=e.getContainer(),u=h.style,a=e.getContentAreaContainer().firstChild,f=a.style,s?(i=f.width,l=f.height,f.width=f.height="100%",c=u.width,o=u.height,u.width=u.height="",d.addClass(m,"mce-fullscreen"),d.addClass(g,"mce-fullscreen"),d.addClass(h,"mce-fullscreen"),d.bind(window,"resize",n),n(),r=n):(f.width=i,f.height=l,c&&(u.width=c),o&&(u.height=o),d.removeClass(m,"mce-fullscreen"),d.removeClass(g,"mce-fullscreen"),d.removeClass(h,"mce-fullscreen"),d.unbind(window,"resize",r)),e.fire("FullscreenStateChanged",{state:s})}var i,l,r,c,o,s=!1,d=tinymce.DOM;return e.settings.inline?void 0:(e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.on("remove",function(){r&&d.unbind(window,"resize",r)}),e.addCommand("mceFullScreen",n),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return s}})});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/image/plugin.js b/src/wp-includes/js/tinymce/plugins/image/plugin.js
new file mode 100644
index 0000000000..8bf4a6377f
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/image/plugin.js
@@ -0,0 +1,370 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true */
+
+tinymce.PluginManager.add('image', function(editor) {
+ function getImageSize(url, callback) {
+ var img = document.createElement('img');
+
+ function done(width, height) {
+ img.parentNode.removeChild(img);
+ callback({width: width, height: height});
+ }
+
+ img.onload = function() {
+ done(img.clientWidth, img.clientHeight);
+ };
+
+ img.onerror = function() {
+ done();
+ };
+
+ img.src = url;
+
+ var style = img.style;
+ style.visibility = 'hidden';
+ style.position = 'fixed';
+ style.bottom = style.left = 0;
+ style.width = style.height = 'auto';
+
+ document.body.appendChild(img);
+ }
+
+ function createImageList(callback) {
+ return function() {
+ var imageList = editor.settings.image_list;
+
+ if (typeof(imageList) == "string") {
+ tinymce.util.XHR.send({
+ url: imageList,
+ success: function(text) {
+ callback(tinymce.util.JSON.parse(text));
+ }
+ });
+ } else {
+ callback(imageList);
+ }
+ };
+ }
+
+ function showDialog(imageList) {
+ var win, data = {}, dom = editor.dom, imgElm = editor.selection.getNode();
+ var width, height, imageListCtrl;
+
+ function buildImageList() {
+ var imageListItems = [{text: 'None', value: ''}];
+
+ tinymce.each(imageList, function(image) {
+ imageListItems.push({
+ text: image.text || image.title,
+ value: editor.convertURL(image.value || image.url, 'src'),
+ menu: image.menu
+ });
+ });
+
+ return imageListItems;
+ }
+
+ function recalcSize(e) {
+ var widthCtrl, heightCtrl, newWidth, newHeight;
+
+ widthCtrl = win.find('#width')[0];
+ heightCtrl = win.find('#height')[0];
+
+ newWidth = widthCtrl.value();
+ newHeight = heightCtrl.value();
+
+ if (win.find('#constrain')[0].checked() && width && height && newWidth && newHeight) {
+ if (e.control == widthCtrl) {
+ newHeight = Math.round((newWidth / width) * newHeight);
+ heightCtrl.value(newHeight);
+ } else {
+ newWidth = Math.round((newHeight / height) * newWidth);
+ widthCtrl.value(newWidth);
+ }
+ }
+
+ width = newWidth;
+ height = newHeight;
+ }
+
+ function onSubmitForm() {
+ function waitLoad(imgElm) {
+ function selectImage() {
+ imgElm.onload = imgElm.onerror = null;
+ editor.selection.select(imgElm);
+ editor.nodeChanged();
+ }
+
+ imgElm.onload = function() {
+ if (!data.width && !data.height) {
+ dom.setAttribs(imgElm, {
+ width: imgElm.clientWidth,
+ height: imgElm.clientHeight
+ });
+ //WP
+ editor.fire( 'wpNewImageRefresh', { node: imgElm } );
+ }
+
+ selectImage();
+ };
+
+ imgElm.onerror = selectImage;
+ }
+
+ var data = win.toJSON();
+ var caption = data.caption; // WP
+
+ if (data.width === '') {
+ data.width = null;
+ }
+
+ if (data.height === '') {
+ data.height = null;
+ }
+
+ if (data.style === '') {
+ data.style = null;
+ }
+
+ data = {
+ src: data.src,
+ alt: data.alt,
+ width: data.width,
+ height: data.height,
+ style: data.style
+ };
+
+ editor.undoManager.transact(function() {
+ // WP
+ var eventData = { node: imgElm, data: data, caption: caption };
+
+ editor.fire( 'wpImageFormSubmit', { imgData: eventData } );
+
+ if ( eventData.cancel ) {
+ waitLoad( eventData.node );
+ return;
+ }
+ // WP end
+
+ if (!data.src) {
+ if (imgElm) {
+ dom.remove(imgElm);
+ editor.nodeChanged();
+ }
+
+ return;
+ }
+
+ if (!imgElm) {
+ data.id = '__mcenew';
+ editor.selection.setContent(dom.createHTML('img', data));
+ imgElm = dom.get('__mcenew');
+ dom.setAttrib(imgElm, 'id', null);
+ } else {
+ dom.setAttribs(imgElm, data);
+ }
+
+ waitLoad(imgElm);
+ });
+ }
+
+ function removePixelSuffix(value) {
+ if (value) {
+ value = value.replace(/px$/, '');
+ }
+
+ return value;
+ }
+
+ function srcChange() {
+ if (imageListCtrl) {
+ imageListCtrl.value(editor.convertURL(this.value(), 'src'));
+ }
+
+ getImageSize(this.value(), function(data) {
+ if (data.width && data.height) {
+ width = data.width;
+ height = data.height;
+
+ win.find('#width').value(width);
+ win.find('#height').value(height);
+ }
+ });
+ }
+
+ width = dom.getAttrib(imgElm, 'width');
+ height = dom.getAttrib(imgElm, 'height');
+
+ if (imgElm.nodeName == 'IMG' && !imgElm.getAttribute('data-mce-object') && !imgElm.getAttribute('data-mce-placeholder')) {
+ data = {
+ src: dom.getAttrib(imgElm, 'src'),
+ alt: dom.getAttrib(imgElm, 'alt'),
+ width: width,
+ height: height
+ };
+
+ // WP
+ editor.fire( 'wpLoadImageData', { imgData: { data: data, node: imgElm } } );
+ } else {
+ imgElm = null;
+ }
+
+ if (imageList) {
+ imageListCtrl = {
+ type: 'listbox',
+ label: 'Image list',
+ values: buildImageList(),
+ value: data.src && editor.convertURL(data.src, 'src'),
+ onselect: function(e) {
+ var altCtrl = win.find('#alt');
+
+ if (!altCtrl.value() || (e.lastControl && altCtrl.value() == e.lastControl.text())) {
+ altCtrl.value(e.control.text());
+ }
+
+ win.find('#src').value(e.control.value());
+ },
+ onPostRender: function() {
+ imageListCtrl = this;
+ }
+ };
+ }
+
+ // General settings shared between simple and advanced dialogs
+ var generalFormItems = [
+ {name: 'src', type: 'filepicker', filetype: 'image', label: 'Source', autofocus: true, onchange: srcChange},
+ imageListCtrl,
+ {name: 'alt', type: 'textbox', label: 'Image description'},
+ {
+ type: 'container',
+ label: 'Dimensions',
+ layout: 'flex',
+ direction: 'row',
+ align: 'center',
+ spacing: 5,
+ items: [
+ {name: 'width', type: 'textbox', maxLength: 3, size: 3, onchange: recalcSize},
+ {type: 'label', text: 'x'},
+ {name: 'height', type: 'textbox', maxLength: 3, size: 3, onchange: recalcSize},
+ {name: 'constrain', type: 'checkbox', checked: true, text: 'Constrain proportions'}
+ ]
+ }
+ ];
+
+ // WP
+ editor.fire( 'wpLoadImageForm', { data: generalFormItems } );
+
+ function updateStyle() {
+ function addPixelSuffix(value) {
+ if (value.length > 0 && /^[0-9]+$/.test(value)) {
+ value += 'px';
+ }
+
+ return value;
+ }
+
+ var data = win.toJSON();
+ var css = dom.parseStyle(data.style);
+
+ delete css.margin;
+ css['margin-top'] = css['margin-bottom'] = addPixelSuffix(data.vspace);
+ css['margin-left'] = css['margin-right'] = addPixelSuffix(data.hspace);
+ css['border-width'] = addPixelSuffix(data.border);
+
+ win.find('#style').value(dom.serializeStyle(dom.parseStyle(dom.serializeStyle(css))));
+ }
+
+ if (editor.settings.image_advtab) {
+ // Parse styles from img
+ if (imgElm) {
+ data.hspace = removePixelSuffix(imgElm.style.marginLeft || imgElm.style.marginRight);
+ data.vspace = removePixelSuffix(imgElm.style.marginTop || imgElm.style.marginBottom);
+ data.border = removePixelSuffix(imgElm.style.borderWidth);
+ data.style = editor.dom.serializeStyle(editor.dom.parseStyle(editor.dom.getAttrib(imgElm, 'style')));
+ }
+
+ // Advanced dialog shows general+advanced tabs
+ win = editor.windowManager.open({
+ title: 'Insert/edit image',
+ data: data,
+ bodyType: 'tabpanel',
+ body: [
+ {
+ title: 'General',
+ type: 'form',
+ items: generalFormItems
+ },
+
+ {
+ title: 'Advanced',
+ type: 'form',
+ pack: 'start',
+ items: [
+ {
+ label: 'Style',
+ name: 'style',
+ type: 'textbox'
+ },
+ {
+ type: 'form',
+ layout: 'grid',
+ packV: 'start',
+ columns: 2,
+ padding: 0,
+ alignH: ['left', 'right'],
+ defaults: {
+ type: 'textbox',
+ maxWidth: 50,
+ onchange: updateStyle
+ },
+ items: [
+ {label: 'Vertical space', name: 'vspace'},
+ {label: 'Horizontal space', name: 'hspace'},
+ {label: 'Border', name: 'border'}
+ ]
+ }
+ ]
+ }
+ ],
+ onSubmit: onSubmitForm
+ });
+ } else {
+ // Simple default dialog
+ win = editor.windowManager.open({
+ title: 'Insert/edit image',
+ data: data,
+ body: generalFormItems,
+ onSubmit: onSubmitForm
+ });
+ }
+ }
+
+ // WP
+ editor.addCommand( 'mceImage', function() {
+ createImageList( showDialog )();
+ });
+
+ editor.addButton('image', {
+ icon: 'image',
+ tooltip: 'Insert/edit image',
+ onclick: createImageList(showDialog),
+ stateSelector: 'img:not([data-mce-object],[data-mce-placeholder])'
+ });
+
+ editor.addMenuItem('image', {
+ icon: 'image',
+ text: 'Insert image',
+ onclick: createImageList(showDialog),
+ context: 'insert',
+ prependToContext: true
+ });
+});
diff --git a/src/wp-includes/js/tinymce/plugins/image/plugin.min.js b/src/wp-includes/js/tinymce/plugins/image/plugin.min.js
new file mode 100644
index 0000000000..898bd449b4
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/image/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("image",function(a){function b(a,b){function c(a,c){d.parentNode.removeChild(d),b({width:a,height:c})}var d=document.createElement("img");d.onload=function(){c(d.clientWidth,d.clientHeight)},d.onerror=function(){c()},d.src=a;var e=d.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left=0,e.width=e.height="auto",document.body.appendChild(d)}function c(b){return function(){var c=a.settings.image_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):b(c)}}function d(c){function d(){var b=[{text:"None",value:""}];return tinymce.each(c,function(c){b.push({text:c.text||c.title,value:a.convertURL(c.value||c.url,"src"),menu:c.menu})}),b}function e(a){var b,c,d,e;b=j.find("#width")[0],c=j.find("#height")[0],d=b.value(),e=c.value(),j.find("#constrain")[0].checked()&&k&&l&&d&&e&&(a.control==b?(e=Math.round(d/k*e),c.value(e)):(d=Math.round(e/l*d),b.value(d))),k=d,l=e}function f(){function b(b){function d(){b.onload=b.onerror=null,a.selection.select(b),a.nodeChanged()}b.onload=function(){c.width||c.height||(o.setAttribs(b,{width:b.clientWidth,height:b.clientHeight}),a.fire("wpNewImageRefresh",{node:b})),d()},b.onerror=d}var c=j.toJSON(),d=c.caption;""===c.width&&(c.width=null),""===c.height&&(c.height=null),""===c.style&&(c.style=null),c={src:c.src,alt:c.alt,width:c.width,height:c.height,style:c.style},a.undoManager.transact(function(){var e={node:p,data:c,caption:d};return a.fire("wpImageFormSubmit",{imgData:e}),e.cancel?(b(e.node),void 0):c.src?(p?o.setAttribs(p,c):(c.id="__mcenew",a.selection.setContent(o.createHTML("img",c)),p=o.get("__mcenew"),o.setAttrib(p,"id",null)),b(p),void 0):(p&&(o.remove(p),a.nodeChanged()),void 0)})}function g(a){return a&&(a=a.replace(/px$/,"")),a}function h(){m&&m.value(a.convertURL(this.value(),"src")),b(this.value(),function(a){a.width&&a.height&&(k=a.width,l=a.height,j.find("#width").value(k),j.find("#height").value(l))})}function i(){function a(a){return a.length>0&&/^[0-9]+$/.test(a)&&(a+="px"),a}var b=j.toJSON(),c=o.parseStyle(b.style);delete c.margin,c["margin-top"]=c["margin-bottom"]=a(b.vspace),c["margin-left"]=c["margin-right"]=a(b.hspace),c["border-width"]=a(b.border),j.find("#style").value(o.serializeStyle(o.parseStyle(o.serializeStyle(c))))}var j,k,l,m,n={},o=a.dom,p=a.selection.getNode();k=o.getAttrib(p,"width"),l=o.getAttrib(p,"height"),"IMG"!=p.nodeName||p.getAttribute("data-mce-object")||p.getAttribute("data-mce-placeholder")?p=null:(n={src:o.getAttrib(p,"src"),alt:o.getAttrib(p,"alt"),width:k,height:l},a.fire("wpLoadImageData",{imgData:{data:n,node:p}})),c&&(m={type:"listbox",label:"Image list",values:d(),value:n.src&&a.convertURL(n.src,"src"),onselect:function(a){var b=j.find("#alt");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),j.find("#src").value(a.control.value())},onPostRender:function(){m=this}});var q=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:h},m,{name:"alt",type:"textbox",label:"Image description"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:e},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:e},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}];a.fire("wpLoadImageForm",{data:q}),a.settings.image_advtab?(p&&(n.hspace=g(p.style.marginLeft||p.style.marginRight),n.vspace=g(p.style.marginTop||p.style.marginBottom),n.border=g(p.style.borderWidth),n.style=a.dom.serializeStyle(a.dom.parseStyle(a.dom.getAttrib(p,"style")))),j=a.windowManager.open({title:"Insert/edit image",data:n,bodyType:"tabpanel",body:[{title:"General",type:"form",items:q},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox"},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:i},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:f})):j=a.windowManager.open({title:"Insert/edit image",data:n,body:q,onSubmit:f})}a.addCommand("mceImage",function(){c(d)()}),a.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:c(d),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),a.addMenuItem("image",{icon:"image",text:"Insert image",onclick:c(d),context:"insert",prependToContext:!0})});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js b/src/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js
deleted file mode 100644
index 8bb96f9cbe..0000000000
--- a/src/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},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+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_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:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","
"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;gf){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js
deleted file mode 100644
index 2a6f3ad299..0000000000
--- a/src/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin_src.js
+++ /dev/null
@@ -1,699 +0,0 @@
-/**
- * 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') + "/window.css");
- });
- },
-
- 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 + "." + 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 && 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 && 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 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
-
- u = tinymce._addVer(u);
- }
-
- if (!f.type) {
- DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', 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', '
'));
-
- 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 && 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 && 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 && !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 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 && 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 + "_bottom", '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\(\"(.+)\"\)/, '$1');
- }
- });
-
- DOM.get(id).style.filter = '';
- }
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
-})();
-
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
deleted file mode 100644
index 219139857e..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
deleted file mode 100644
index f957e49a3d..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
deleted file mode 100644
index b408ae1fe7..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
deleted file mode 100644
index 20acbbf7ae..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
deleted file mode 100644
index d5de1cc236..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif
deleted file mode 100644
index a5f068385d..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/drag.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
deleted file mode 100644
index c2a2ad454d..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
deleted file mode 100644
index 0b4cc3682a..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css b/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css
deleted file mode 100644
index ad07434df4..0000000000
--- a/src/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Clearlooks 2 */
-
-/* Reset */
-.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
-
-/* General */
-.clearlooks2 {position:absolute; direction:ltr}
-.clearlooks2 .mceWrapper {position:static}
-.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
-.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
-.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
-
-/* Top */
-.clearlooks2 .mceTop,
-.clearlooks2 .mceTop div {
- top:0;
- width:100%;
- height:23px
-}
-.clearlooks2 .mceTop .mceLeft {
- width:55%;
- background-image: none;
- border-style: solid none none solid;
- border-width: 1px;
-}
-.clearlooks2 .mceTop .mceCenter {
-}
-.clearlooks2 .mceTop .mceRight {
- right:0;
- width:55%;
- height:23px;
- background-image: none;
- border-style: solid solid none none;
- border-width: 1px;
-}
-.clearlooks2 .mceTop span {
- width:100%;
- font: 12px/20px bold "Lucida Grande","Lucida Sans Unicode",Tahoma,Verdana,sans-serif;
- text-align:center;
- vertical-align:middle;
- line-height:23px;
- font-weight:bold;
-}
-.clearlooks2 .mceFocus .mceTop .mceLeft {
- background-image: none;
- border-style: solid none none solid;
- border-width: 1px;
-}
-.clearlooks2 .mceFocus .mceTop .mceCenter {
-}
-.clearlooks2 .mceFocus .mceTop .mceRight {
- background-image: none;
- border-style: solid solid none none;
- border-width: 1px;
-}
-.clearlooks2 .mceFocus .mceTop span {
-color:#FFF
-}
-
-/* Middle */
-.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
-.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
-.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:#E4F2FD;border-left:1px solid #c6d9e9}
-.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
-.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:#E4F2FD;border-right:1px solid #c6d9e9}
-
-/* Bottom */
-.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
-.clearlooks2 .mceBottom {left:0; bottom:0; width:100%;background:#E4F2FD;border-bottom:1px solid #c6d9e9}
-.clearlooks2 .mceBottom div {top:0}
-.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:#E4F2FD ;border-left:1px solid #c6d9e9}
-.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%}
-.clearlooks2 .mceBottom .mceRight {right:0; width:6px; background:#E4F2FD url(img/drag.gif) no-repeat;border-right:1px solid #c6d9e9}
-.clearlooks2 .mceBottom span {display:none}
-.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
-.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
-.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
-.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
-.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
-
-/* Actions */
-.clearlooks2 a {width:29px; height:16px; top:3px;}
-.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
-.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
-.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
-.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
-.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
-.clearlooks2 .mceMovable .mceMove {display:block}
-.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
-.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
-.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
-.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
-.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
-.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
-.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
-.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
-.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
-
-/* Resize */
-.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
-.clearlooks2 .mceResizable .mceResize {display:block}
-.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
-.clearlooks2 .mceMinimizable .mceMin {display:block}
-.clearlooks2 .mceMaximizable .mceMax {display:block}
-.clearlooks2 .mceMaximized .mceMed {display:block}
-.clearlooks2 .mceMaximized .mceMax {display:none}
-.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
-.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
-.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
-.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
-.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
-.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
-.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
-.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
-
-/* Alert/Confirm */
-.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
-.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
-.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
-.clearlooks2 a:hover {font-weight:bold;}
-.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#F9F9F9}
-.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
-.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
-.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
-.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
-.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
diff --git a/src/wp-includes/js/tinymce/plugins/inlinepopups/template.htm b/src/wp-includes/js/tinymce/plugins/inlinepopups/template.htm
deleted file mode 100644
index 5015783154..0000000000
--- a/src/wp-includes/js/tinymce/plugins/inlinepopups/template.htm
+++ /dev/null
@@ -1,387 +0,0 @@
-
-
-
-Template for dialogs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Alert
-
-
-
-
-
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
-
-
-
-
-
-
-
-
-
-
-
-
- Ok
-
-
-
-
-
-
-
-
-
-
- Confirm
-
-
-
-
-
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
- This is a very long error message. This is a very long error message.
-
-
-
-
-
-
-
-
-
-
-
-
- Ok
- Cancel
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/plugins/link/plugin.js b/src/wp-includes/js/tinymce/plugins/link/plugin.js
new file mode 100644
index 0000000000..276eb8ee0f
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/link/plugin.js
@@ -0,0 +1,308 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true */
+
+tinymce.PluginManager.add('link', function(editor) {
+ function createLinkList(callback) {
+ return function() {
+ var linkList = editor.settings.link_list;
+
+ if (typeof(linkList) == "string") {
+ tinymce.util.XHR.send({
+ url: linkList,
+ success: function(text) {
+ callback(tinymce.util.JSON.parse(text));
+ }
+ });
+ } else {
+ callback(linkList);
+ }
+ };
+ }
+
+ function showDialog(linkList) {
+ var data = {}, selection = editor.selection, dom = editor.dom, selectedElm, anchorElm, initialText;
+ var win, linkListCtrl, relListCtrl, targetListCtrl;
+
+ function linkListChangeHandler(e) {
+ var textCtrl = win.find('#text');
+
+ if (!textCtrl.value() || (e.lastControl && textCtrl.value() == e.lastControl.text())) {
+ textCtrl.value(e.control.text());
+ }
+
+ win.find('#href').value(e.control.value());
+ }
+
+ function buildLinkList() {
+ var linkListItems = [{text: 'None', value: ''}];
+
+ tinymce.each(linkList, function(link) {
+ linkListItems.push({
+ text: link.text || link.title,
+ value: editor.convertURL(link.value || link.url, 'href'),
+ menu: link.menu
+ });
+ });
+
+ return linkListItems;
+ }
+
+ function buildRelList(relValue) {
+ var relListItems = [{text: 'None', value: ''}];
+
+ tinymce.each(editor.settings.rel_list, function(rel) {
+ relListItems.push({
+ text: rel.text || rel.title,
+ value: rel.value,
+ selected: relValue === rel.value
+ });
+ });
+
+ return relListItems;
+ }
+
+ function buildTargetList(targetValue) {
+ var targetListItems = [{text: 'None', value: ''}];
+
+ if (!editor.settings.target_list) {
+ targetListItems.push({text: 'New window', value: '_blank'});
+ }
+
+ tinymce.each(editor.settings.target_list, function(target) {
+ targetListItems.push({
+ text: target.text || target.title,
+ value: target.value,
+ selected: targetValue === target.value
+ });
+ });
+
+ return targetListItems;
+ }
+
+ function buildAnchorListControl(url) {
+ var anchorList = [];
+
+ tinymce.each(editor.dom.select('a:not([href])'), function(anchor) {
+ var id = anchor.name || anchor.id;
+
+ if (id) {
+ anchorList.push({
+ text: id,
+ value: '#' + id,
+ selected: url.indexOf('#' + id) != -1
+ });
+ }
+ });
+
+ if (anchorList.length) {
+ anchorList.unshift({text: 'None', value: ''});
+
+ return {
+ name: 'anchor',
+ type: 'listbox',
+ label: 'Anchors',
+ values: anchorList,
+ onselect: linkListChangeHandler
+ };
+ }
+ }
+
+ function urlChange() {
+ if (linkListCtrl) {
+ linkListCtrl.value(editor.convertURL(this.value(), 'href'));
+ }
+
+ if (!initialText && data.text.length === 0) {
+ this.parent().parent().find('#text')[0].value(this.value());
+ }
+ }
+
+ selectedElm = selection.getNode();
+ anchorElm = dom.getParent(selectedElm, 'a[href]');
+
+ data.text = initialText = anchorElm ? (anchorElm.innerText || anchorElm.textContent) : selection.getContent({format: 'text'});
+ data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
+ data.target = anchorElm ? dom.getAttrib(anchorElm, 'target') : '';
+ data.rel = anchorElm ? dom.getAttrib(anchorElm, 'rel') : '';
+
+ if (selectedElm.nodeName == "IMG") {
+ data.text = initialText = " ";
+ }
+
+ if (linkList) {
+ linkListCtrl = {
+ type: 'listbox',
+ label: 'Link list',
+ values: buildLinkList(),
+ onselect: linkListChangeHandler,
+ value: editor.convertURL(data.href, 'href'),
+ onPostRender: function() {
+ linkListCtrl = this;
+ }
+ };
+ }
+
+ if (editor.settings.target_list !== false) {
+ targetListCtrl = {
+ name: 'target',
+ type: 'listbox',
+ label: 'Target',
+ values: buildTargetList(data.target)
+ };
+ }
+
+ if (editor.settings.rel_list) {
+ relListCtrl = {
+ name: 'rel',
+ type: 'listbox',
+ label: 'Rel',
+ values: buildRelList(data.rel)
+ };
+ }
+
+ win = editor.windowManager.open({
+ title: 'Insert link',
+ data: data,
+ body: [
+ {
+ name: 'href',
+ type: 'filepicker',
+ filetype: 'file',
+ size: 40,
+ autofocus: true,
+ label: 'Url',
+ onchange: urlChange,
+ onkeyup: urlChange
+ },
+ {name: 'text', type: 'textbox', size: 40, label: 'Text to display', onchange: function() {
+ data.text = this.value();
+ }},
+ buildAnchorListControl(data.href),
+ linkListCtrl,
+ relListCtrl,
+ targetListCtrl
+ ],
+ onSubmit: function(e) {
+ var data = e.data, href = data.href;
+
+ // Delay confirm since onSubmit will move focus
+ function delayedConfirm(message, callback) {
+ var rng = editor.selection.getRng();
+
+ window.setTimeout(function() {
+ editor.windowManager.confirm(message, function(state) {
+ editor.selection.setRng(rng);
+ callback(state);
+ });
+ }, 0);
+ }
+
+ function insertLink() {
+ if (data.text != initialText) {
+ if (anchorElm) {
+ editor.focus();
+ anchorElm.innerHTML = data.text;
+
+ dom.setAttribs(anchorElm, {
+ href: href,
+ target: data.target ? data.target : null,
+ rel: data.rel ? data.rel : null
+ });
+
+ selection.select(anchorElm);
+ } else {
+ editor.insertContent(dom.createHTML('a', {
+ href: href,
+ target: data.target ? data.target : null,
+ rel: data.rel ? data.rel : null
+ }, data.text));
+ }
+ } else {
+ editor.execCommand('mceInsertLink', false, {
+ href: href,
+ target: data.target,
+ rel: data.rel ? data.rel : null
+ });
+ }
+ }
+
+ if (!href) {
+ editor.execCommand('unlink');
+ return;
+ }
+
+ // Is email and not //user@domain.com
+ if (href.indexOf('@') > 0 && href.indexOf('//') == -1 && href.indexOf('mailto:') == -1) {
+ delayedConfirm(
+ 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?',
+ function(state) {
+ if (state) {
+ href = 'mailto:' + href;
+ }
+
+ insertLink();
+ }
+ );
+
+ return;
+ }
+
+ // Is www. prefixed
+ if (/^\s*www\./i.test(href)) {
+ delayedConfirm(
+ 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?',
+ function(state) {
+ if (state) {
+ href = 'http://' + href;
+ }
+
+ insertLink();
+ }
+ );
+
+ return;
+ }
+
+ insertLink();
+ }
+ });
+ }
+
+ editor.addButton('link', {
+ icon: 'link',
+ tooltip: 'Insert/edit link',
+ shortcut: 'Ctrl+K',
+ onclick: createLinkList(showDialog),
+ stateSelector: 'a[href]'
+ });
+
+ editor.addButton('unlink', {
+ icon: 'unlink',
+ tooltip: 'Remove link',
+ cmd: 'unlink',
+ stateSelector: 'a[href]'
+ });
+
+ editor.addShortcut('Ctrl+K', '', createLinkList(showDialog));
+
+ this.showDialog = showDialog;
+
+ editor.addMenuItem('link', {
+ icon: 'link',
+ text: 'Insert link',
+ shortcut: 'Ctrl+K',
+ onclick: createLinkList(showDialog),
+ stateSelector: 'a[href]',
+ context: 'insert',
+ prependToContext: true
+ });
+});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/link/plugin.min.js b/src/wp-includes/js/tinymce/plugins/link/plugin.min.js
new file mode 100644
index 0000000000..0adb9f847d
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/link/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("link",function(e){function t(t){return function(){var n=e.settings.link_list;"string"==typeof n?tinymce.util.XHR.send({url:n,success:function(e){t(tinymce.util.JSON.parse(e))}}):t(n)}}function n(t){function n(e){var t=f.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),f.find("#href").value(e.control.value())}function l(){var n=[{text:"None",value:""}];return tinymce.each(t,function(t){n.push({text:t.text||t.title,value:e.convertURL(t.value||t.url,"href"),menu:t.menu})}),n}function i(t){var n=[{text:"None",value:""}];return tinymce.each(e.settings.rel_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function r(t){var n=[{text:"None",value:""}];return e.settings.target_list||n.push({text:"New window",value:"_blank"}),tinymce.each(e.settings.target_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function a(t){var l=[];return tinymce.each(e.dom.select("a:not([href])"),function(e){var n=e.name||e.id;n&&l.push({text:n,value:"#"+n,selected:-1!=t.indexOf("#"+n)})}),l.length?(l.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:l,onselect:n}):void 0}function o(){d&&d.value(e.convertURL(this.value(),"href")),c||0!==x.text.length||this.parent().parent().find("#text")[0].value(this.value())}var u,s,c,f,d,h,v,x={},g=e.selection,m=e.dom;u=g.getNode(),s=m.getParent(u,"a[href]"),x.text=c=s?s.innerText||s.textContent:g.getContent({format:"text"}),x.href=s?m.getAttrib(s,"href"):"",x.target=s?m.getAttrib(s,"target"):"",x.rel=s?m.getAttrib(s,"rel"):"","IMG"==u.nodeName&&(x.text=c=" "),t&&(d={type:"listbox",label:"Link list",values:l(),onselect:n,value:e.convertURL(x.href,"href"),onPostRender:function(){d=this}}),e.settings.target_list!==!1&&(v={name:"target",type:"listbox",label:"Target",values:r(x.target)}),e.settings.rel_list&&(h={name:"rel",type:"listbox",label:"Rel",values:i(x.rel)}),f=e.windowManager.open({title:"Insert link",data:x,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:o,onkeyup:o},{name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){x.text=this.value()}},a(x.href),d,h,v],onSubmit:function(t){function n(t,n){var l=e.selection.getRng();window.setTimeout(function(){e.windowManager.confirm(t,function(t){e.selection.setRng(l),n(t)})},0)}function l(){i.text!=c?s?(e.focus(),s.innerHTML=i.text,m.setAttribs(s,{href:r,target:i.target?i.target:null,rel:i.rel?i.rel:null}),g.select(s)):e.insertContent(m.createHTML("a",{href:r,target:i.target?i.target:null,rel:i.rel?i.rel:null},i.text)):e.execCommand("mceInsertLink",!1,{href:r,target:i.target,rel:i.rel?i.rel:null})}var i=t.data,r=i.href;return r?r.indexOf("@")>0&&-1==r.indexOf("//")&&-1==r.indexOf("mailto:")?(n("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(e){e&&(r="mailto:"+r),l()}),void 0):/^\s*www\./i.test(r)?(n("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(e){e&&(r="http://"+r),l()}),void 0):(l(),void 0):(e.execCommand("unlink"),void 0)}})}e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),e.addShortcut("Ctrl+K","",t(n)),this.showDialog=n,e.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:t(n),stateSelector:"a[href]",context:"insert",prependToContext:!0})});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/media/css/media.css b/src/wp-includes/js/tinymce/plugins/media/css/media.css
deleted file mode 100644
index fd04898ca5..0000000000
--- a/src/wp-includes/js/tinymce/plugins/media/css/media.css
+++ /dev/null
@@ -1,17 +0,0 @@
-#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
-#hspace, #vspace { width: 50px }
-#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
-#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px }
-#width, #height { width: 40px }
-#src, #media_type { width: 250px }
-#class { width: 120px }
-#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto }
-.panel_wrapper div.current { height: 420px; overflow: auto }
-#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
-.mceAddSelectValue { background-color: #DDDDDD }
-#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
-#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
-#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
-#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
-#qt_qtsrc { width: 200px }
-iframe {border: 1px solid gray}
diff --git a/src/wp-includes/js/tinymce/plugins/media/editor_plugin.js b/src/wp-includes/js/tinymce/plugins/media/editor_plugin.js
deleted file mode 100644
index 9ac42e0d21..0000000000
--- a/src/wp-includes/js/tinymce/plugins/media/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A 0)
- flashVarsOutput += (flashVarsOutput ? '&' : '') + 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] = "" + 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'));
- }
-
- // Use node width/height to override the data width/height when the placeholder is resized
- data.width = node.attr('width') || data.width;
- data.height = node.attr('height') || data.height;
-
- // Handle iframe
- if (typeItem.name === 'Iframe') {
- replacement = new Node('iframe', 1);
-
- tinymce.each(rootAttributes, function(name) {
- var value = node.attr(name);
-
- if (name == 'class' && value)
- value = value.replace(/mceItem.+ ?/g, '');
-
- if (value && value.length > 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' && data.video.sources && data.video.sources[0]) {
- // Create new object element
- video = new Node('video', 1).attr(tinymce.extend({
- id : node.attr('id'),
- width: normalizeSize(node.attr('width')),
- height: normalizeSize(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 < 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 < 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' && data.video.sources && data.video.sources[0]) {
- // Create new object element
- audio = new Node('audio', 1).attr(tinymce.extend({
- id : node.attr('id'),
- width: normalizeSize(node.attr('width')),
- height: normalizeSize(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 < 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: normalizeSize(node.attr('width')),
- height: normalizeSize(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] && 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 && 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: normalizeSize(node.attr('width')),
- height: normalizeSize(node.attr('height')),
- style : style
- });
-
- tinymce.each(rootAttributes, function(name) {
- var value = data[name];
-
- if (name == 'class' && value)
- value = value.replace(/mceItem.+ ?/g, '');
-
- if (value && 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' && 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 {
- if ( typeItem.clsids )
- object.attr('clsid', typeItem.clsids[0]);
- object.attr('codebase', typeItem.codebase);
-
- embed = new Node('embed', 1);
- embed.shortEnded = true;
- embed.attr({
- id: node.attr('id'),
- width: normalizeSize(node.attr('width')),
- height: normalizeSize(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] && 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:
- *
- *
- * 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("source");
- for (i = 0; i < 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("param");
- for (i = 0; i < 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] && !data.params[name])
- data.params[name] = embed.attributes.map[name];
- }
- }
-
- if (iframe) {
- // Get width/height
- width = normalizeSize(iframe.attr('width'));
- height = normalizeSize(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] && !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 && !type)
- type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
-
- if (embed && !type)
- type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
-
- // for embedded audio we preserve the original specified type
- if (embed && 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' ? "300" : "320"),
- height : height || (node.name == 'audio' ? "32" : "240"),
- hspace : hspace,
- vspace : vspace,
- align : align,
- bgcolor : bgcolor,
- "data-mce-json" : JSON.serialize(data, "'")
- });
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/media/js/embed.js b/src/wp-includes/js/tinymce/plugins/media/js/embed.js
deleted file mode 100644
index 6fe25de090..0000000000
--- a/src/wp-includes/js/tinymce/plugins/media/js/embed.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
- * This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
- */
-
-function writeFlash(p) {
- writeEmbed(
- 'D27CDB6E-AE6D-11cf-96B8-444553540000',
- 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
- 'application/x-shockwave-flash',
- p
- );
-}
-
-function writeShockWave(p) {
- writeEmbed(
- '166B1BCA-3F9C-11CF-8075-444553540000',
- 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
- 'application/x-director',
- p
- );
-}
-
-function writeQuickTime(p) {
- writeEmbed(
- '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
- 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
- 'video/quicktime',
- p
- );
-}
-
-function writeRealMedia(p) {
- writeEmbed(
- 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
- 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
- 'audio/x-pn-realaudio-plugin',
- p
- );
-}
-
-function writeWindowsMedia(p) {
- p.url = p.src;
- writeEmbed(
- '6BF52A52-394A-11D3-B153-00C04F79FAA6',
- 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
- 'application/x-mplayer2',
- p
- );
-}
-
-function writeEmbed(cls, cb, mt, p) {
- var h = '', n;
-
- h += '';
-
- document.write(h);
-}
diff --git a/src/wp-includes/js/tinymce/plugins/media/js/media.js b/src/wp-includes/js/tinymce/plugins/media/js/media.js
deleted file mode 100644
index b21abb5f3c..0000000000
--- a/src/wp-includes/js/tinymce/plugins/media/js/media.js
+++ /dev/null
@@ -1,513 +0,0 @@
-(function() {
- var url;
-
- if (url = tinyMCEPopup.getParam("media_external_list_url"))
- document.write('');
-
- function get(id) {
- return document.getElementById(id);
- }
-
- function clone(obj) {
- var i, len, copy, attr;
-
- if (null == obj || "object" != typeof obj)
- return obj;
-
- // Handle Array
- if ('length' in obj) {
- copy = [];
-
- for (i = 0, len = obj.length; i < len; ++i) {
- copy[i] = clone(obj[i]);
- }
-
- return copy;
- }
-
- // Handle Object
- copy = {};
- for (attr in obj) {
- if (obj.hasOwnProperty(attr))
- copy[attr] = clone(obj[attr]);
- }
-
- return copy;
- }
-
- function getVal(id) {
- var elm = get(id);
-
- if (elm.nodeName == "SELECT")
- return elm.options[elm.selectedIndex].value;
-
- if (elm.type == "checkbox")
- return elm.checked;
-
- return elm.value;
- }
-
- function setVal(id, value, name) {
- if (typeof(value) != 'undefined' && value != null) {
- var elm = get(id);
-
- if (elm.nodeName == "SELECT")
- selectByValue(document.forms[0], id, value);
- else if (elm.type == "checkbox") {
- if (typeof(value) == 'string') {
- value = value.toLowerCase();
- value = (!name && value === 'true') || (name && value === name.toLowerCase());
- }
- elm.checked = !!value;
- } else
- elm.value = value;
- }
- }
-
- window.Media = {
- init : function() {
- var html, editor, self = this;
-
- self.editor = editor = tinyMCEPopup.editor;
-
- // Setup file browsers and color pickers
- get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
- get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media');
- get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
- get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media');
- get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
- get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
- get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
- get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','image','media');
-
- html = self.getMediaListHTML('medialist', 'src', 'media', 'media');
- if (html == "")
- get("linklistrow").style.display = 'none';
- else
- get("linklistcontainer").innerHTML = html;
-
- if (isVisible('filebrowser'))
- get('src').style.width = '230px';
-
- if (isVisible('video_filebrowser_altsource1'))
- get('video_altsource1').style.width = '220px';
-
- if (isVisible('video_filebrowser_altsource2'))
- get('video_altsource2').style.width = '220px';
-
- if (isVisible('audio_filebrowser_altsource1'))
- get('audio_altsource1').style.width = '220px';
-
- if (isVisible('audio_filebrowser_altsource2'))
- get('audio_altsource2').style.width = '220px';
-
- if (isVisible('filebrowser_poster'))
- get('video_poster').style.width = '220px';
-
- editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor));
-
- self.setDefaultDialogSettings(editor);
- self.data = clone(tinyMCEPopup.getWindowArg('data'));
- self.dataToForm();
- self.preview();
-
- updateColor('bgcolor_pick', 'bgcolor');
- },
-
- insert : function() {
- var editor = tinyMCEPopup.editor;
-
- this.formToData();
- editor.execCommand('mceRepaint');
- tinyMCEPopup.restoreSelection();
- editor.selection.setNode(editor.plugins.media.dataToImg(this.data));
- tinyMCEPopup.close();
- },
-
- preview : function() {
- get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true);
- },
-
- moveStates : function(to_form, field) {
- var data = this.data, editor = this.editor,
- mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
-
- defaultStates = {
- // QuickTime
- quicktime_autoplay : true,
- quicktime_controller : true,
-
- // Flash
- flash_play : true,
- flash_loop : true,
- flash_menu : true,
-
- // WindowsMedia
- windowsmedia_autostart : true,
- windowsmedia_enablecontextmenu : true,
- windowsmedia_invokeurls : true,
-
- // RealMedia
- realmedia_autogotourl : true,
- realmedia_imagestatus : true
- };
-
- function parseQueryParams(str) {
- var out = {};
-
- if (str) {
- tinymce.each(str.split('&'), function(item) {
- var parts = item.split('=');
-
- out[unescape(parts[0])] = unescape(parts[1]);
- });
- }
-
- return out;
- };
-
- function setOptions(type, names) {
- var i, name, formItemName, value, list;
-
- if (type == data.type || type == 'global') {
- names = tinymce.explode(names);
- for (i = 0; i < names.length; i++) {
- name = names[i];
- formItemName = type == 'global' ? name : type + '_' + name;
-
- if (type == 'global')
- list = data;
- else if (type == 'video' || type == 'audio') {
- list = data.video.attrs;
-
- if (!list && !to_form)
- data.video.attrs = list = {};
- } else
- list = data.params;
-
- if (list) {
- if (to_form) {
- setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : '');
- } else {
- delete list[name];
-
- value = getVal(formItemName);
- if ((type == 'video' || type == 'audio') && value === true)
- value = name;
-
- if (defaultStates[formItemName]) {
- if (value !== defaultStates[formItemName]) {
- value = "" + value;
- list[name] = value;
- }
- } else if (value) {
- value = "" + value;
- list[name] = value;
- }
- }
- }
- }
- }
- }
-
- if (!to_form) {
- data.type = get('media_type').options[get('media_type').selectedIndex].value;
- data.width = getVal('width');
- data.height = getVal('height');
-
- // Switch type based on extension
- src = getVal('src');
- if (field == 'src') {
- ext = src.replace(/^.*\.([^.]+)$/, '$1');
- if (typeInfo = mediaPlugin.getType(ext))
- data.type = typeInfo.name.toLowerCase();
-
- setVal('media_type', data.type);
- }
-
- if (data.type == "video" || data.type == "audio") {
- if (!data.video.sources)
- data.video.sources = [];
-
- data.video.sources[0] = {src: getVal('src')};
- }
- }
-
- // Hide all fieldsets and show the one active
- get('video_options').style.display = 'none';
- get('audio_options').style.display = 'none';
- get('flash_options').style.display = 'none';
- get('quicktime_options').style.display = 'none';
- get('shockwave_options').style.display = 'none';
- get('windowsmedia_options').style.display = 'none';
- get('realmedia_options').style.display = 'none';
- get('embeddedaudio_options').style.display = 'none';
-
- if (get(data.type + '_options'))
- get(data.type + '_options').style.display = 'block';
-
- setVal('media_type', data.type);
-
- setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars');
- setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc');
- setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign');
- setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume');
- setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks');
- setOptions('video', 'poster,autoplay,loop,muted,preload,controls');
- setOptions('audio', 'autoplay,loop,preload,controls');
- setOptions('embeddedaudio', 'autoplay,loop,controls');
- setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height');
-
- if (to_form) {
- if (data.type == 'video') {
- if (data.video.sources[0])
- setVal('src', data.video.sources[0].src);
-
- src = data.video.sources[1];
- if (src)
- setVal('video_altsource1', src.src);
-
- src = data.video.sources[2];
- if (src)
- setVal('video_altsource2', src.src);
- } else if (data.type == 'audio') {
- if (data.video.sources[0])
- setVal('src', data.video.sources[0].src);
-
- src = data.video.sources[1];
- if (src)
- setVal('audio_altsource1', src.src);
-
- src = data.video.sources[2];
- if (src)
- setVal('audio_altsource2', src.src);
- } else {
- // Check flash vars
- if (data.type == 'flash') {
- tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) {
- if (value == '$url')
- data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || '';
- });
- }
-
- setVal('src', data.params.src);
- }
- } else {
- src = getVal("src");
-
- // YouTube Embed
- if (src.match(/youtube\.com\/embed\/\w+/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- setVal('src', src);
- setVal('media_type', data.type);
- } else {
- // YouTube *NEW*
- if (src.match(/youtu\.be\/[a-z1-9.-_]+/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- // YouTube
- if (src.match(/youtube\.com(.+)v=([^&]+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
- }
- }
-
- // Google video
- if (src.match(/video\.google\.com(.+)docid=([^&]+)/)) {
- data.width = 425;
- data.height = 326;
- data.type = 'flash';
- src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en';
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- // Vimeo
- if (src.match(/vimeo\.com\/([0-9]+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://player.vimeo.com/video/' + src.match(/vimeo.com\/([0-9]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- // stream.cz
- if (src.match(/stream\.cz\/((?!object).)*\/([0-9]+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://www.stream.cz/object/' + src.match(/stream.cz\/[^/]+\/([0-9]+)/)[1];
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- // Google maps
- if (src.match(/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/)) {
- data.width = 425;
- data.height = 350;
- data.params.frameborder = '0';
- data.type = 'iframe';
- src = 'http://maps.google.com/maps/ms?msid=' + src.match(/msid=(.+)/)[1] + "&output=embed";
- setVal('src', src);
- setVal('media_type', data.type);
- }
-
- if (data.type == 'video') {
- if (!data.video.sources)
- data.video.sources = [];
-
- data.video.sources[0] = {src : src};
-
- src = getVal("video_altsource1");
- if (src)
- data.video.sources[1] = {src : src};
-
- src = getVal("video_altsource2");
- if (src)
- data.video.sources[2] = {src : src};
- } else if (data.type == 'audio') {
- if (!data.video.sources)
- data.video.sources = [];
-
- data.video.sources[0] = {src : src};
-
- src = getVal("audio_altsource1");
- if (src)
- data.video.sources[1] = {src : src};
-
- src = getVal("audio_altsource2");
- if (src)
- data.video.sources[2] = {src : src};
- } else
- data.params.src = src;
-
- // Set default size
- setVal('width', data.width || (data.type == 'audio' ? 300 : 320));
- setVal('height', data.height || (data.type == 'audio' ? 32 : 240));
- }
- },
-
- dataToForm : function() {
- this.moveStates(true);
- },
-
- formToData : function(field) {
- if (field == "width" || field == "height")
- this.changeSize(field);
-
- if (field == 'source') {
- this.moveStates(false, field);
- setVal('source', this.editor.plugins.media.dataToHtml(this.data));
- this.panel = 'source';
- } else {
- if (this.panel == 'source') {
- this.data = clone(this.editor.plugins.media.htmlToData(getVal('source')));
- this.dataToForm();
- this.panel = '';
- }
-
- this.moveStates(false, field);
- this.preview();
- }
- },
-
- beforeResize : function() {
- this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
- this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
- },
-
- changeSize : function(type) {
- var width, height, scale, size;
-
- if (get('constrain').checked) {
- width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
- height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
-
- if (type == 'width') {
- this.height = Math.round((width / this.width) * height);
- setVal('height', this.height);
- } else {
- this.width = Math.round((height / this.height) * width);
- setVal('width', this.width);
- }
- }
- },
-
- getMediaListHTML : function() {
- if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
- var html = "";
-
- html += '';
-
- return html;
- }
-
- return "";
- },
-
- getMediaTypeHTML : function(editor) {
- function option(media_type, element) {
- if (!editor.schema.getElementRule(element || media_type)) {
- return '';
- }
-
- return ''
- }
-
- var html = "";
-
- html += '';
- return html;
- },
-
- setDefaultDialogSettings : function(editor) {
- var defaultDialogSettings = editor.getParam("media_dialog_defaults", {});
- tinymce.each(defaultDialogSettings, function(v, k) {
- setVal(k, v);
- });
- }
- };
-
- tinyMCEPopup.requireLangPack();
- tinyMCEPopup.onInit.add(function() {
- Media.init();
- });
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/media/media.htm b/src/wp-includes/js/tinymce/plugins/media/media.htm
deleted file mode 100644
index 9a3684a36b..0000000000
--- a/src/wp-includes/js/tinymce/plugins/media/media.htm
+++ /dev/null
@@ -1,922 +0,0 @@
-
-
-
- {#media_dlg.title}
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/plugins/media/moxieplayer.swf b/src/wp-includes/js/tinymce/plugins/media/moxieplayer.swf
index 585d772d6d..19c771bea5 100644
Binary files a/src/wp-includes/js/tinymce/plugins/media/moxieplayer.swf and b/src/wp-includes/js/tinymce/plugins/media/moxieplayer.swf differ
diff --git a/src/wp-includes/js/tinymce/plugins/media/plugin.js b/src/wp-includes/js/tinymce/plugins/media/plugin.js
new file mode 100644
index 0000000000..d52680a37b
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/media/plugin.js
@@ -0,0 +1,654 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*jshint maxlen:255 */
+/*global tinymce:true */
+
+tinymce.PluginManager.add('media', function(editor, url) {
+ var urlPatterns = [
+ {regex: /youtu\.be\/([a-z1-9.-_]+)/, type: 'iframe', w: 425, h: 350, url: 'http://www.youtube.com/embed/$1'},
+ {regex: /youtube\.com(.+)v=([^&]+)/, type: 'iframe', w: 425, h: 350, url: 'http://www.youtube.com/embed/$2'},
+ {regex: /vimeo\.com\/([0-9]+)/, type: 'iframe', w: 425, h: 350, url: 'http://player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc'},
+ {regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/, type: 'iframe', w: 425, h: 350, url: 'http://maps.google.com/maps/ms?msid=$2&output=embed"'}
+ ];
+
+ function guessMime(url) {
+ if (url.indexOf('.mp3') != -1) {
+ return 'audio/mpeg';
+ }
+
+ if (url.indexOf('.wav') != -1) {
+ return 'audio/wav';
+ }
+
+ if (url.indexOf('.mp4') != -1) {
+ return 'video/mp4';
+ }
+
+ if (url.indexOf('.webm') != -1) {
+ return 'video/webm';
+ }
+
+ if (url.indexOf('.ogg') != -1) {
+ return 'video/ogg';
+ }
+
+ if (url.indexOf('.swf') != -1) {
+ return 'application/x-shockwave-flash';
+ }
+
+ return '';
+ }
+
+ function getVideoScriptMatch(src) {
+ var prefixes = editor.settings.media_scripts;
+
+ if (prefixes) {
+ for (var i = 0; i < prefixes.length; i++) {
+ if (src.indexOf(prefixes[i].filter) !== -1) {
+ return prefixes[i];
+ }
+ }
+ }
+ }
+
+ function showDialog() {
+ var win, width, height, data;
+
+ function recalcSize(e) {
+ var widthCtrl, heightCtrl, newWidth, newHeight;
+
+ widthCtrl = win.find('#width')[0];
+ heightCtrl = win.find('#height')[0];
+
+ newWidth = widthCtrl.value();
+ newHeight = heightCtrl.value();
+
+ if (win.find('#constrain')[0].checked() && width && height && newWidth && newHeight) {
+ if (e.control == widthCtrl) {
+ newHeight = Math.round((newWidth / width) * newHeight);
+ heightCtrl.value(newHeight);
+ } else {
+ newWidth = Math.round((newHeight / height) * newWidth);
+ widthCtrl.value(newWidth);
+ }
+ }
+
+ width = newWidth;
+ height = newHeight;
+ }
+
+ data = getData(editor.selection.getNode());
+ width = data.width;
+ height = data.height;
+
+ win = editor.windowManager.open({
+ title: 'Insert/edit video',
+ data: data,
+ bodyType: 'tabpanel',
+ body: [
+ {
+ title: 'General',
+ type: "form",
+ onShowTab: function() {
+ data = htmlToData(this.next().find('#embed').value());
+ this.fromJSON(data);
+ },
+ items: [
+ {name: 'source1', type: 'filepicker', filetype: 'media', size: 40, autofocus: true, label: 'Source'},
+ {name: 'source2', type: 'filepicker', filetype: 'media', size: 40, label: 'Alternative source'},
+ {name: 'poster', type: 'filepicker', filetype: 'image', size: 40, label: 'Poster'},
+ {
+ type: 'container',
+ label: 'Dimensions',
+ layout: 'flex',
+ align: 'center',
+ spacing: 5,
+ items: [
+ {name: 'width', type: 'textbox', maxLength: 3, size: 3, onchange: recalcSize},
+ {type: 'label', text: 'x'},
+ {name: 'height', type: 'textbox', maxLength: 3, size: 3, onchange: recalcSize},
+ {name: 'constrain', type: 'checkbox', checked: true, text: 'Constrain proportions'}
+ ]
+ }
+ ]
+ },
+
+ {
+ title: 'Embed',
+ type: "panel",
+ layout: 'flex',
+ direction: 'column',
+ align: 'stretch',
+ padding: 10,
+ spacing: 10,
+ onShowTab: function() {
+ this.find('#embed').value(dataToHtml(this.parent().toJSON()));
+ },
+ items: [
+ {
+ type: 'label',
+ text: 'Paste your embed code below:'
+ },
+ {
+ type: 'textbox',
+ flex: 1,
+ name: 'embed',
+ value: getSource(),
+ multiline: true,
+ label: 'Source'
+ }
+ ]
+ }
+ ],
+ onSubmit: function() {
+ editor.insertContent(dataToHtml(this.toJSON()));
+ }
+ });
+ }
+
+ function getSource() {
+ var elm = editor.selection.getNode();
+
+ if (elm.getAttribute('data-mce-object')) {
+ return editor.selection.getContent();
+ }
+ }
+
+ function dataToHtml(data) {
+ var html = '';
+
+ if (!data.source1) {
+ tinymce.extend(data, htmlToData(data.embed));
+ if (!data.source1) {
+ return '';
+ }
+ }
+
+ data.source1 = editor.convertURL(data.source1, "source");
+ data.source2 = editor.convertURL(data.source2, "source");
+ data.source1mime = guessMime(data.source1);
+ data.source2mime = guessMime(data.source2);
+ data.poster = editor.convertURL(data.poster, "poster");
+ data.flashPlayerUrl = editor.convertURL(url + '/moxieplayer.swf', "movie");
+
+ if (data.embed) {
+ html = updateHtml(data.embed, data, true);
+ } else {
+ tinymce.each(urlPatterns, function(pattern) {
+ var match, i, url;
+
+ if ((match = pattern.regex.exec(data.source1))) {
+ url = pattern.url;
+
+ for (i = 0; match[i]; i++) {
+ /*jshint loopfunc:true*/
+ url = url.replace('$' + i, function() {
+ return match[i];
+ });
+ }
+
+ data.source1 = url;
+ data.type = pattern.type;
+ data.width = pattern.w;
+ data.height = pattern.h;
+ }
+ });
+
+ var videoScript = getVideoScriptMatch(data.source1);
+ if (videoScript) {
+ data.type = 'script';
+ data.width = videoScript.width;
+ data.height = videoScript.height;
+ }
+
+ data.width = data.width || 300;
+ data.height = data.height || 150;
+
+ tinymce.each(data, function(value, key) {
+ data[key] = editor.dom.encode(value);
+ });
+
+ if (data.type == "iframe") {
+ html += '';
+ } else if (data.source1mime == "application/x-shockwave-flash") {
+ html += '';
+ } else if (data.source1mime.indexOf('audio') != -1) {
+ if (editor.settings.audio_template_callback) {
+ html = editor.settings.audio_template_callback(data);
+ } else {
+ html += (
+ ''
+ );
+ }
+ } else if (data.type == "script") {
+ html += '';
+ } else {
+ if (editor.settings.video_template_callback) {
+ html = editor.settings.video_template_callback(data);
+ } else {
+ html = (
+ ''
+ );
+ }
+ }
+ }
+
+ return html;
+ }
+
+ function htmlToData(html) {
+ var data = {};
+
+ new tinymce.html.SaxParser({
+ validate: false,
+ allow_conditional_comments: true,
+ special: 'script,noscript',
+ start: function(name, attrs) {
+ if (!data.source1 && name == "param") {
+ data.source1 = attrs.map.movie;
+ }
+
+ if (name == "iframe" || name == "object" || name == "embed" || name == "video" || name == "audio") {
+ if (!data.type) {
+ data.type = name;
+ }
+
+ data = tinymce.extend(attrs.map, data);
+ }
+
+ if (name == "script") {
+ var videoScript = getVideoScriptMatch(attrs.map.src);
+ if (!videoScript) {
+ return;
+ }
+
+ data = {
+ type: "script",
+ source1: attrs.map.src,
+ width: videoScript.width,
+ height: videoScript.height
+ };
+ }
+
+ if (name == "source") {
+ if (!data.source1) {
+ data.source1 = attrs.map.src;
+ } else if (!data.source2) {
+ data.source2 = attrs.map.src;
+ }
+ }
+
+ if (name == "img" && !data.poster) {
+ data.poster = attrs.map.src;
+ }
+ }
+ }).parse(html);
+
+ data.source1 = data.source1 || data.src || data.data;
+ data.source2 = data.source2 || '';
+ data.poster = data.poster || '';
+
+ return data;
+ }
+
+ function getData(element) {
+ if (element.getAttribute('data-mce-object')) {
+ return htmlToData(editor.serializer.serialize(element, {selection: true}));
+ }
+
+ return {};
+ }
+
+ function updateHtml(html, data, updateAll) {
+ var writer = new tinymce.html.Writer();
+ var sourceCount = 0, hasImage;
+
+ function setAttributes(attrs, updatedAttrs) {
+ var name, i, value, attr;
+
+ for (name in updatedAttrs) {
+ value = "" + updatedAttrs[name];
+
+ if (attrs.map[name]) {
+ i = attrs.length;
+ while (i--) {
+ attr = attrs[i];
+
+ if (attr.name == name) {
+ if (value) {
+ attrs.map[name] = value;
+ attr.value = value;
+ } else {
+ delete attrs.map[name];
+ attrs.splice(i, 1);
+ }
+ }
+ }
+ } else if (value) {
+ attrs.push({
+ name: name,
+ value: value
+ });
+
+ attrs.map[name] = value;
+ }
+ }
+ }
+
+ new tinymce.html.SaxParser({
+ validate: false,
+ allow_conditional_comments: true,
+ special: 'script,noscript',
+
+ comment: function(text) {
+ writer.comment(text);
+ },
+
+ cdata: function(text) {
+ writer.cdata(text);
+ },
+
+ text: function(text, raw) {
+ writer.text(text, raw);
+ },
+
+ start: function(name, attrs, empty) {
+ switch (name) {
+ case "video":
+ case "object":
+ case "embed":
+ case "img":
+ case "iframe":
+ setAttributes(attrs, {
+ width: data.width,
+ height: data.height
+ });
+ break;
+ }
+
+ if (updateAll) {
+ switch (name) {
+ case "video":
+ setAttributes(attrs, {
+ poster: data.poster,
+ src: ""
+ });
+
+ if (data.source2) {
+ setAttributes(attrs, {
+ src: ""
+ });
+ }
+ break;
+
+ case "iframe":
+ setAttributes(attrs, {
+ src: data.source1
+ });
+ break;
+
+ case "source":
+ sourceCount++;
+
+ if (sourceCount <= 2) {
+ setAttributes(attrs, {
+ src: data["source" + sourceCount],
+ type: data["source" + sourceCount + "mime"]
+ });
+
+ if (!data["source" + sourceCount]) {
+ return;
+ }
+ }
+ break;
+
+ case "img":
+ if (!data.poster) {
+ return;
+ }
+
+ hasImage = true;
+ break;
+ }
+ }
+
+ writer.start(name, attrs, empty);
+ },
+
+ end: function(name) {
+ if (name == "video" && updateAll) {
+ for (var index = 1; index <= 2; index++) {
+ if (data["source" + index]) {
+ var attrs = [];
+ attrs.map = {};
+
+ if (sourceCount < index) {
+ setAttributes(attrs, {
+ src: data["source" + index],
+ type: data["source" + index + "mime"]
+ });
+
+ writer.start("source", attrs, true);
+ }
+ }
+ }
+ }
+
+ if (data.poster && name == "object" && updateAll && !hasImage) {
+ var imgAttrs = [];
+ imgAttrs.map = {};
+
+ setAttributes(imgAttrs, {
+ src: data.poster,
+ width: data.width,
+ height: data.height
+ });
+
+ writer.start("img", imgAttrs, true);
+ }
+
+ writer.end(name);
+ }
+ }, new tinymce.html.Schema({})).parse(html);
+
+ return writer.getContent();
+ }
+
+ editor.on('ResolveName', function(e) {
+ var name;
+
+ if (e.target.nodeType == 1 && (name = e.target.getAttribute("data-mce-object"))) {
+ e.name = name;
+ }
+ });
+
+ editor.on('preInit', function() {
+ // Make sure that any messy HTML is retained inside these
+ var specialElements = editor.schema.getSpecialElements();
+ tinymce.each('video audio iframe object'.split(' '), function(name) {
+ specialElements[name] = new RegExp('<\/' + name + '[^>]*>','gi');
+ });
+
+ // Allow elements
+ editor.schema.addValidElements('object[id|style|width|height|classid|codebase|*],embed[id|style|width|height|type|src|*],video[*],audio[*]');
+
+ // Set allowFullscreen attribs as boolean
+ var boolAttrs = editor.schema.getBoolAttrs();
+ tinymce.each('webkitallowfullscreen mozallowfullscreen allowfullscreen'.split(' '), function(name) {
+ boolAttrs[name] = {};
+ });
+
+ // Converts iframe, video etc into placeholder images
+ editor.parser.addNodeFilter('iframe,video,audio,object,embed,script', function(nodes, name) {
+ var i = nodes.length, ai, node, placeHolder, attrName, attrValue, attribs, innerHtml;
+ var videoScript;
+
+ while (i--) {
+ node = nodes[i];
+
+ if (node.name == 'script') {
+ videoScript = getVideoScriptMatch(node.attr('src'));
+ if (!videoScript) {
+ continue;
+ }
+ }
+
+ placeHolder = new tinymce.html.Node('img', 1);
+ placeHolder.shortEnded = true;
+
+ if (videoScript) {
+ if (videoScript.width) {
+ node.attr('width', videoScript.width.toString());
+ }
+
+ if (videoScript.height) {
+ node.attr('height', videoScript.height.toString());
+ }
+ }
+
+ // Prefix all attributes except width, height and style since we
+ // will add these to the placeholder
+ attribs = node.attributes;
+ ai = attribs.length;
+ while (ai--) {
+ attrName = attribs[ai].name;
+ attrValue = attribs[ai].value;
+
+ if (attrName !== "width" && attrName !== "height" && attrName !== "style") {
+ if (attrName == "data" || attrName == "src") {
+ attrValue = editor.convertURL(attrValue, attrName);
+ }
+
+ placeHolder.attr('data-mce-p-' + attrName, attrValue);
+ }
+ }
+
+ // Place the inner HTML contents inside an escaped attribute
+ // This enables us to copy/paste the fake object
+ innerHtml = node.firstChild && node.firstChild.value;
+ if (innerHtml) {
+ placeHolder.attr("data-mce-html", escape(innerHtml));
+ placeHolder.firstChild = null;
+ }
+
+ placeHolder.attr({
+ width: node.attr('width') || "300",
+ height: node.attr('height') || (name == "audio" ? "30" : "150"),
+ style: node.attr('style'),
+ src: tinymce.Env.transparentSrc,
+ "data-mce-object": name,
+ "class": "mce-object mce-object-" + name
+ });
+
+ node.replace(placeHolder);
+ }
+ });
+
+ // Replaces placeholder images with real elements for video, object, iframe etc
+ editor.serializer.addAttributeFilter('data-mce-object', function(nodes, name) {
+ var i = nodes.length, node, realElm, ai, attribs, innerHtml, innerNode, realElmName;
+
+ while (i--) {
+ node = nodes[i];
+ realElmName = node.attr(name);
+ realElm = new tinymce.html.Node(realElmName, 1);
+
+ // Add width/height to everything but audio
+ if (realElmName != "audio" && realElmName != "script") {
+ realElm.attr({
+ width: node.attr('width'),
+ height: node.attr('height')
+ });
+ }
+
+ realElm.attr({
+ style: node.attr('style')
+ });
+
+ // Unprefix all placeholder attributes
+ attribs = node.attributes;
+ ai = attribs.length;
+ while (ai--) {
+ var attrName = attribs[ai].name;
+
+ if (attrName.indexOf('data-mce-p-') === 0) {
+ realElm.attr(attrName.substr(11), attribs[ai].value);
+ }
+ }
+
+ if (realElmName == "script") {
+ realElm.attr('type', 'text/javascript');
+ }
+
+ // Inject innerhtml
+ innerHtml = node.attr('data-mce-html');
+ if (innerHtml) {
+ innerNode = new tinymce.html.Node('#text', 3);
+ innerNode.raw = true;
+ innerNode.value = unescape(innerHtml);
+ realElm.append(innerNode);
+ }
+
+ node.replace(realElm);
+ }
+ });
+ });
+
+ editor.on('ObjectSelected', function(e) {
+ var objectType = e.target.getAttribute('data-mce-object');
+
+ if (objectType == "audio" || objectType == "script") {
+ e.preventDefault();
+ }
+ });
+
+ editor.on('objectResized', function(e) {
+ var target = e.target, html;
+
+ if (target.getAttribute('data-mce-object')) {
+ html = target.getAttribute('data-mce-html');
+ if (html) {
+ html = unescape(html);
+ target.setAttribute('data-mce-html', escape(
+ updateHtml(html, {
+ width: e.width,
+ height: e.height
+ })
+ ));
+ }
+ }
+ });
+
+ editor.addButton('media', {
+ tooltip: 'Insert/edit video',
+ onclick: showDialog,
+ stateSelector: 'img[data-mce-object=video]'
+ });
+
+ editor.addMenuItem('media', {
+ icon: 'media',
+ text: 'Insert video',
+ onclick: showDialog,
+ context: 'insert',
+ prependToContext: true
+ });
+});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/media/plugin.min.js b/src/wp-includes/js/tinymce/plugins/media/plugin.min.js
new file mode 100644
index 0000000000..ae30bfd1e4
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/media/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("media",function(e,t){function i(e){return-1!=e.indexOf(".mp3")?"audio/mpeg":-1!=e.indexOf(".wav")?"audio/wav":-1!=e.indexOf(".mp4")?"video/mp4":-1!=e.indexOf(".webm")?"video/webm":-1!=e.indexOf(".ogg")?"video/ogg":-1!=e.indexOf(".swf")?"application/x-shockwave-flash":""}function r(t){var i=e.settings.media_scripts;if(i)for(var r=0;r':"application/x-shockwave-flash"==a.source1mime?(o+='"):-1!=a.source1mime.indexOf("audio")?e.settings.audio_template_callback?o=e.settings.audio_template_callback(a):o+='":"script"==a.type?o+='':o=e.settings.video_template_callback?e.settings.video_template_callback(a):'"}return o}function n(e){var t={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(e,i){if(t.source1||"param"!=e||(t.source1=i.map.movie),("iframe"==e||"object"==e||"embed"==e||"video"==e||"audio"==e)&&(t.type||(t.type=e),t=tinymce.extend(i.map,t)),"script"==e){var a=r(i.map.src);if(!a)return;t={type:"script",source1:i.map.src,width:a.width,height:a.height}}"source"==e&&(t.source1?t.source2||(t.source2=i.map.src):t.source1=i.map.src),"img"!=e||t.poster||(t.poster=i.map.src)}}).parse(e),t.source1=t.source1||t.src||t.data,t.source2=t.source2||"",t.poster=t.poster||"",t}function s(t){return t.getAttribute("data-mce-object")?n(e.serializer.serialize(t,{selection:!0})):{}}function m(e,t,i){function r(e,t){var i,r,a,o;for(i in t)if(a=""+t[i],e.map[i])for(r=e.length;r--;)o=e[r],o.name==i&&(a?(e.map[i]=a,o.value=a):(delete e.map[i],e.splice(r,1)));else a&&(e.push({name:i,value:a}),e.map[i]=a)}var a,o=new tinymce.html.Writer,c=0;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",comment:function(e){o.comment(e)},cdata:function(e){o.cdata(e)},text:function(e,t){o.text(e,t)},start:function(e,n,s){switch(e){case"video":case"object":case"embed":case"img":case"iframe":r(n,{width:t.width,height:t.height})}if(i)switch(e){case"video":r(n,{poster:t.poster,src:""}),t.source2&&r(n,{src:""});break;case"iframe":r(n,{src:t.source1});break;case"source":if(c++,2>=c&&(r(n,{src:t["source"+c],type:t["source"+c+"mime"]}),!t["source"+c]))return;break;case"img":if(!t.poster)return;a=!0}o.start(e,n,s)},end:function(e){if("video"==e&&i)for(var n=1;2>=n;n++)if(t["source"+n]){var s=[];s.map={},n>c&&(r(s,{src:t["source"+n],type:t["source"+n+"mime"]}),o.start("source",s,!0))}if(t.poster&&"object"==e&&i&&!a){var m=[];m.map={},r(m,{src:t.poster,width:t.width,height:t.height}),o.start("img",m,!0)}o.end(e)}},new tinymce.html.Schema({})).parse(e),o.getContent()}var d=[{regex:/youtu\.be\/([a-z1-9.-_]+)/,type:"iframe",w:425,h:350,url:"http://www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"http://www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"http://player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'http://maps.google.com/maps/ms?msid=$2&output=embed"'}];e.on("ResolveName",function(e){var t;1==e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),e.on("preInit",function(){var t=e.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp(""+e+"[^>]*>","gi")}),e.schema.addValidElements("object[id|style|width|height|classid|codebase|*],embed[id|style|width|height|type|src|*],video[*],audio[*]");var i=e.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){i[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(t,i){for(var a,o,c,n,s,m,d,u,l=t.length;l--;)if(o=t[l],"script"!=o.name||(u=r(o.attr("src")))){for(c=new tinymce.html.Node("img",1),c.shortEnded=!0,u&&(u.width&&o.attr("width",u.width.toString()),u.height&&o.attr("height",u.height.toString())),m=o.attributes,a=m.length;a--;)n=m[a].name,s=m[a].value,"width"!==n&&"height"!==n&&"style"!==n&&(("data"==n||"src"==n)&&(s=e.convertURL(s,n)),c.attr("data-mce-p-"+n,s));d=o.firstChild&&o.firstChild.value,d&&(c.attr("data-mce-html",escape(d)),c.firstChild=null),c.attr({width:o.attr("width")||"300",height:o.attr("height")||("audio"==i?"30":"150"),style:o.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":i,"class":"mce-object mce-object-"+i}),o.replace(c)}}),e.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var i,r,a,o,c,n,s,m=e.length;m--;){for(i=e[m],s=i.attr(t),r=new tinymce.html.Node(s,1),"audio"!=s&&"script"!=s&&r.attr({width:i.attr("width"),height:i.attr("height")}),r.attr({style:i.attr("style")}),o=i.attributes,a=o.length;a--;){var d=o[a].name;0===d.indexOf("data-mce-p-")&&r.attr(d.substr(11),o[a].value)}"script"==s&&r.attr("type","text/javascript"),c=i.attr("data-mce-html"),c&&(n=new tinymce.html.Node("#text",3),n.raw=!0,n.value=unescape(c),r.append(n)),i.replace(r)}})}),e.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");("audio"==t||"script"==t)&&e.preventDefault()}),e.on("objectResized",function(e){var t,i=e.target;i.getAttribute("data-mce-object")&&(t=i.getAttribute("data-mce-html"),t&&(t=unescape(t),i.setAttribute("data-mce-html",escape(m(t,{width:e.width,height:e.height})))))}),e.addButton("media",{tooltip:"Insert/edit video",onclick:a,stateSelector:"img[data-mce-object=video]"}),e.addMenuItem("media",{icon:"media",text:"Insert video",onclick:a,context:"insert",prependToContext:!0})});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/paste/editor_plugin.js b/src/wp-includes/js/tinymce/plugins/paste/editor_plugin.js
deleted file mode 100644
index 0ab05ebbb6..0000000000
--- a/src/wp-includes/js/tinymce/plugins/paste/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",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:"450",paste_dialog_height:"400",paste_max_consecutive_linebreaks:2,paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"
")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u=""+o.encode(r).replace(/\r?\n\r?\n/g,"
").replace(/\r?\n/g,"
")+"
"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._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+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(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)/.test(e.content)){d([[/(?:
[\s\r\n]+|
)*(<\/?(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)[^>]*>)(?:
[\s\r\n]+|
)*/g,"$1"]]);d([[/
/g,"
"],[/
/g," "],[/
/g,"
"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |
]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"
$1
")}if(b(k,"paste_convert_middot_lists")){d([[//gi,"$&__MCE_ITEM__"],[/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}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(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/]*>/gi,""],[/<\/h[1-6][^>]*>/gi,"
"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(j){var h=this.editor,f=b(h,"paste_text_linebreaktype"),k=b(h,"paste_text_replacements"),g=tinymce.is;function e(m){c(m,function(n){if(n.constructor==RegExp){j=j.replace(n,"")}else{j=j.replace(n[0],n[1])}})}if((typeof(j)==="string")&&(j.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(j)){e([/[\n\r]+/g])}else{e([/\r+/g])}e([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/
]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"]]);var d=Number(b(h,"paste_max_consecutive_linebreaks"));if(d>-1){var l=new RegExp("\n{"+(d+1)+",}","g");var i="";while(i.length "]])}else{if(f=="p"){e([[/\n+/g,"
"],[/^(.*<\/p>)(
)$/,"
$1"]])}else{e([[/\n\n/g,"
"],[/^(.*<\/p>)(
)$/,"
$1"],[/\n/g,"
"]])}}}h.execCommand("mceInsertContent",false,j)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js
deleted file mode 100644
index c8230e9c9b..0000000000
--- a/src/wp-includes/js/tinymce/plugins/paste/editor_plugin_src.js
+++ /dev/null
@@ -1,885 +0,0 @@
-/**
- * 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 : "none",
- paste_strip_class_attributes : "mso",
- 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 : "450",
- paste_dialog_height : "400",
- paste_max_consecutive_linebreaks: 2,
- paste_text_use_dialog : false,
- paste_text_sticky : false,
- paste_text_sticky_default : false,
- paste_text_notifyalways : false,
- paste_text_linebreaktype : "combined",
- paste_text_replacements : [
- [/\u2026/g, "..."],
- [/[\x93\x94\u201c\u201d]/g, '"'],
- [/[\x60\x91\x92\u2018\u2019]/g, "'"]
- ]
- };
-
- 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) && e.keyCode == 86) || (e.shiftKey && 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 && rng.startContainer.nodeType == 3) {
- // Is only one block node and it doesn't contain word stuff
- if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && 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) && (ed.pasteAsPlainText)) {
- t._insertPlainText(o.content);
-
- if (!getParam(ed, "paste_text_sticky")) {
- ed.pasteAsPlainText = false;
- ed.controlManager.setActive("pastetext", false);
- }
- } else {
- t._insert(o.content);
- }
- }
-
- // Add command for external usage
- ed.addCommand('mceInsertClipboardContent', function(u, o) {
- process(o, true);
- });
-
- if (!getParam(ed, "paste_text_use_dialog")) {
- ed.addCommand('mcePasteText', function(u, v) {
- var cookie = tinymce.util.Cookie;
-
- ed.pasteAsPlainText = !ed.pasteAsPlainText;
- ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
-
- if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
- if (getParam(ed, "paste_text_sticky")) {
- ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
- } else {
- ed.windowManager.alert(ed.translate('paste.plaintext_mode'));
- }
-
- if (!getParam(ed, "paste_text_notifyalways")) {
- cookie.set("tinymcePasteText", "1", 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, '
')});
- 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 > 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 && child.nodeName == 'DIV' && child.style.marginTop && 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 = '
' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '
').replace(/\r?\n/g, '
') + '
';
- }
-
- // 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, "paste_auto_cleanup_on_paste")) {
- // 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) && e.keyCode == 86) || (e.shiftKey && 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("pastetext", ed.pasteAsPlainText);
-
- // Block all drag/drop events
- if (getParam(ed, "paste_block_drop")) {
- 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 + "." + 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 && document.documentMode >= 9 && /<(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)/.test(o.content)) {
- // IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
- process([[/(?:
[\s\r\n]+|
)*(<\/?(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)[^>]*>)(?:
[\s\r\n]+|
)*/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([
- [/
/g, '
'], // Replace multiple BR elements with uppercase BR to keep them intact
- [/
/g, ' '], // Replace single br elements with space since they are word wrap BR:s
- [/
/g, '
'] // Replace back the double brs but into a single BR
- ]);
- }
-
- // Detect Word content and process it more aggressive
- if (/class="?Mso|style="[^"]*\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*( )+/gi, // entities at the start of contents
- /( |
]*>)+\s*$/gi // entities at the end of contents
- ]);
-
- if (getParam(ed, "paste_convert_headers_to_strong")) {
- h = h.replace(/]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "
$1
");
- }
-
- if (getParam(ed, "paste_convert_middot_lists")) {
- process([
- [//gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
- [/(]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers
- [/(]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF)
- ]);
- }
-
- process([
- // Word comments like conditional comments etc
- //gi,
-
- // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
- /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
-
- // Convert into for line-though
- [/<(\/?)s>/gi, "<$1strike>"],
-
- // Replace nsbp entites to char since it's easier to handle
- [/ /gi, "\u00a0"]
- ]);
-
- // 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(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
- } while (len != h.length);
-
- // Remove all spans if no styles is to be retained
- if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
- h = h.replace(/<\/?span[^>]*>/gi, "");
- } else {
- // We're keeping styles, so at least clean them up.
- // CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
-
- process([
- // Convert ___ to string of alternating breaking/non-breaking spaces of same length
- [/([\s\u00a0]*)<\/span>/gi,
- function(str, spaces) {
- return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
- }
- ],
-
- // Examine all styles: delete junk, transform some, and keep the rest
- [/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
- function(str, tag, style) {
- var n = [],
- i = 0,
- s = explode(trim(style).replace(/"/gi, "'"), ";");
-
- // Examine each style definition within the tag's style attribute
- each(s, function(v) {
- var name, value,
- parts = explode(v, ":");
-
- function ensureUnits(v) {
- return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
- }
-
- if (parts.length == 2) {
- name = parts[0].toLowerCase();
- value = parts[1].toLowerCase();
-
- // Translate certain MS Office styles into their CSS equivalents
- switch (name) {
- case "mso-padding-alt":
- case "mso-padding-top-alt":
- case "mso-padding-right-alt":
- case "mso-padding-bottom-alt":
- case "mso-padding-left-alt":
- case "mso-margin-alt":
- case "mso-margin-top-alt":
- case "mso-margin-right-alt":
- case "mso-margin-bottom-alt":
- case "mso-margin-left-alt":
- case "mso-table-layout-alt":
- case "mso-height":
- case "mso-width":
- case "mso-vertical-align-alt":
- n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
- return;
-
- case "horiz-align":
- n[i++] = "text-align:" + value;
- return;
-
- case "vert-align":
- n[i++] = "vertical-align:" + value;
- return;
-
- case "font-color":
- case "mso-foreground":
- n[i++] = "color:" + value;
- return;
-
- case "mso-background":
- case "mso-highlight":
- n[i++] = "background:" + value;
- return;
-
- case "mso-default-height":
- n[i++] = "min-height:" + ensureUnits(value);
- return;
-
- case "mso-default-width":
- n[i++] = "min-width:" + ensureUnits(value);
- return;
-
- case "mso-padding-between-alt":
- n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
- return;
-
- case "text-line-through":
- if ((value == "single") || (value == "double")) {
- n[i++] = "text-decoration:line-through";
- }
- return;
-
- case "mso-zero-height":
- if (value == "yes") {
- n[i++] = "display:none";
- }
- 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 + ":" + 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 > 0) {
- return tag + ' style="' + n.join(';') + '"';
- } else {
- return tag;
- }
- }
- ]
- ]);
- }
- }
-
- // Replace headers with
- if (getParam(ed, "paste_convert_headers_to_strong")) {
- process([
- [/]*>/gi, ""],
- [/<\/h[1-6][^>]*>/gi, "
"]
- ]);
- }
-
- 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 ("none"), remove all ("all"), or remove only those starting with mso ("mso").
- // Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
- stripClass = getParam(ed, "paste_strip_class_attributes");
-
- if (stripClass !== "none") {
- function removeClasses(match, g1) {
- if (stripClass === "all")
- return '';
-
- var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
- function(v) {
- return (/^(?!mso)/i.test(v));
- }
- );
-
- return cls.length ? ' class="' + cls.join(" ") + '"' : '';
- };
-
- h = h.replace(/ class="([^"]+)"/gi, removeClasses);
- h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
- }
-
- // Remove spans option
- if (getParam(ed, "paste_remove_spans")) {
- h = h.replace(/<\/?span[^>]*>/gi, "");
- }
-
- //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, "paste_convert_middot_lists")) {
- t._convertLists(pl, o);
- }
-
- // Process styles
- styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
-
- // Process only if a string was specified and not equal to "all" or "*"
- if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
- styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
-
- // 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 < 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 && npc > 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' && !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, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && 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
it will become
- // 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 && sib.nodeType == 3; sib = sib.nextSibling)
- val += sib.nodeValue;
-
- val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /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
- if (type) {
- margin = parseFloat(p.style.marginLeft || 0);
-
- if (margin > lastMargin)
- levels.push(margin);
-
- if (!listElm || type != lastType) {
- listElm = dom.create(type);
- dom.insertAfter(listElm, p);
- } else {
- // Nested list element
- if (margin > lastMargin) {
- listElm = li.appendChild(dom.create(type));
- } else if (margin < 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(/<\/?\w+[^>]*>/gi, '');
-
- // Remove span with the middot or the number
- if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
- dom.remove(span);
- else if (/^__MCE_ITEM__[\s\S]*\w+\.( |\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*( |\u00a0)+\s*/, '');
- else
- html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\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() && 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, "paste_text_linebreaktype"),
- rl = getParam(ed, "paste_text_replacements"),
- is = tinymce.is;
-
- function process(items) {
- each(items, function(v) {
- if (v.constructor == RegExp)
- content = content.replace(v, "");
- else
- content = content.replace(v[0], v[1]);
- });
- };
-
- if ((typeof(content) === "string") && (content.length > 0)) {
- // If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
- if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) {
- process([
- /[\n\r]+/g
- ]);
- } else {
- // Otherwise just get rid of carriage returns (only need linefeeds)
- process([
- /\r+/g
- ]);
- }
-
- process([
- [/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
- [/
]*>|<\/tr>/gi, "\n"], // Single linebreak for
tags and table rows
- [/<\/t[dh]>\s*]*>/gi, "\t"], // Table cells get tabs betweem them
- /<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
- [/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
- [/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"] // Cool little RegExp deletes whitespace around linebreak chars.
- ]);
-
- var maxLinebreaks = Number(getParam(ed, "paste_max_consecutive_linebreaks"));
- if (maxLinebreaks > -1) {
- var maxLinebreaksRegex = new RegExp("\n{" + (maxLinebreaks + 1) + ",}", "g");
- var linebreakReplacement = "";
-
- while (linebreakReplacement.length < maxLinebreaks) {
- linebreakReplacement += "\n";
- }
-
- process([
- [maxLinebreaksRegex, linebreakReplacement] // Limit max consecutive linebreaks
- ]);
- }
-
- content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));
-
- // Perform default or custom replacements
- if (is(rl, "array")) {
- process(rl);
- } else if (is(rl, "string")) {
- process(new RegExp(rl, "gi"));
- }
-
- // Treat paragraphs as specified in the config
- if (linebr == "none") {
- // Convert all line breaks to space
- process([
- [/\n+/g, " "]
- ]);
- } else if (linebr == "br") {
- // Convert all line breaks to
- process([
- [/\n/g, "
"]
- ]);
- } else if (linebr == "p") {
- // Convert all line breaks to ...
- process([
- [/\n+/g, "
"],
- [/^(.*<\/p>)(
)$/, '
$1']
- ]);
- } else {
- // defaults to "combined"
- // Convert single line breaks to
and double line breaks to
...
- process([
- [/\n\n/g, ""],
- [/^(.*<\/p>)(
)$/, '
$1'],
- [/\n/g, "
"]
- ]);
- }
-
- 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("mcePasteWord", function() {
- ed.windowManager.open({
- file: t.url + "/pasteword.htm",
- width: parseInt(getParam(ed, "paste_dialog_width")),
- height: parseInt(getParam(ed, "paste_dialog_height")),
- inline: 1
- });
- });
-
- if (getParam(ed, "paste_text_use_dialog")) {
- ed.addCommand("mcePasteText", function() {
- ed.windowManager.open({
- file : t.url + "/pastetext.htm",
- width: parseInt(getParam(ed, "paste_dialog_width")),
- height: parseInt(getParam(ed, "paste_dialog_height")),
- inline : 1
- });
- });
- }
-
- // Register button for backwards compatibility
- ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/paste/js/pastetext.js b/src/wp-includes/js/tinymce/plugins/paste/js/pastetext.js
deleted file mode 100644
index 81b1d6a01e..0000000000
--- a/src/wp-includes/js/tinymce/plugins/paste/js/pastetext.js
+++ /dev/null
@@ -1,36 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var PasteTextDialog = {
- init : function() {
- this.resize();
- },
-
- insert : function() {
- var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
-
- // Convert linebreaks into paragraphs
- if (document.getElementById('linebreaks').checked) {
- lines = h.split(/\r?\n/);
- if (lines.length > 1) {
- h = '';
- tinymce.each(lines, function(row) {
- h += '
' + row + '
';
- });
- }
- }
-
- tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
- tinyMCEPopup.close();
- },
-
- resize : function() {
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
-
- el = document.getElementById('content');
-
- el.style.width = (vp.w - 20) + 'px';
- el.style.height = (vp.h - 90) + 'px';
- }
-};
-
-tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
diff --git a/src/wp-includes/js/tinymce/plugins/paste/js/pasteword.js b/src/wp-includes/js/tinymce/plugins/paste/js/pasteword.js
deleted file mode 100644
index 959bf3992d..0000000000
--- a/src/wp-includes/js/tinymce/plugins/paste/js/pasteword.js
+++ /dev/null
@@ -1,51 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var PasteWordDialog = {
- init : function() {
- var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = '';
-
- // Create iframe
- el.innerHTML = '';
- ifr = document.getElementById('iframe');
- doc = ifr.contentWindow.document;
-
- // Force absolute CSS urls
- css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")];
- css = css.concat(tinymce.explode(ed.settings.content_css) || []);
- tinymce.each(css, function(u) {
- cssHTML += '';
- });
-
- // Write content into iframe
- doc.open();
- doc.write('' + cssHTML + '');
- doc.close();
-
- doc.designMode = 'on';
- this.resize();
-
- window.setTimeout(function() {
- ifr.contentWindow.focus();
- }, 10);
- },
-
- insert : function() {
- var h = document.getElementById('iframe').contentWindow.document.body.innerHTML;
-
- tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true});
- tinyMCEPopup.close();
- },
-
- resize : function() {
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
-
- el = document.getElementById('iframe');
-
- if (el) {
- el.style.width = (vp.w - 20) + 'px';
- el.style.height = (vp.h - 90) + 'px';
- }
- }
-};
-
-tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog);
diff --git a/src/wp-includes/js/tinymce/plugins/paste/pastetext.htm b/src/wp-includes/js/tinymce/plugins/paste/pastetext.htm
deleted file mode 100644
index 73164d8a82..0000000000
--- a/src/wp-includes/js/tinymce/plugins/paste/pastetext.htm
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
- {#paste.paste_text_desc}
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/plugins/paste/pasteword.htm b/src/wp-includes/js/tinymce/plugins/paste/pasteword.htm
deleted file mode 100644
index 6b6cf12dad..0000000000
--- a/src/wp-includes/js/tinymce/plugins/paste/pasteword.htm
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
- {#paste.paste_word_desc}
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/plugins/paste/plugin.js b/src/wp-includes/js/tinymce/plugins/paste/plugin.js
new file mode 100644
index 0000000000..2be730ce18
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/paste/plugin.js
@@ -0,0 +1,1067 @@
+/**
+ * Compiled inline version. (Library mode)
+ */
+
+/*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
+/*globals $code */
+
+(function(exports, undefined) {
+ "use strict";
+
+ var modules = {};
+
+ function require(ids, callback) {
+ var module, defs = [];
+
+ for (var i = 0; i < ids.length; ++i) {
+ module = modules[ids[i]] || resolve(ids[i]);
+ if (!module) {
+ throw 'module definition dependecy not found: ' + ids[i];
+ }
+
+ defs.push(module);
+ }
+
+ callback.apply(null, defs);
+ }
+
+ function define(id, dependencies, definition) {
+ if (typeof id !== 'string') {
+ throw 'invalid module definition, module id must be defined and be a string';
+ }
+
+ if (dependencies === undefined) {
+ throw 'invalid module definition, dependencies must be specified';
+ }
+
+ if (definition === undefined) {
+ throw 'invalid module definition, definition function must be specified';
+ }
+
+ require(dependencies, function() {
+ modules[id] = definition.apply(null, arguments);
+ });
+ }
+
+ function defined(id) {
+ return !!modules[id];
+ }
+
+ function resolve(id) {
+ var target = exports;
+ var fragments = id.split(/[.\/]/);
+
+ for (var fi = 0; fi < fragments.length; ++fi) {
+ if (!target[fragments[fi]]) {
+ return;
+ }
+
+ target = target[fragments[fi]];
+ }
+
+ return target;
+ }
+
+ function expose(ids) {
+ for (var i = 0; i < ids.length; i++) {
+ var target = exports;
+ var id = ids[i];
+ var fragments = id.split(/[.\/]/);
+
+ for (var fi = 0; fi < fragments.length - 1; ++fi) {
+ if (target[fragments[fi]] === undefined) {
+ target[fragments[fi]] = {};
+ }
+
+ target = target[fragments[fi]];
+ }
+
+ target[fragments[fragments.length - 1]] = modules[id];
+ }
+ }
+
+// Included from: js/tinymce/plugins/paste/classes/Utils.js
+
+/**
+ * Utils.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class contails various utility functions for the paste plugin.
+ *
+ * @class tinymce.pasteplugin.Clipboard
+ * @private
+ */
+define("tinymce/pasteplugin/Utils", [
+ "tinymce/util/Tools",
+ "tinymce/html/DomParser",
+ "tinymce/html/Schema"
+], function(Tools, DomParser, Schema) {
+ function filter(content, items) {
+ Tools.each(items, function(v) {
+ if (v.constructor == RegExp) {
+ content = content.replace(v, '');
+ } else {
+ content = content.replace(v[0], v[1]);
+ }
+ });
+
+ return content;
+ }
+
+ /**
+ * Gets the innerText of the specified element. It will handle edge cases
+ * and works better than textContent on Gecko.
+ *
+ * @param {String} html HTML string to get text from.
+ * @return {String} String of text with line feeds.
+ */
+ function innerText(html) {
+ var schema = new Schema(), domParser = new DomParser({}, schema), text = '';
+ var shortEndedElements = schema.getShortEndedElements();
+ var ignoreElements = Tools.makeMap('script noscript style textarea video audio iframe object', ' ');
+ var blockElements = schema.getBlockElements();
+
+ function walk(node) {
+ var name = node.name, currentNode = node;
+
+ if (name === 'br') {
+ text += '\n';
+ return;
+ }
+
+ // img/input/hr
+ if (shortEndedElements[name]) {
+ text += ' ';
+ }
+
+ // Ingore script, video contents
+ if (ignoreElements[name]) {
+ text += ' ';
+ return;
+ }
+
+ if (node.type == 3) {
+ text += node.value;
+ }
+
+ // Walk all children
+ if (!node.shortEnded) {
+ if ((node = node.firstChild)) {
+ do {
+ walk(node);
+ } while ((node = node.next));
+ }
+ }
+
+ // Add \n or \n\n for blocks or P
+ if (blockElements[name] && currentNode.next) {
+ text += '\n';
+
+ if (name == 'p') {
+ text += '\n';
+ }
+ }
+ }
+
+ walk(domParser.parse(html));
+
+ return text;
+ }
+
+ return {
+ filter: filter,
+ innerText: innerText
+ };
+});
+
+// Included from: js/tinymce/plugins/paste/classes/Clipboard.js
+
+/**
+ * Clipboard.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class contains logic for getting HTML contents out of the clipboard.
+ *
+ * We need to make a lot of ugly hacks to get the contents out of the clipboard since
+ * the W3C Clipboard API is broken in all browsers: Gecko/WebKit/Blink. We might rewrite
+ * this the way those API:s stabilize.
+ *
+ * Current implementation steps:
+ * 1. On keydown with paste keys Ctrl+V or Shift+Insert create
+ * a paste bin element and move focus to that element.
+ * 2. Wait for the browser to fire a "paste" event and get the contents out of the paste bin.
+ * 3. Check if the paste was successful if true, process the HTML.
+ * (4). If the paste was unsuccessful use IE execCommand, Clipboard API, document.dataTransfer old WebKit API etc.
+ *
+ * @class tinymce.pasteplugin.Clipboard
+ * @private
+ */
+define("tinymce/pasteplugin/Clipboard", [
+ "tinymce/Env",
+ "tinymce/util/VK",
+ "tinymce/pasteplugin/Utils"
+], function(Env, VK, Utils) {
+ return function(editor) {
+ var self = this, pasteBinElm, lastRng, keyboardPasteTimeStamp = 0;
+ var pasteBinDefaultContent = '%MCEPASTEBIN%', keyboardPastePlainTextState;
+
+ /**
+ * Pastes the specified HTML. This means that the HTML is filtered and then
+ * inserted at the current selection in the editor. It will also fire paste events
+ * for custom user filtering.
+ *
+ * @param {String} html HTML code to paste into the current selection.
+ */
+ function pasteHtml(html) {
+ var args, dom = editor.dom;
+
+ args = editor.fire('BeforePastePreProcess', {content: html}); // Internal event used by Quirks
+ args = editor.fire('PastePreProcess', args);
+ html = args.content;
+
+ if (!args.isDefaultPrevented()) {
+ // User has bound PastePostProcess events then we need to pass it through a DOM node
+ // This is not ideal but we don't want to let the browser mess up the HTML for example
+ // some browsers add to P tags etc
+ if (editor.hasEventListeners('PastePostProcess') && !args.isDefaultPrevented()) {
+ // We need to attach the element to the DOM so Sizzle selectors work on the contents
+ var tempBody = dom.add(editor.getBody(), 'div', {style: 'display:none'}, html);
+ args = editor.fire('PastePostProcess', {node: tempBody});
+ dom.remove(tempBody);
+ html = args.node.innerHTML;
+ }
+
+ if (!args.isDefaultPrevented()) {
+ editor.insertContent(html);
+ }
+ }
+ }
+
+ /**
+ * Pastes the specified text. This means that the plain text is processed
+ * and converted into BR and P elements. It will fire paste events for custom filtering.
+ *
+ * @param {String} text Text to paste as the current selection location.
+ */
+ function pasteText(text) {
+ text = editor.dom.encode(text).replace(/\r\n/g, '\n');
+
+ var startBlock = editor.dom.getParent(editor.selection.getStart(), editor.dom.isBlock);
+
+ // Create start block html for example
+ var forcedRootBlockName = editor.settings.forced_root_block;
+ var forcedRootBlockStartHtml;
+ if (forcedRootBlockName) {
+ forcedRootBlockStartHtml = editor.dom.createHTML(forcedRootBlockName, editor.settings.forced_root_block_attrs);
+ forcedRootBlockStartHtml = forcedRootBlockStartHtml.substr(0, forcedRootBlockStartHtml.length - 3) + '>';
+ }
+
+ if ((startBlock && /^(PRE|DIV)$/.test(startBlock.nodeName)) || !forcedRootBlockName) {
+ text = Utils.filter(text, [
+ [/\n/g, "
"]
+ ]);
+ } else {
+ text = Utils.filter(text, [
+ [/\n\n/g, "
" + forcedRootBlockStartHtml],
+ [/^(.*<\/p>)()$/, forcedRootBlockStartHtml + '$1'],
+ [/\n/g, "
"]
+ ]);
+
+ if (text.indexOf('
') != -1) {
+ text = forcedRootBlockStartHtml + text;
+ }
+ }
+
+ pasteHtml(text);
+ }
+
+ /**
+ * Creates a paste bin element and moves the selection into that element. It will also move the element offscreen
+ * so that resize handles doesn't get produced on IE or Drag handles or Firefox.
+ */
+ function createPasteBin() {
+ var dom = editor.dom, body = editor.getBody(), viewport = editor.dom.getViewPort(editor.getWin());
+ var height = editor.inline ? body.clientHeight : viewport.h;
+
+ removePasteBin();
+
+ // Create a pastebin
+ pasteBinElm = dom.add(editor.getBody(), 'div', {
+ id: "mcepastebin",
+ contentEditable: true,
+ "data-mce-bogus": "1",
+ style: 'position: fixed; top: 20px;' +
+ 'width: 10px; height: ' + (height - 40) + 'px; overflow: hidden; opacity: 0'
+ }, pasteBinDefaultContent);
+
+ // Move paste bin out of sight since the controlSelection rect gets displayed otherwise
+ dom.setStyle(pasteBinElm, 'left', dom.getStyle(body, 'direction', true) == 'rtl' ? 0xFFFF : -0xFFFF);
+
+ // Prevent focus events from bubbeling fixed FocusManager issues
+ dom.bind(pasteBinElm, 'beforedeactivate focusin focusout', function(e) {
+ e.stopPropagation();
+ });
+
+ lastRng = editor.selection.getRng();
+ pasteBinElm.focus();
+ editor.selection.select(pasteBinElm, true);
+ }
+
+ /**
+ * Removes the paste bin if it exists.
+ */
+ function removePasteBin() {
+ if (pasteBinElm) {
+ editor.dom.unbind(pasteBinElm);
+ editor.dom.remove(pasteBinElm);
+
+ if (lastRng) {
+ editor.selection.setRng(lastRng);
+ }
+ }
+
+ keyboardPastePlainTextState = false;
+ pasteBinElm = lastRng = null;
+ }
+
+ /**
+ * Returns the contents of the paste bin as a HTML string.
+ *
+ * @return {String} Get the contents of the paste bin.
+ */
+ function getPasteBinHtml() {
+ return pasteBinElm ? pasteBinElm.innerHTML : pasteBinDefaultContent;
+ }
+
+ /**
+ * Gets various content types out of a datatransfer object.
+ *
+ * @param {DataTransfer} dataTransfer Event fired on paste.
+ * @return {Object} Object with mime types and data for those mime types.
+ */
+ function getDataTransferItems(dataTransfer) {
+ var data = {};
+
+ if (dataTransfer && dataTransfer.types) {
+ data['text/plain'] = dataTransfer.getData('Text');
+
+ for (var i = 0; i < dataTransfer.types.length; i++) {
+ var contentType = dataTransfer.types[i];
+ data[contentType] = dataTransfer.getData(contentType);
+ }
+ }
+
+ return data;
+ }
+
+ /**
+ * Gets various content types out of the Clipboard API. It will also get the
+ * plain text using older IE and WebKit API:s.
+ *
+ * @param {ClipboardEvent} clipboardEvent Event fired on paste.
+ * @return {Object} Object with mime types and data for those mime types.
+ */
+ function getClipboardContent(clipboardEvent) {
+ return getDataTransferItems(clipboardEvent.clipboardData || editor.getDoc().dataTransfer);
+ }
+
+ function getCaretRangeFromEvent(e) {
+ var doc = editor.getDoc(), rng;
+
+ if (doc.caretPositionFromPoint) {
+ var point = doc.caretPositionFromPoint(e.pageX, e.pageY);
+ rng = doc.createRange();
+ rng.setStart(point.offsetNode, point.offset);
+ rng.collapse(true);
+ } else if (doc.caretRangeFromPoint) {
+ rng = doc.caretRangeFromPoint(e.pageX, e.pageY);
+ }
+
+ return rng;
+ }
+
+ editor.on('keydown', function(e) {
+ if (e.isDefaultPrevented()) {
+ return;
+ }
+
+ // Ctrl+V or Shift+Insert
+ if ((VK.metaKeyPressed(e) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45)) {
+ keyboardPastePlainTextState = e.shiftKey && e.keyCode == 86;
+
+ // Prevent undoManager keydown handler from making an undo level with the pastebin in it
+ e.stopImmediatePropagation();
+
+ keyboardPasteTimeStamp = new Date().getTime();
+
+ // IE doesn't support Ctrl+Shift+V and it doesn't even produce a paste event
+ // so lets fake a paste event and let IE use the execCommand/dataTransfer methods
+ if (Env.ie && keyboardPastePlainTextState) {
+ e.preventDefault();
+ editor.fire('paste', {ieFake: true});
+ return;
+ }
+
+ createPasteBin();
+ }
+ });
+
+ editor.on('paste', function(e) {
+ var clipboardContent = getClipboardContent(e);
+ var isKeyBoardPaste = new Date().getTime() - keyboardPasteTimeStamp < 1000;
+ var plainTextMode = self.pasteFormat == "text" || keyboardPastePlainTextState;
+
+ // Not a keyboard paste prevent default paste and try to grab the clipboard contents using different APIs
+ if (!isKeyBoardPaste) {
+ e.preventDefault();
+ }
+
+ // Try IE only method if paste isn't a keyboard paste
+ if (Env.ie && (!isKeyBoardPaste || e.ieFake)) {
+ createPasteBin();
+
+ editor.dom.bind(pasteBinElm, 'paste', function(e) {
+ e.stopPropagation();
+ });
+
+ editor.getDoc().execCommand('Paste', false, null);
+ clipboardContent["text/html"] = getPasteBinHtml();
+ }
+
+ setTimeout(function() {
+ var html = getPasteBinHtml();
+
+ // WebKit has a nice bug where it clones the paste bin if you paste from for example notepad
+ if (pasteBinElm && pasteBinElm.firstChild && pasteBinElm.firstChild.id === 'mcepastebin') {
+ plainTextMode = true;
+ }
+
+ removePasteBin();
+
+ if (html == pasteBinDefaultContent || !isKeyBoardPaste) {
+ html = clipboardContent['text/html'] || clipboardContent['text/plain'] || pasteBinDefaultContent;
+
+ if (html == pasteBinDefaultContent) {
+ if (!isKeyBoardPaste) {
+ editor.windowManager.alert('Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.');
+ }
+
+ return;
+ }
+ }
+
+ if (plainTextMode) {
+ pasteText(clipboardContent['text/plain'] || Utils.innerText(html));
+ } else {
+ pasteHtml(html);
+ }
+ }, 0);
+ });
+
+ editor.on('dragstart', function(e) {
+ if (e.dataTransfer.types) {
+ e.dataTransfer.setData('mce-internal', editor.selection.getContent());
+ }
+ });
+
+ editor.on('drop', function(e) {
+ var rng = getCaretRangeFromEvent(e);
+
+ if (rng) {
+ var dropContent = getDataTransferItems(e.dataTransfer);
+ var content = dropContent['mce-internal'] || dropContent['text/html'] || dropContent['text/plain'];
+
+ if (content) {
+ e.preventDefault();
+
+ editor.undoManager.transact(function() {
+ if (dropContent['mce-internal']) {
+ editor.execCommand('Delete');
+ }
+
+ editor.selection.setRng(rng);
+
+ if (!dropContent['text/html']) {
+ pasteText(content);
+ } else {
+ pasteHtml(content);
+ }
+ });
+ }
+ }
+ });
+
+ self.pasteHtml = pasteHtml;
+ self.pasteText = pasteText;
+
+ // Remove all data images from paste for example from Gecko
+ // except internal images like video elements
+ editor.on('preInit', function() {
+ editor.parser.addNodeFilter('img', function(nodes) {
+ if (!editor.settings.paste_data_images) {
+ var i = nodes.length;
+
+ while (i--) {
+ var src = nodes[i].attributes.map.src;
+ if (src && src.indexOf('data:image') === 0) {
+ if (!nodes[i].attr('data-mce-object') && src !== Env.transparentSrc) {
+ nodes[i].remove();
+ }
+ }
+ }
+ }
+ });
+ });
+
+ // Fix for #6504 we need to remove the paste bin on IE if the user paste in a file
+ editor.on('PreProcess', function() {
+ editor.dom.remove(editor.dom.get('mcepastebin'));
+ });
+ };
+});
+
+// Included from: js/tinymce/plugins/paste/classes/WordFilter.js
+
+/**
+ * WordFilter.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class parses word HTML into proper TinyMCE markup.
+ *
+ * @class tinymce.pasteplugin.Quirks
+ * @private
+ */
+define("tinymce/pasteplugin/WordFilter", [
+ "tinymce/util/Tools",
+ "tinymce/html/DomParser",
+ "tinymce/html/Schema",
+ "tinymce/html/Serializer",
+ "tinymce/html/Node",
+ "tinymce/pasteplugin/Utils"
+], function(Tools, DomParser, Schema, Serializer, Node, Utils) {
+ function isWordContent(content) {
+ return (/ 1) {
+ currentListNode.attr('start', '' + start);
+ }
+
+ paragraphNode.wrap(currentListNode);
+ } else {
+ currentListNode.append(paragraphNode);
+ }
+
+ paragraphNode.name = 'li';
+ listStartTextNode.value = '';
+
+ var nextNode = listStartTextNode.next;
+ if (nextNode && nextNode.type == 3) {
+ nextNode.value = nextNode.value.replace(/^\u00a0+/, '');
+ }
+
+ // Append list to previous list if it exists
+ if (level > lastLevel && prevListNode) {
+ prevListNode.lastChild.append(currentListNode);
+ }
+
+ lastLevel = level;
+ }
+
+ var paragraphs = node.getAll('p');
+
+ for (var i = 0; i < paragraphs.length; i++) {
+ node = paragraphs[i];
+
+ if (node.name == 'p' && node.firstChild) {
+ // Find first text node in paragraph
+ var nodeText = '';
+ var listStartTextNode = node.firstChild;
+
+ while (listStartTextNode) {
+ nodeText = listStartTextNode.value;
+ if (nodeText) {
+ break;
+ }
+
+ listStartTextNode = listStartTextNode.firstChild;
+ }
+
+ // Detect unordered lists look for bullets
+ if (/^\s*[\u2022\u00b7\u00a7\u00d8\u25CF]\s*$/.test(nodeText)) {
+ convertParagraphToLi(node, listStartTextNode, 'ul');
+ continue;
+ }
+
+ // Detect ordered lists 1., a. or ixv.
+ if (/^\s*\w+\.$/.test(nodeText)) {
+ // Parse OL start number
+ var matches = /([0-9])\./.exec(nodeText);
+ var start = 1;
+ if (matches) {
+ start = parseInt(matches[1], 10);
+ }
+
+ convertParagraphToLi(node, listStartTextNode, 'ol', start);
+ continue;
+ }
+
+ currentListNode = null;
+ }
+ }
+ }
+
+ function filterStyles(node, styleValue) {
+ // Parse out list indent level for lists
+ if (node.name === 'p') {
+ var matches = /mso-list:\w+ \w+([0-9]+)/.exec(styleValue);
+
+ if (matches) {
+ node._listLevel = parseInt(matches[1], 10);
+ }
+ }
+
+ if (editor.getParam("paste_retain_style_properties", "none")) {
+ var outputStyle = "";
+
+ Tools.each(editor.dom.parseStyle(styleValue), function(value, name) {
+ // Convert various MS styles to W3C styles
+ switch (name) {
+ case "horiz-align":
+ name = "text-align";
+ return;
+
+ case "vert-align":
+ name = "vertical-align";
+ return;
+
+ case "font-color":
+ case "mso-foreground":
+ name = "color";
+ return;
+
+ case "mso-background":
+ case "mso-highlight":
+ name = "background";
+ break;
+ }
+
+ // Output only valid styles
+ if (retainStyleProperties == "all" || (validStyles && validStyles[name])) {
+ outputStyle += name + ':' + value + ';';
+ }
+ });
+
+ if (outputStyle) {
+ return outputStyle;
+ }
+ }
+
+ return null;
+ }
+
+ if (settings.paste_enable_default_filters === false) {
+ return;
+ }
+
+ // Detect is the contents is Word junk HTML
+ if (isWordContent(e.content)) {
+ e.wordContent = true; // Mark it for other processors
+
+ // Remove basic Word junk
+ content = Utils.filter(content, [
+ // Word comments like conditional comments etc
+ //gi,
+
+ // Remove comments, scripts (e.g., msoShowComment), XML tag, VML content,
+ // MS Office namespaced tags, and a few other tags
+ /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
+
+ // Convert into for line-though
+ [/<(\/?)s>/gi, "<$1strike>"],
+
+ // Replace nsbp entites to char since it's easier to handle
+ [/ /gi, "\u00a0"],
+
+ // Convert ___ to string of alternating
+ // breaking/non-breaking spaces of same length
+ [/([\s\u00a0]*)<\/span>/gi,
+ function(str, spaces) {
+ return (spaces.length > 0) ?
+ spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
+ }
+ ]
+ ]);
+
+ var validElements = settings.paste_word_valid_elements;
+ if (!validElements) {
+ validElements = '@[style],-strong/b,-em/i,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,' +
+ '-table,-tr,-td[colspan|rowspan],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br';
+ }
+
+ // Setup strict schema
+ var schema = new Schema({
+ valid_elements: validElements
+ });
+
+ // Parse HTML into DOM structure
+ var domParser = new DomParser({}, schema);
+
+ domParser.addAttributeFilter('style', function(nodes) {
+ var i = nodes.length, node;
+
+ while (i--) {
+ node = nodes[i];
+ node.attr('style', filterStyles(node, node.attr('style')));
+
+ // Remove pointess spans
+ if (node.name == 'span' && !node.attributes.length) {
+ node.unwrap();
+ }
+ }
+ });
+
+ domParser.addNodeFilter('a', function(nodes) {
+ var i = nodes.length, node, href, name;
+
+ while (i--) {
+ node = nodes[i];
+ href = node.attr('href');
+ name = node.attr('name');
+
+ if (href && href.indexOf('file://') === 0) {
+ href = href.split('#')[1];
+ if (href) {
+ href = '#' + href;
+ }
+ }
+
+ if (!href && !name) {
+ node.unwrap();
+ } else {
+ node.attr({
+ href: href,
+ name: name
+ });
+ }
+ }
+ });
+ // Parse into DOM structure
+ var rootNode = domParser.parse(content);
+
+ // Process DOM
+ convertFakeListsToProperLists(rootNode);
+
+ // Serialize DOM back to HTML
+ e.content = new Serializer({}, schema).serialize(rootNode);
+ }
+ });
+ }
+
+ WordFilter.isWordContent = isWordContent;
+
+ return WordFilter;
+});
+
+// Included from: js/tinymce/plugins/paste/classes/Quirks.js
+
+/**
+ * Quirks.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class contains various fixes for browsers. These issues can not be feature
+ * detected since we have no direct control over the clipboard. However we might be able
+ * to remove some of these fixes once the browsers gets updated/fixed.
+ *
+ * @class tinymce.pasteplugin.Quirks
+ * @private
+ */
+define("tinymce/pasteplugin/Quirks", [
+ "tinymce/Env",
+ "tinymce/util/Tools",
+ "tinymce/pasteplugin/WordFilter",
+ "tinymce/pasteplugin/Utils"
+], function(Env, Tools, WordFilter, Utils) {
+ "use strict";
+
+ return function(editor) {
+ function addPreProcessFilter(filterFunc) {
+ editor.on('BeforePastePreProcess', function(e) {
+ e.content = filterFunc(e.content);
+ });
+ }
+
+ /**
+ * Removes WebKit fragment comments and converted-space spans.
+ *
+ * This:
+ * a b
+ *
+ * Becomes:
+ * a b
+ */
+ function removeWebKitFragments(html) {
+ html = Utils.filter(html, [
+ /^[\s\S]*|[\s\S]*$/g, // WebKit fragment
+ [/\u00a0<\/span>/g, '\u00a0'], // WebKit
+ /
$/ // Traling BR elements
+ ]);
+
+ return html;
+ }
+
+ /**
+ * Removes BR elements after block elements. IE9 has a nasty bug where it puts a BR element after each
+ * block element when pasting from word. This removes those elements.
+ *
+ * This:
+ * a
b
+ *
+ * Becomes:
+ * a
b
+ */
+ function removeExplorerBrElementsAfterBlocks(html) {
+ // Only filter word specific content
+ if (!WordFilter.isWordContent(html)) {
+ return html;
+ }
+
+ // Produce block regexp based on the block elements in schema
+ var blockElements = [];
+
+ Tools.each(editor.schema.getBlockElements(), function(block, blockName) {
+ blockElements.push(blockName);
+ });
+
+ var explorerBlocksRegExp = new RegExp(
+ '(?:
[\\s\\r\\n]+|
)*(<\\/?(' + blockElements.join('|') + ')[^>]*>)(?:
[\\s\\r\\n]+|
)*',
+ 'g'
+ );
+
+ // Remove BR:s from: X
+ html = Utils.filter(html, [
+ [explorerBlocksRegExp, '$1']
+ ]);
+
+ // IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break
+ html = Utils.filter(html, [
+ [/
/g, '
'], // Replace multiple BR elements with uppercase BR to keep them intact
+ [/
/g, ' '], // Replace single br elements with space since they are word wrap BR:s
+ [/
/g, '
'] // Replace back the double brs but into a single BR
+ ]);
+
+ return html;
+ }
+
+ /**
+ * WebKit has a nasty bug where the all runtime styles gets added to style attributes when copy/pasting contents.
+ * This fix solves that by simply removing the whole style attribute.
+ *
+ * Todo: This can be made smarter. Keeping styles that override existing ones etc.
+ *
+ * @param {String} content Content that needs to be processed.
+ * @return {String} Processed contents.
+ */
+ function removeWebKitStyles(content) {
+ if (editor.settings.paste_remove_styles || editor.settings.paste_remove_styles_if_webkit !== false) {
+ content = content.replace(/ style=\"[^\"]+\"/g, '');
+ }
+
+ return content;
+ }
+
+ // Sniff browsers and apply fixes since we can't feature detect
+ if (Env.webkit) {
+ addPreProcessFilter(removeWebKitStyles);
+ addPreProcessFilter(removeWebKitFragments);
+ }
+
+ if (Env.ie) {
+ addPreProcessFilter(removeExplorerBrElementsAfterBlocks);
+ }
+ };
+});
+
+// Included from: js/tinymce/plugins/paste/classes/Plugin.js
+
+/**
+ * Plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class contains the tinymce plugin logic for the paste plugin.
+ *
+ * @class tinymce.pasteplugin.Plugin
+ * @private
+ */
+define("tinymce/pasteplugin/Plugin", [
+ "tinymce/PluginManager",
+ "tinymce/pasteplugin/Clipboard",
+ "tinymce/pasteplugin/WordFilter",
+ "tinymce/pasteplugin/Quirks"
+], function(PluginManager, Clipboard, WordFilter, Quirks) {
+ var userIsInformed;
+
+ PluginManager.add('paste', function(editor) {
+ var self = this, clipboard, settings = editor.settings;
+
+ function togglePlainTextPaste() {
+ if (clipboard.pasteFormat == "text") {
+ this.active(false);
+ clipboard.pasteFormat = "html";
+ } else {
+ clipboard.pasteFormat = "text";
+ this.active(true);
+
+ if (!userIsInformed) {
+ editor.windowManager.alert(
+ 'Paste is now in plain text mode. Contents will now ' +
+ 'be pasted as plain text until you toggle this option off.'
+ );
+
+ userIsInformed = true;
+ }
+ }
+ }
+
+ self.clipboard = clipboard = new Clipboard(editor);
+ self.quirks = new Quirks(editor);
+ self.wordFilter = new WordFilter(editor);
+
+ if (editor.settings.paste_as_text) {
+ self.clipboard.pasteFormat = "text";
+ }
+
+ if (settings.paste_preprocess) {
+ editor.on('PastePreProcess', function(e) {
+ settings.paste_preprocess.call(self, self, e);
+ });
+ }
+
+ if (settings.paste_postprocess) {
+ editor.on('PastePostProcess', function(e) {
+ settings.paste_postprocess.call(self, self, e);
+ });
+ }
+
+ editor.addCommand('mceInsertClipboardContent', function(ui, value) {
+ if (value.content) {
+ self.clipboard.pasteHtml(value.content);
+ }
+
+ if (value.text) {
+ self.clipboard.pasteText(value.text);
+ }
+ });
+
+ // Block all drag/drop events
+ if (editor.paste_block_drop) {
+ editor.on('dragend dragover draggesture dragdrop drop drag', function(e) {
+ e.preventDefault();
+ e.stopPropagation();
+ });
+ }
+
+ // Prevent users from dropping data images on Gecko
+ if (!editor.settings.paste_data_images) {
+ editor.on('drop', function(e) {
+ var dataTransfer = e.dataTransfer;
+
+ if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {
+ e.preventDefault();
+ }
+ });
+ }
+
+ editor.addButton('pastetext', {
+ icon: 'pastetext',
+ tooltip: 'Paste as text',
+ onclick: togglePlainTextPaste,
+ active: self.clipboard.pasteFormat == "text"
+ });
+
+ editor.addMenuItem('pastetext', {
+ text: 'Paste as text',
+ selectable: true,
+ active: clipboard.pasteFormat,
+ onclick: togglePlainTextPaste
+ });
+ });
+});
+
+expose(["tinymce/pasteplugin/Utils","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks","tinymce/pasteplugin/Plugin"]);
+})(this);
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/paste/plugin.min.js b/src/wp-includes/js/tinymce/plugins/paste/plugin.min.js
new file mode 100644
index 0000000000..95c0129eca
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/paste/plugin.min.js
@@ -0,0 +1 @@
+!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i"),t&&/^(PRE|DIV)$/.test(t.nodeName)||!o?e=n.filter(e,[[/\n/g,"
"]]):(e=n.filter(e,[[/\n\n/g,"
"+a],[/^(.*<\/p>)()$/,a+"$1"],[/\n/g,"
"]]),-1!=e.indexOf("
")&&(e=a+e)),i(e)}function a(){var e=r.dom,t=r.getBody(),n=r.dom.getViewPort(r.getWin()),i=r.inline?t.clientHeight:n.h;s(),p=e.add(r.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"1",style:"position: fixed; top: 20px;width: 10px; height: "+(i-40)+"px; overflow: hidden; opacity: 0"},g),e.setStyle(p,"left","rtl"==e.getStyle(t,"direction",!0)?65535:-65535),e.bind(p,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),m=r.selection.getRng(),p.focus(),r.selection.select(p,!0)}function s(){p&&(r.dom.unbind(p),r.dom.remove(p),m&&r.selection.setRng(m)),v=!1,p=m=null}function l(){return p?p.innerHTML:g}function c(e){var t={};if(e&&e.types){t["text/plain"]=e.getData("Text");for(var n=0;nl?n&&(n=n.parent.parent):(r=n,n=null)),n&&n.name==a?n.append(e):(r=r||n,n=new i(a,1),s>1&&n.attr("start",""+s),e.wrap(n)),e.name="li",t.value="";var c=t.next;c&&3==c.type&&(c.value=c.value.replace(/^\u00a0+/,"")),l>o&&r&&r.lastChild.append(n),o=l}for(var n,r,o=1,a=e.getAll("p"),s=0;s/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var h=l.paste_word_valid_elements;h||(h="@[style],-strong/b,-em/i,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-table,-tr,-td[colspan|rowspan],-th,-thead,-tfoot,-tbody,-a[href|name],sub,sup,strike,br");var g=new n({valid_elements:h}),v=new t({},g);v.addAttributeFilter("style",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("style",u(n,n.attr("style"))),"span"!=n.name||n.attributes.length||n.unwrap()}),v.addNodeFilter("a",function(e){for(var t=e.length,n,r,i;t--;)n=e[t],r=n.attr("href"),i=n.attr("name"),r&&0===r.indexOf("file://")&&(r=r.split("#")[1],r&&(r="#"+r)),r||i?n.attr({href:r,name:i}):n.unwrap()});var y=v.parse(f);d(y),c.content=new r({},g).serialize(y)}})}return s.isWordContent=a,s}),r(y,[p,c,h,l],function(e,t,n,r){return function(i){function o(e){i.on("BeforePastePreProcess",function(t){t.content=e(t.content)})}function a(e){return e=r.filter(e,[/^[\s\S]*|[\s\S]*$/g,[/\u00a0<\/span>/g,"\xa0"],/
$/])}function s(e){if(!n.isWordContent(e))return e;var o=[];t.each(i.schema.getBlockElements(),function(e,t){o.push(t)});var a=new RegExp("(?:
[\\s\\r\\n]+|
)*(<\\/?("+o.join("|")+")[^>]*>)(?:
[\\s\\r\\n]+|
)*","g");return e=r.filter(e,[[a,"$1"]]),e=r.filter(e,[[/
/g,"
"],[/
/g," "],[/
/g,"
"]])}function l(e){return(i.settings.paste_remove_styles||i.settings.paste_remove_styles_if_webkit!==!1)&&(e=e.replace(/ style=\"[^\"]+\"/g,"")),e}e.webkit&&(o(l),o(a)),e.ie&&o(s)}}),r(b,[C,f,h,y],function(e,t,n,r){var i;e.add("paste",function(e){function o(){"text"==s.pasteFormat?(this.active(!1),s.pasteFormat="html"):(s.pasteFormat="text",this.active(!0),i||(e.windowManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),i=!0))}var a=this,s,l=e.settings;a.clipboard=s=new t(e),a.quirks=new r(e),a.wordFilter=new n(e),e.settings.paste_as_text&&(a.clipboard.pasteFormat="text"),l.paste_preprocess&&e.on("PastePreProcess",function(e){l.paste_preprocess.call(a,a,e)}),l.paste_postprocess&&e.on("PastePostProcess",function(e){l.paste_postprocess.call(a,a,e)}),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&a.clipboard.pasteHtml(t.content),t.text&&a.clipboard.pasteText(t.text)}),e.paste_block_drop&&e.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),e.settings.paste_data_images||e.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&t.files.length>0&&e.preventDefault()}),e.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:o,active:"text"==a.clipboard.pasteFormat}),e.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:s.pasteFormat,onclick:o})})}),a([l,f,h,y,b])}(this);
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/spellchecker/config.php b/src/wp-includes/js/tinymce/plugins/spellchecker/config.php
index 795495a664..fb92643e9f 100644
--- a/src/wp-includes/js/tinymce/plugins/spellchecker/config.php
+++ b/src/wp-includes/js/tinymce/plugins/spellchecker/config.php
@@ -5,7 +5,7 @@
* @package MCManager.includes
*/
// General settings
- $config['general.engine'] = 'GoogleSpell';
+// $config['general.engine'] = 'GoogleSpell';
//$config['general.engine'] = 'PSpell';
//$config['general.engine'] = 'PSpellShell';
//$config['general.remote_rpc_url'] = 'http://some.other.site/some/url/rpc.php';
diff --git a/src/wp-includes/js/tinymce/plugins/spellchecker/css/content.css b/src/wp-includes/js/tinymce/plugins/spellchecker/css/content.css
deleted file mode 100644
index 656ce1eee6..0000000000
--- a/src/wp-includes/js/tinymce/plugins/spellchecker/css/content.css
+++ /dev/null
@@ -1 +0,0 @@
-.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
diff --git a/src/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js b/src/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js
deleted file mode 100644
index 6b57241a90..0000000000
--- a/src/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=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+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.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(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);f.menuItems={};c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}f._updateMenu(l);f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);f.menuItems[n]=l;if(n==f.selectedLang){f.selectedItem=l}})});return g}},setLanguage:function(e){var d=this;if(e==d.selectedLang){return}if(tinymce.grep(d.languages,function(f){return f===e}).length===0){throw"Unknown language: "+e}d.selectedLang=e;if(d.menuItems){d._updateMenu(d.menuItems[e])}if(d.active){d._done()}},_updateMenu:function(d){d.setSelected(1);this.selectedItem.setSelected(0);this.selectedItem=d},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');for(d=0;d$2");while((s=p.indexOf(""))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf(" ");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1$2')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js
deleted file mode 100644
index 4081181339..0000000000
--- a/src/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin_src.js
+++ /dev/null
@@ -1,471 +0,0 @@
-/**
- * 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 + "." + tinymce.minorVersion
- };
- },
-
- init : function(ed, url) {
- var t = this, cm;
-
- t.url = url;
- t.editor = ed;
- t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}");
-
- 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 > 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);
- t.menuItems = {};
- each(t.languages, function(v, k) {
- var o = {icon : 1}, mi;
-
- o.onclick = function() {
- if (v == t.selectedLang) {
- return;
- }
- t._updateMenu(mi);
- t.selectedLang = v;
- };
-
- o.title = k;
- mi = m.add(o);
- mi.setSelected(v == t.selectedLang);
- t.menuItems[v] = mi;
- if (v == t.selectedLang)
- t.selectedItem = mi;
- });
- });
-
-
-
- return c;
- }
- },
-
- setLanguage: function(lang) {
- var t = this;
-
- if (lang == t.selectedLang) {
- // allowed
- return;
- }
-
- if (tinymce.grep(t.languages, function(v) { return v === lang; }).length === 0) {
- throw "Unknown language: " + lang;
- }
-
- t.selectedLang = lang;
-
- // if the menu has been shown, update it as well
- if (t.menuItems) {
- t._updateMenu(t.menuItems[lang]);
- }
-
- if (t.active) {
- // clear error in the old language.
- t._done();
-
- // Don't immediately block the UI to check spelling in the new language, this is an API not a user action.
- }
- },
-
- // Internal functions
-
- _updateMenu: function(mi) {
- mi.setSelected(1);
- this.selectedItem.setSelected(0);
- this.selectedItem = mi;
- },
-
- _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!"#$%&()*+,-./:;<=>?@[\]^_{|}§©«®±¶·¸»¼½¾¿×÷¤\u201d\u201c');
-
- // Build word separator regexp
- for (i=0; i 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$2 ');
- // Loop over the content finding mispelled words
- while ((pos = v.indexOf('')) != -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(' ');
- 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$2');
- }
-
- // Finally, replace the node with the container
- dom.replace(elem, n);
- }
- });
-
- se.setRng(r);
- },
-
- _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 > 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("spellchecker_enable_ignore_rpc", '');
- 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("spellchecker_enable_learn_rpc")) {
- 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 && 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);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/spellchecker/plugin.js b/src/wp-includes/js/tinymce/plugins/spellchecker/plugin.js
new file mode 100644
index 0000000000..01a493a69e
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/spellchecker/plugin.js
@@ -0,0 +1,672 @@
+/**
+ * Compiled inline version. (Library mode)
+ */
+
+/*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
+/*globals $code */
+
+(function(exports, undefined) {
+ "use strict";
+
+ var modules = {};
+
+ function require(ids, callback) {
+ var module, defs = [];
+
+ for (var i = 0; i < ids.length; ++i) {
+ module = modules[ids[i]] || resolve(ids[i]);
+ if (!module) {
+ throw 'module definition dependecy not found: ' + ids[i];
+ }
+
+ defs.push(module);
+ }
+
+ callback.apply(null, defs);
+ }
+
+ function define(id, dependencies, definition) {
+ if (typeof id !== 'string') {
+ throw 'invalid module definition, module id must be defined and be a string';
+ }
+
+ if (dependencies === undefined) {
+ throw 'invalid module definition, dependencies must be specified';
+ }
+
+ if (definition === undefined) {
+ throw 'invalid module definition, definition function must be specified';
+ }
+
+ require(dependencies, function() {
+ modules[id] = definition.apply(null, arguments);
+ });
+ }
+
+ function defined(id) {
+ return !!modules[id];
+ }
+
+ function resolve(id) {
+ var target = exports;
+ var fragments = id.split(/[.\/]/);
+
+ for (var fi = 0; fi < fragments.length; ++fi) {
+ if (!target[fragments[fi]]) {
+ return;
+ }
+
+ target = target[fragments[fi]];
+ }
+
+ return target;
+ }
+
+ function expose(ids) {
+ for (var i = 0; i < ids.length; i++) {
+ var target = exports;
+ var id = ids[i];
+ var fragments = id.split(/[.\/]/);
+
+ for (var fi = 0; fi < fragments.length - 1; ++fi) {
+ if (target[fragments[fi]] === undefined) {
+ target[fragments[fi]] = {};
+ }
+
+ target = target[fragments[fi]];
+ }
+
+ target[fragments[fragments.length - 1]] = modules[id];
+ }
+ }
+
+// Included from: js/tinymce/plugins/spellchecker/classes/DomTextMatcher.js
+
+/**
+ * DomTextMatcher.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/**
+ * This class logic for filtering text and matching words.
+ *
+ * @class tinymce.spellcheckerplugin.TextFilter
+ * @private
+ */
+define("tinymce/spellcheckerplugin/DomTextMatcher", [], function() {
+ // Based on work developed by: James Padolsey http://james.padolsey.com
+ // released under UNLICENSE that is compatible with LGPL
+ // TODO: Handle contentEditable edgecase:
+ // texttexttexttexttext
+ return function(regex, node, schema) {
+ var m, matches = [], text, count = 0, doc;
+ var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
+
+ doc = node.ownerDocument;
+ blockElementsMap = schema.getBlockElements(); // H1-H6, P, TD etc
+ hiddenTextElementsMap = schema.getWhiteSpaceElements(); // TEXTAREA, PRE, STYLE, SCRIPT
+ shortEndedElementsMap = schema.getShortEndedElements(); // BR, IMG, INPUT
+
+ function getMatchIndexes(m) {
+ if (!m[0]) {
+ throw 'findAndReplaceDOMText cannot handle zero-length matches';
+ }
+
+ var index = m.index;
+
+ return [index, index + m[0].length, [m[0]]];
+ }
+
+ function getText(node) {
+ var txt;
+
+ if (node.nodeType === 3) {
+ return node.data;
+ }
+
+ if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
+ return '';
+ }
+
+ txt = '';
+
+ if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
+ txt += '\n';
+ }
+
+ if ((node = node.firstChild)) {
+ do {
+ txt += getText(node);
+ } while ((node = node.nextSibling));
+ }
+
+ return txt;
+ }
+
+ function stepThroughMatches(node, matches, replaceFn) {
+ var startNode, endNode, startNodeIndex,
+ endNodeIndex, innerNodes = [], atIndex = 0, curNode = node,
+ matchLocation = matches.shift(), matchIndex = 0;
+
+ out: while (true) {
+ if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName]) {
+ atIndex++;
+ }
+
+ if (curNode.nodeType === 3) {
+ if (!endNode && curNode.length + atIndex >= matchLocation[1]) {
+ // We've found the ending
+ endNode = curNode;
+ endNodeIndex = matchLocation[1] - atIndex;
+ } else if (startNode) {
+ // Intersecting node
+ innerNodes.push(curNode);
+ }
+
+ if (!startNode && curNode.length + atIndex > matchLocation[0]) {
+ // We've found the match start
+ startNode = curNode;
+ startNodeIndex = matchLocation[0] - atIndex;
+ }
+
+ atIndex += curNode.length;
+ }
+
+ if (startNode && endNode) {
+ curNode = replaceFn({
+ startNode: startNode,
+ startNodeIndex: startNodeIndex,
+ endNode: endNode,
+ endNodeIndex: endNodeIndex,
+ innerNodes: innerNodes,
+ match: matchLocation[2],
+ matchIndex: matchIndex
+ });
+
+ // replaceFn has to return the node that replaced the endNode
+ // and then we step back so we can continue from the end of the
+ // match:
+ atIndex -= (endNode.length - endNodeIndex);
+ startNode = null;
+ endNode = null;
+ innerNodes = [];
+ matchLocation = matches.shift();
+ matchIndex++;
+
+ if (!matchLocation) {
+ break; // no more matches
+ }
+ } else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
+ // Move down
+ curNode = curNode.firstChild;
+ continue;
+ } else if (curNode.nextSibling) {
+ // Move forward:
+ curNode = curNode.nextSibling;
+ continue;
+ }
+
+ // Move forward or up:
+ while (true) {
+ if (curNode.nextSibling) {
+ curNode = curNode.nextSibling;
+ break;
+ } else if (curNode.parentNode !== node) {
+ curNode = curNode.parentNode;
+ } else {
+ break out;
+ }
+ }
+ }
+ }
+
+ /**
+ * Generates the actual replaceFn which splits up text nodes
+ * and inserts the replacement element.
+ */
+ function genReplacer(nodeName) {
+ var makeReplacementNode;
+
+ if (typeof nodeName != 'function') {
+ var stencilNode = nodeName.nodeType ? nodeName : doc.createElement(nodeName);
+
+ makeReplacementNode = function(fill, matchIndex) {
+ var clone = stencilNode.cloneNode(false);
+
+ clone.setAttribute('data-mce-index', matchIndex);
+
+ if (fill) {
+ clone.appendChild(doc.createTextNode(fill));
+ }
+
+ return clone;
+ };
+ } else {
+ makeReplacementNode = nodeName;
+ }
+
+ return function replace(range) {
+ var before, after, parentNode, startNode = range.startNode,
+ endNode = range.endNode, matchIndex = range.matchIndex;
+
+ if (startNode === endNode) {
+ var node = startNode;
+
+ parentNode = node.parentNode;
+ if (range.startNodeIndex > 0) {
+ // Add `before` text node (before the match)
+ before = doc.createTextNode(node.data.substring(0, range.startNodeIndex));
+ parentNode.insertBefore(before, node);
+ }
+
+ // Create the replacement node:
+ var el = makeReplacementNode(range.match[0], matchIndex);
+ parentNode.insertBefore(el, node);
+ if (range.endNodeIndex < node.length) {
+ // Add `after` text node (after the match)
+ after = doc.createTextNode(node.data.substring(range.endNodeIndex));
+ parentNode.insertBefore(after, node);
+ }
+
+ node.parentNode.removeChild(node);
+
+ return el;
+ } else {
+ // Replace startNode -> [innerNodes...] -> endNode (in that order)
+ before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
+ after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
+ var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
+ var innerEls = [];
+
+ for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
+ var innerNode = range.innerNodes[i];
+ var innerEl = makeReplacementNode(innerNode.data, matchIndex);
+ innerNode.parentNode.replaceChild(innerEl, innerNode);
+ innerEls.push(innerEl);
+ }
+
+ var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
+
+ parentNode = startNode.parentNode;
+ parentNode.insertBefore(before, startNode);
+ parentNode.insertBefore(elA, startNode);
+ parentNode.removeChild(startNode);
+
+ parentNode = endNode.parentNode;
+ parentNode.insertBefore(elB, endNode);
+ parentNode.insertBefore(after, endNode);
+ parentNode.removeChild(endNode);
+
+ return elB;
+ }
+ };
+ }
+
+ text = getText(node);
+ if (text && regex.global) {
+ while ((m = regex.exec(text))) {
+ matches.push(getMatchIndexes(m));
+ }
+ }
+
+ function filter(callback) {
+ var filteredMatches = [];
+
+ each(function(match, i) {
+ if (callback(match, i)) {
+ filteredMatches.push(match);
+ }
+ });
+
+ matches = filteredMatches;
+
+ /*jshint validthis:true*/
+ return this;
+ }
+
+ function each(callback) {
+ for (var i = 0, l = matches.length; i < l; i++) {
+ if (callback(matches[i], i) === false) {
+ break;
+ }
+ }
+
+ /*jshint validthis:true*/
+ return this;
+ }
+
+ function mark(replacementNode) {
+ if (matches.length) {
+ count = matches.length;
+ stepThroughMatches(node, matches, genReplacer(replacementNode));
+ }
+
+ /*jshint validthis:true*/
+ return this;
+ }
+
+ return {
+ text: text,
+ count: count,
+ matches: matches,
+ each: each,
+ filter: filter,
+ mark: mark
+ };
+ };
+});
+
+// Included from: js/tinymce/plugins/spellchecker/classes/Plugin.js
+
+/**
+ * Plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*jshint camelcase:false */
+
+/**
+ * This class contains all core logic for the spellchecker plugin.
+ *
+ * @class tinymce.spellcheckerplugin.Plugin
+ * @private
+ */
+define("tinymce/spellcheckerplugin/Plugin", [
+ "tinymce/spellcheckerplugin/DomTextMatcher",
+ "tinymce/PluginManager",
+ "tinymce/util/Tools",
+ "tinymce/ui/Menu",
+ "tinymce/dom/DOMUtils",
+ "tinymce/util/JSONRequest",
+ "tinymce/util/URI"
+], function(DomTextMatcher, PluginManager, Tools, Menu, DOMUtils, JSONRequest, URI) {
+ PluginManager.add('spellchecker', function(editor, url) {
+ var lastSuggestions, started, suggestionsMenu, settings = editor.settings;
+
+ function isEmpty(obj) {
+ /*jshint unused:false*/
+ for (var name in obj) {
+ return false;
+ }
+
+ return true;
+ }
+
+ function showSuggestions(target, word) {
+ var items = [], suggestions = lastSuggestions[word];
+
+ Tools.each(suggestions, function(suggestion) {
+ items.push({
+ text: suggestion,
+ onclick: function() {
+ editor.insertContent(suggestion);
+ checkIfFinished();
+ }
+ });
+ });
+
+ items.push.apply(items, [
+ {text: '-'},
+
+ {text: 'Ignore', onclick: function() {
+ ignoreWord(target, word);
+ }},
+
+ {text: 'Ignore all', onclick: function() {
+ ignoreWord(target, word, true);
+ }},
+
+ {text: 'Finish', onclick: finish}
+ ]);
+
+ // Render menu
+ suggestionsMenu = new Menu({
+ items: items,
+ context: 'contextmenu',
+ onautohide: function(e) {
+ if (e.target.className.indexOf('spellchecker') != -1) {
+ e.preventDefault();
+ }
+ },
+ onhide: function() {
+ suggestionsMenu.remove();
+ suggestionsMenu = null;
+ }
+ });
+
+ suggestionsMenu.renderTo(document.body);
+
+ // Position menu
+ var pos = DOMUtils.DOM.getPos(editor.getContentAreaContainer());
+ var targetPos = editor.dom.getPos(target);
+
+ pos.x += targetPos.x;
+ pos.y += targetPos.y;
+
+ suggestionsMenu.moveTo(pos.x, pos.y + target.offsetHeight);
+ }
+
+ function spellcheck() {
+ var textFilter, words = [], uniqueWords = {};
+
+ if (started) {
+ finish();
+ return;
+ }
+
+ started = true;
+
+ function doneCallback(suggestions) {
+ editor.setProgressState(false);
+
+ if (isEmpty(suggestions)) {
+ editor.windowManager.alert('No misspellings found');
+ started = false;
+ return;
+ }
+
+ lastSuggestions = suggestions;
+
+ textFilter.filter(function(match) {
+ return !!suggestions[match[2][0]];
+ }).mark(editor.dom.create('span', {
+ "class": 'mce-spellchecker-word',
+ "data-mce-bogus": 1
+ }));
+
+ textFilter = null;
+ editor.fire('SpellcheckStart');
+ }
+
+ // Regexp for finding word specific characters this will split words by
+ // spaces, quotes, copy right characters etc. It's escaped with unicode characters
+ // to make it easier to output scripts on servers using different encodings
+ // so if you add any characters outside the 128 byte range make sure to escape it
+ var nonWordSeparatorCharacters = editor.getParam('spellchecker_wordchar_pattern') || new RegExp("[^" +
+ "\\s!\"#$%&()*+,-./:;<=>?@[\\]^_{|}`" +
+ "\u00a7\u00a9\u00ab\u00ae\u00b1\u00b6\u00b7\u00b8\u00bb" +
+ "\u00bc\u00bd\u00be\u00bf\u00d7\u00f7\u00a4\u201d\u201c\u201e" +
+ "]+", "g");
+
+ // Find all words and make an unique words array
+ textFilter = new DomTextMatcher(nonWordSeparatorCharacters, editor.getBody(), editor.schema).each(function(match) {
+ var word = match[2][0];
+
+ // TODO: Fix so it remembers correctly spelled words
+ if (!uniqueWords[word]) {
+ // Ignore numbers and single character words
+ if (/^\d+$/.test(word) || word.length == 1) {
+ return;
+ }
+
+ words.push(word);
+ uniqueWords[word] = true;
+ }
+ });
+
+ function defaultSpellcheckCallback(method, words, doneCallback) {
+ JSONRequest.sendRPC({
+ url: new URI(url).toAbsolute(settings.spellchecker_rpc_url),
+ method: method,
+ params: {
+ lang: settings.spellchecker_language || "en",
+ words: words
+ },
+ success: function(result) {
+ doneCallback(result);
+ },
+ error: function(error, xhr) {
+ if (error == "JSON Parse error.") {
+ error = "Non JSON response:" + xhr.responseText;
+ } else {
+ error = "Error: " + error;
+ }
+
+ editor.windowManager.alert(error);
+ editor.setProgressState(false);
+ textFilter = null;
+ started = false;
+ }
+ });
+ }
+
+ editor.setProgressState(true);
+
+ var spellCheckCallback = settings.spellchecker_callback || defaultSpellcheckCallback;
+ spellCheckCallback("spellcheck", words, doneCallback);
+ }
+
+ function checkIfFinished() {
+ if (!editor.dom.select('span.mce-spellchecker-word').length) {
+ finish();
+ }
+ }
+
+ function unwrap(node) {
+ var parentNode = node.parentNode;
+ parentNode.insertBefore(node.firstChild, node);
+ node.parentNode.removeChild(node);
+ }
+
+ function ignoreWord(target, word, all) {
+ if (all) {
+ Tools.each(editor.dom.select('span.mce-spellchecker-word'), function(item) {
+ var text = item.innerText || item.textContent;
+
+ if (text == word) {
+ unwrap(item);
+ }
+ });
+ } else {
+ unwrap(target);
+ }
+
+ checkIfFinished();
+ }
+
+ function finish() {
+ var i, nodes, node;
+
+ started = false;
+ node = editor.getBody();
+ nodes = node.getElementsByTagName('span');
+ i = nodes.length;
+ while (i--) {
+ node = nodes[i];
+ if (node.getAttribute('data-mce-index')) {
+ unwrap(node);
+ }
+ }
+
+ editor.fire('SpellcheckEnd');
+ }
+
+ function selectMatch(index) {
+ var nodes, i, spanElm, spanIndex = -1, startContainer, endContainer;
+
+ index = "" + index;
+ nodes = editor.getBody().getElementsByTagName("span");
+ for (i = 0; i < nodes.length; i++) {
+ spanElm = nodes[i];
+ if (spanElm.className == "mce-spellchecker-word") {
+ spanIndex = spanElm.getAttribute('data-mce-index');
+ if (spanIndex === index) {
+ spanIndex = index;
+
+ if (!startContainer) {
+ startContainer = spanElm.firstChild;
+ }
+
+ endContainer = spanElm.firstChild;
+ }
+
+ if (spanIndex !== index && endContainer) {
+ break;
+ }
+ }
+ }
+
+ var rng = editor.dom.createRng();
+ rng.setStart(startContainer, 0);
+ rng.setEnd(endContainer, endContainer.length);
+ editor.selection.setRng(rng);
+
+ return rng;
+ }
+
+ editor.on('click', function(e) {
+ if (e.target.className == "mce-spellchecker-word") {
+ e.preventDefault();
+
+ var rng = selectMatch(e.target.getAttribute('data-mce-index'));
+ showSuggestions(e.target, rng.toString());
+ }
+ });
+
+ editor.addMenuItem('spellchecker', {
+ text: 'Spellcheck',
+ context: 'tools',
+ onclick: spellcheck,
+ selectable: true,
+ onPostRender: function() {
+ var self = this;
+
+ editor.on('SpellcheckStart SpellcheckEnd', function() {
+ self.active(started);
+ });
+ }
+ });
+
+ editor.addButton('spellchecker', {
+ tooltip: 'Spellcheck',
+ onclick: spellcheck,
+ onPostRender: function() {
+ var self = this;
+
+ editor.on('SpellcheckStart SpellcheckEnd', function() {
+ self.active(started);
+ });
+ }
+ });
+
+ editor.on('remove', function() {
+ if (suggestionsMenu) {
+ suggestionsMenu.remove();
+ suggestionsMenu = null;
+ }
+ });
+ });
+});
+
+expose(["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/spellcheckerplugin/Plugin"]);
+})(this);
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/spellchecker/plugin.min.js b/src/wp-includes/js/tinymce/plugins/spellchecker/plugin.min.js
new file mode 100644
index 0000000000..2e40b272b7
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/spellchecker/plugin.min.js
@@ -0,0 +1 @@
+!function(e,t){"use strict";function n(e,t){for(var n,r=[],o=0;o=s[1]?(o=d,a=s[1]-l):r&&c.push(d),!r&&d.length+l>s[0]&&(r=d,i=s[0]-l),l+=d.length),r&&o){if(d=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:a,innerNodes:c,match:s[2],matchIndex:u}),l-=o.length-a,r=null,o=null,c=[],s=t.shift(),u++,!s)break}else{if((!m[d.nodeName]||p[d.nodeName])&&d.firstChild){d=d.firstChild;continue}if(d.nextSibling){d=d.nextSibling;continue}}for(;;){if(d.nextSibling){d=d.nextSibling;break}if(d.parentNode===e)break e;d=d.parentNode}}}function a(e){var t;if("function"!=typeof e){var n=e.nodeType?e:g.createElement(e);t=function(e,t){var r=n.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(g.createTextNode(e)),r}}else t=e;return function r(e){var n,r,o,i=e.startNode,a=e.endNode,c=e.matchIndex;if(i===a){var l=i;o=l.parentNode,e.startNodeIndex>0&&(n=g.createTextNode(l.data.substring(0,e.startNodeIndex)),o.insertBefore(n,l));var d=t(e.match[0],c);return o.insertBefore(d,l),e.endNodeIndexf;++f){var p=e.innerNodes[f],m=t(p.data,c);p.parentNode.replaceChild(m,p),u.push(m)}var v=t(a.data.substring(0,e.endNodeIndex),c);return o=i.parentNode,o.insertBefore(n,i),o.insertBefore(s,i),o.removeChild(i),o=a.parentNode,o.insertBefore(v,a),o.insertBefore(r,a),o.removeChild(a),v}}function c(e){var t=[];return l(function(n,r){e(n,r)&&t.push(n)}),u=t,this}function l(e){for(var t=0,n=u.length;n>t&&e(u[t],t)!==!1;t++);return this}function d(e){return u.length&&(h=u.length,i(t,u,a(e))),this}var s,u=[],f,h=0,g,p,m,v;if(g=t.ownerDocument,p=n.getBlockElements(),m=n.getWhiteSpaceElements(),v=n.getShortEndedElements(),f=o(t),f&&e.global)for(;s=e.exec(f);)u.push(r(s));return{text:f,count:h,matches:u,each:l,filter:c,mark:d}}}),r(d,[l,s,u,f,h,g,p],function(e,t,n,r,o,i,a){t.add("spellchecker",function(t,c){function l(e){for(var t in e)return!1;return!0}function d(e,i){var a=[],c=m[i];n.each(c,function(e){a.push({text:e,onclick:function(){t.insertContent(e),u()}})}),a.push.apply(a,[{text:"-"},{text:"Ignore",onclick:function(){h(e,i)}},{text:"Ignore all",onclick:function(){h(e,i,!0)}},{text:"Finish",onclick:g}]),N=new r({items:a,context:"contextmenu",onautohide:function(e){-1!=e.target.className.indexOf("spellchecker")&&e.preventDefault()},onhide:function(){N.remove(),N=null}}),N.renderTo(document.body);var l=o.DOM.getPos(t.getContentAreaContainer()),d=t.dom.getPos(e);l.x+=d.x,l.y+=d.y,N.moveTo(l.x,l.y+e.offsetHeight)}function s(){function n(e){return t.setProgressState(!1),l(e)?(t.windowManager.alert("No misspellings found"),v=!1,void 0):(m=e,o.filter(function(t){return!!e[t[2][0]]}).mark(t.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1})),o=null,t.fire("SpellcheckStart"),void 0)}function r(e,n,r){i.sendRPC({url:new a(c).toAbsolute(x.spellchecker_rpc_url),method:e,params:{lang:x.spellchecker_language||"en",words:n},success:function(e){r(e)},error:function(e,n){e="JSON Parse error."==e?"Non JSON response:"+n.responseText:"Error: "+e,t.windowManager.alert(e),t.setProgressState(!1),o=null,v=!1}})}var o,d=[],s={};if(v)return g(),void 0;v=!0;var u=t.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e]+',"g");o=new e(u,t.getBody(),t.schema).each(function(e){var t=e[2][0];if(!s[t]){if(/^\d+$/.test(t)||1==t.length)return;d.push(t),s[t]=!0}}),t.setProgressState(!0);var f=x.spellchecker_callback||r;f("spellcheck",d,n)}function u(){t.dom.select("span.mce-spellchecker-word").length||g()}function f(e){var t=e.parentNode;t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function h(e,r,o){o?n.each(t.dom.select("span.mce-spellchecker-word"),function(e){var t=e.innerText||e.textContent;t==r&&f(e)}):f(e),u()}function g(){var e,n,r;for(v=!1,r=t.getBody(),n=r.getElementsByTagName("span"),e=n.length;e--;)r=n[e],r.getAttribute("data-mce-index")&&f(r);t.fire("SpellcheckEnd")}function p(e){var n,r,o,i=-1,a,c;for(e=""+e,n=t.getBody().getElementsByTagName("span"),r=0;rdecode($raw);
if (isset($config['general.engine'])) {
$spellchecker = new $config['general.engine']($config);
$result = call_user_func_array(array($spellchecker, $input['method']), $input['params']);
-} else
- die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
-
+} else {
+// die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}');
+ die('{"error":"You must choose spellchecker engine in the config.php file."}');
+}
// Request and response id should always be the same
$output = array(
"id" => $input->id,
diff --git a/src/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js b/src/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js
deleted file mode 100644
index 2c51291615..0000000000
--- a/src/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},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+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})();
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js
deleted file mode 100644
index 94f45320d6..0000000000
--- a/src/wp-includes/js/tinymce/plugins/tabfocus/editor_plugin_src.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * 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]:not(iframe)');
-
- function canSelectRecursive(e) {
- return e.nodeName==="BODY" || (e.type != 'hidden' &&
- !(e.style.display == "none") &&
- !(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
- }
- function canSelectInOldIe(el) {
- return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
- }
- function isOldIe() {
- return tinymce.isIE6 || tinymce.isIE7;
- }
- function canSelect(el) {
- return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
- }
-
- each(el, function(e, i) {
- if (e.id == ed.id) {
- x = i;
- return false;
- }
- });
- if (d > 0) {
- for (i = x + 1; i < el.length; i++) {
- if (canSelect(el[i]))
- return el[i];
- }
- } else {
- for (i = x - 1; i >= 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 && (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 + "." + tinymce.minorVersion
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/tabfocus/plugin.js b/src/wp-includes/js/tinymce/plugins/tabfocus/plugin.js
new file mode 100644
index 0000000000..9dd6b40366
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/tabfocus/plugin.js
@@ -0,0 +1,122 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true */
+
+tinymce.PluginManager.add('tabfocus', function(editor) {
+ var DOM = tinymce.DOM, each = tinymce.each, explode = tinymce.explode;
+
+ function tabCancel(e) {
+ if (e.keyCode === 9) {
+ e.preventDefault();
+ }
+ }
+
+ function tabHandler(e) {
+ var x, el, v, i;
+
+ function find(direction) {
+ el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
+
+ function canSelectRecursive(e) {
+ return e.nodeName==="BODY" || (e.type != 'hidden' &&
+ e.style.display != "none" &&
+ e.style.visibility != "hidden" && canSelectRecursive(e.parentNode));
+ }
+
+ function canSelectInOldIe(el) {
+ return el.tabIndex || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
+ }
+
+ function canSelect(el) {
+ return ((!canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
+ }
+
+ each(el, function(e, i) {
+ if (e.id == editor.id) {
+ x = i;
+ return false;
+ }
+ });
+ if (direction > 0) {
+ for (i = x + 1; i < el.length; i++) {
+ if (canSelect(el[i])) {
+ return el[i];
+ }
+ }
+ } else {
+ for (i = x - 1; i >= 0; i--) {
+ if (canSelect(el[i])) {
+ return el[i];
+ }
+ }
+ }
+
+ return null;
+ }
+
+ if (e.keyCode === 9) {
+ v = explode(editor.getParam('tab_focus', editor.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) {
+ var focusEditor = tinymce.get(el.id || el.name);
+
+ if (el.id && focusEditor) {
+ focusEditor.focus();
+ } else {
+ window.setTimeout(function() {
+ if (!tinymce.Env.webkit) {
+ window.focus();
+ }
+
+ el.focus();
+ }, 10);
+ }
+
+ e.preventDefault();
+ }
+ }
+ }
+
+ editor.on('init', function() {
+ if (editor.inline) {
+ // Remove default tabIndex in inline mode
+ tinymce.DOM.setAttrib(editor.getBody(), 'tabIndex', null);
+ }
+ });
+
+ editor.on('keyup', tabCancel);
+
+ if (tinymce.Env.gecko) {
+ editor.on('keypress keydown', tabHandler);
+ } else {
+ editor.on('keydown', tabHandler);
+ }
+});
diff --git a/src/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js b/src/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js
new file mode 100644
index 0000000000..bd71785a45
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/tabfocus/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("tabfocus",function(e){function n(e){9===e.keyCode&&e.preventDefault()}function t(n){function t(n){function t(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&t(e.parentNode)}function r(e){return e.tabIndex||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName}function a(e){return!r(e)&&"-1"!=e.getAttribute("tabindex")&&t(e)}if(d=i.select(":input:enabled,*[tabindex]:not(iframe)"),o(d,function(n,t){return n.id==e.id?(u=t,!1):void 0}),n>0){for(c=u+1;c=0;c--)if(a(d[c]))return d[c];return null}var u,d,a,c;if(9===n.keyCode&&(a=r(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==a.length&&(a[1]=a[0],a[0]=":prev"),d=n.shiftKey?":prev"==a[0]?t(-1):i.get(a[0]):":next"==a[1]?t(1):i.get(a[1]))){var f=tinymce.get(d.id||d.name);d.id&&f?f.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),d.focus()},10),n.preventDefault()}}var i=tinymce.DOM,o=tinymce.each,r=tinymce.explode;e.on("init",function(){e.inline&&tinymce.DOM.setAttrib(e.getBody(),"tabIndex",null)}),e.on("keyup",n),tinymce.Env.gecko?e.on("keypress keydown",t):e.on("keydown",t)});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/textcolor/plugin.js b/src/wp-includes/js/tinymce/plugins/textcolor/plugin.js
new file mode 100644
index 0000000000..ab2dd5d06b
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/textcolor/plugin.js
@@ -0,0 +1,152 @@
+/**
+ * plugin.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true */
+
+tinymce.PluginManager.add('textcolor', function(editor) {
+ function mapColors() {
+ var i, colors = [], colorMap;
+
+ colorMap = editor.settings.textcolor_map || [
+ "000000", "Black",
+ "993300", "Burnt orange",
+ "333300", "Dark olive",
+ "003300", "Dark green",
+ "003366", "Dark azure",
+ "000080", "Navy Blue",
+ "333399", "Indigo",
+ "333333", "Very dark gray",
+ "800000", "Maroon",
+ "FF6600", "Orange",
+ "808000", "Olive",
+ "008000", "Green",
+ "008080", "Teal",
+ "0000FF", "Blue",
+ "666699", "Grayish blue",
+ "808080", "Gray",
+ "FF0000", "Red",
+ "FF9900", "Amber",
+ "99CC00", "Yellow green",
+ "339966", "Sea green",
+ "33CCCC", "Turquoise",
+ "3366FF", "Royal blue",
+ "800080", "Purple",
+ "999999", "Medium gray",
+ "FF00FF", "Magenta",
+ "FFCC00", "Gold",
+ "FFFF00", "Yellow",
+ "00FF00", "Lime",
+ "00FFFF", "Aqua",
+ "00CCFF", "Sky blue",
+ "993366", "Brown",
+ "C0C0C0", "Silver",
+ "FF99CC", "Pink",
+ "FFCC99", "Peach",
+ "FFFF99", "Light yellow",
+ "CCFFCC", "Pale green",
+ "CCFFFF", "Pale cyan",
+ "99CCFF", "Light sky blue",
+ "CC99FF", "Plum",
+ "FFFFFF", "White"
+ ];
+
+ for (i = 0; i < colorMap.length; i += 2) {
+ colors.push({
+ text: colorMap[i + 1],
+ color: colorMap[i]
+ });
+ }
+
+ return colors;
+ }
+
+ function renderColorPicker() {
+ var ctrl = this, colors, color, html, last, rows, cols, x, y, i;
+
+ colors = mapColors();
+
+ html = '';
+ last = colors.length - 1;
+ rows = editor.settings.textcolor_rows || 5;
+ cols = editor.settings.textcolor_cols || 8;
+
+ for (y = 0; y < rows; y++) {
+ html += '';
+
+ for (x = 0; x < cols; x++) {
+ i = y * cols + x;
+
+ if (i > last) {
+ html += ' ';
+ } else {
+ color = colors[i];
+ html += (
+ '' +
+ '' +
+ '' +
+ ' '
+ );
+ }
+ }
+
+ html += ' ';
+ }
+
+ html += '
';
+
+ return html;
+ }
+
+ function onPanelClick(e) {
+ var buttonCtrl = this.parent(), value;
+
+ if ((value = e.target.getAttribute('data-mce-color'))) {
+ buttonCtrl.hidePanel();
+ value = '#' + value;
+ buttonCtrl.color(value);
+ editor.execCommand(buttonCtrl.settings.selectcmd, false, value);
+ }
+ }
+
+ function onButtonClick() {
+ var self = this;
+
+ if (self._color) {
+ editor.execCommand(self.settings.selectcmd, false, self._color);
+ }
+ }
+
+ editor.addButton('forecolor', {
+ type: 'colorbutton',
+ tooltip: 'Text color',
+ selectcmd: 'ForeColor',
+ panel: {
+ html: renderColorPicker,
+ onclick: onPanelClick
+ },
+ onclick: onButtonClick
+ });
+
+ editor.addButton('backcolor', {
+ type: 'colorbutton',
+ tooltip: 'Background color',
+ selectcmd: 'HiliteColor',
+ panel: {
+ html: renderColorPicker,
+ onclick: onPanelClick
+ },
+ onclick: onButtonClick
+ });
+});
diff --git a/src/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js b/src/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js
new file mode 100644
index 0000000000..ee943e497f
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/textcolor/plugin.min.js
@@ -0,0 +1 @@
+tinymce.PluginManager.add("textcolor",function(e){function o(){var o,t,r=[];for(t=e.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Brown","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],o=0;o',c=t.length-1,n=e.settings.textcolor_rows||5,a=e.settings.textcolor_cols||8,i=0;n>i;i++){for(l+="",F=0;a>F;F++)d=i*a+F,d>c?l+=" ":(r=t[d],l+=''+""+" ");l+=" "}return l+=""}function r(o){var t,r=this.parent();(t=o.target.getAttribute("data-mce-color"))&&(r.hidePanel(),t="#"+t,r.color(t),e.execCommand(r.settings.selectcmd,!1,t))}function l(){var o=this;o._color&&e.execCommand(o.settings.selectcmd,!1,o._color)}e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",selectcmd:"ForeColor",panel:{html:t,onclick:r},onclick:l}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",selectcmd:"HiliteColor",panel:{html:t,onclick:r},onclick:l})});
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
deleted file mode 100644
index 4f7d587257..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
+++ /dev/null
@@ -1,448 +0,0 @@
-/* global tinymce, getUserSetting, setUserSetting, switchEditors, autosave */
-/**
- * WordPress plugin.
- */
-
-(function() {
- var DOM = tinymce.DOM;
-
- tinymce.create('tinymce.plugins.WordPress', {
- init : function(ed, url) {
- var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick, mod_key, style;
- moreHTML = '
';
- nextpageHTML = '
';
-
- 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) && 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() {
- if ( typeof wp !== 'undefined' && wp.media && wp.media.editor )
- wp.media.editor.open( ed.id );
- });
-
- // 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 && 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 && DIV ) {
- cls = ed.dom.hasClass(DL, a) ? 'alignnone' : a;
- DL.className = DL.className.replace(/align[^ '"]+\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');
- }
- }
- }
-
- if ( tinymce.isWebKit && ( 'InsertUnorderedList' == cmd || 'InsertOrderedList' == cmd ) ) {
- if ( !style )
- style = ed.dom.create('style', {'type': 'text/css'}, '#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}');
-
- ed.getDoc().head.appendChild( style );
- }
- });
-
- ed.onExecCommand.add( function( ed, cmd ) {
- if ( tinymce.isWebKit && style && ( 'InsertUnorderedList' == cmd || 'InsertOrderedList' == cmd ) )
- ed.dom.remove( style );
- });
-
- ed.onInit.add(function(ed) {
- var bodyClass = ed.getParam('body_class', ''), body = ed.getBody();
-
- // add body classes
- if ( bodyClass )
- bodyClass = bodyClass.split(' ');
- else
- bodyClass = [];
-
- if ( ed.getParam('directionality', '') == 'rtl' )
- bodyClass.push('rtl');
-
- if ( tinymce.isIE9 )
- bodyClass.push('ie9');
- else if ( tinymce.isIE8 )
- bodyClass.push('ie8');
- else if ( tinymce.isIE7 )
- bodyClass.push('ie7');
-
- if ( ed.id != 'wp_mce_fullscreen' && ed.id != 'mce_fullscreen' )
- bodyClass.push('wp-editor');
- else if ( ed.id == 'mce_fullscreen' )
- bodyClass.push('mce-fullscreen');
-
- tinymce.each( bodyClass, function(cls){
- if ( cls )
- ed.dom.addClass(body, cls);
- });
-
- // 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' && 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);
- }
- });
-
- // 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(/\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi, '<$1$2>');
- o.content = o.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi, '$1>');
- }
- });
- });
-
- // 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(/
(
|\u00a0|\uFEFF)?<\/p>/g, '
');
- });
-
- // Fix bug in iOS Safari where it's impossible to type after a touchstart event on the parent document.
- // Happens after zooming in or out while the keyboard is open. See #25131.
- if ( tinymce.isIOS5 ) {
- ed.onKeyDown.add( function() {
- if ( document.activeElement == document.body ) {
- ed.getWin().focus();
- }
- });
- }
-
- ed.onSaveContent.add(function(ed, o) {
- // If editor is hidden, we just want the textarea's value to be saved
- if ( ed.isHidden() )
- o.content = o.element.value;
- else if ( ed.getParam('wpautop', true) && typeof(switchEditors) == 'object' )
- 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
- mod_key = 'alt+shift';
-
- // if ( tinymce.isGecko ) // disable for mow, too many shortcuts conflicts
- // mod_key = 'ctrl+alt';
-
- ed.addShortcut(mod_key + '+c', 'justifycenter_desc', 'JustifyCenter');
- ed.addShortcut(mod_key + '+r', 'justifyright_desc', 'JustifyRight');
- ed.addShortcut(mod_key + '+l', 'justifyleft_desc', 'JustifyLeft');
- ed.addShortcut(mod_key + '+j', 'justifyfull_desc', 'JustifyFull');
- ed.addShortcut(mod_key + '+q', 'blockquote_desc', 'mceBlockQuote');
- ed.addShortcut(mod_key + '+u', 'bullist_desc', 'InsertUnorderedList');
- ed.addShortcut(mod_key + '+o', 'numlist_desc', 'InsertOrderedList');
- ed.addShortcut(mod_key + '+n', 'spellchecker.desc', 'mceSpellCheck');
- ed.addShortcut(mod_key + '+a', 'link_desc', 'WP_Link');
- ed.addShortcut(mod_key + '+s', 'unlink_desc', 'unlink');
- ed.addShortcut(mod_key + '+m', 'image_desc', 'WP_Medialib');
- ed.addShortcut(mod_key + '+z', 'wordpress.wp_adv_desc', 'WP_Adv');
- ed.addShortcut(mod_key + '+t', 'wordpress.wp_more_desc', 'WP_More');
- ed.addShortcut(mod_key + '+d', 'striketrough_desc', 'Strikethrough');
- ed.addShortcut(mod_key + '+h', 'help_desc', 'WP_Help');
- ed.addShortcut(mod_key + '+p', 'wordpress.wp_page_desc', 'WP_Page');
- ed.addShortcut('ctrl+s', 'save_desc', function(){if('function'==typeof autosave)autosave();});
-
- if ( /\bwpfullscreen\b/.test(ed.settings.plugins) )
- ed.addShortcut(mod_key + '+w', 'wordpress.wp_fullscreen_desc', 'wpFullScreen');
- else if ( /\bfullscreen\b/.test(ed.settings.plugins) )
- ed.addShortcut(mod_key + '+g', 'fullscreen.desc', 'mceFullScreen');
-
- // popup buttons for images and the gallery
- ed.onInit.add(function(ed) {
- tinymce.dom.Event.add(ed.getWin(), 'scroll', function() {
- ed.plugins.wordpress._hideButtons();
- });
- tinymce.dom.Event.add(ed.getBody(), 'dragstart', function() {
- ed.plugins.wordpress._hideButtons();
- });
- });
-
- ed.onBeforeExecCommand.add( function( ed ) {
- ed.plugins.wordpress._hideButtons();
- });
-
- ed.onSaveContent.add( function( ed ) {
- ed.plugins.wordpress._hideButtons();
- });
-
- ed.onMouseDown.add(function(ed, e) {
- if ( e.target.nodeName != 'IMG' )
- ed.plugins.wordpress._hideButtons();
- });
-
- ed.onKeyDown.add(function(ed, e){
- if ( e.which == tinymce.VK.DELETE || e.which == tinymce.VK.BACKSPACE )
- ed.plugins.wordpress._hideButtons();
- });
-
- closeOnClick = function(e){
- var id;
-
- if ( e.target.id == 'mceModalBlocker' || e.target.className == 'ui-widget-overlay' ) {
- for ( id in ed.windowManager.windows ) {
- ed.windowManager.close(null, id);
- }
- }
- };
-
- // close popups when clicking on the background
- tinymce.dom.Event.remove(document.body, 'click', closeOnClick);
- tinymce.dom.Event.add(document.body, 'click', closeOnClick);
- },
-
- 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 '
';
- });
- },
-
- _getEmbed : function(c) {
- return c.replace(/
]+>/g, function(a) {
- if ( a.indexOf('class="wp-oembed') != -1 ) {
- var u = a.match(/alt="([^\"]+)"/);
- 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'
- });
- },
-
- _hideButtons : function() {
- var DOM = tinymce.DOM;
- DOM.hide( DOM.select('#wp_editbtns, #wp_gallerybtns') );
- },
-
- // 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 = '
';
- nextpageHTML = '
';
-
- // 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, 'mce-wp-more') )
- o.name = 'wpmore';
- if ( ed.dom.hasClass(o.node, 'mce-wp-nextpage') )
- o.name = 'wppage';
- }
-
- });
- }
- });
-
- // Replace morebreak with images
- ed.onBeforeSetContent.add(function(ed, o) {
- if ( o.content ) {
- o.content = o.content.replace(//g, moreHTML);
- o.content = o.content.replace(//g, nextpageHTML);
- }
- });
-
- // Replace images with morebreak
- ed.onPostProcess.add(function(ed, o) {
- if (o.get)
- o.content = o.content.replace(/
]+>/g, function(im) {
- if (im.indexOf('class="mce-wp-more') !== -1) {
- var m, moretext = (m = im.match(/alt="(.*?)"/)) ? m[1] : '';
- im = '';
- }
- if (im.indexOf('class="mce-wp-nextpage') !== -1)
- im = '';
-
- 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' && ed.dom.hasClass(n, 'mce-wp-nextpage'));
- cm.setActive('wp_more', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mce-wp-more'));
- });
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('wordpress', tinymce.plugins.WordPress);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/img/audio.gif b/src/wp-includes/js/tinymce/plugins/wordpress/img/audio.gif
deleted file mode 100644
index f8ad22383a..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wordpress/img/audio.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/img/image.gif b/src/wp-includes/js/tinymce/plugins/wordpress/img/image.gif
deleted file mode 100644
index cf464afec1..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wordpress/img/image.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/img/media.gif b/src/wp-includes/js/tinymce/plugins/wordpress/img/media.gif
deleted file mode 100644
index 786e4f55de..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wordpress/img/media.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/img/page.gif b/src/wp-includes/js/tinymce/plugins/wordpress/img/page.gif
deleted file mode 100644
index 1cea78ac2b..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wordpress/img/page.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/img/video.gif b/src/wp-includes/js/tinymce/plugins/wordpress/img/video.gif
deleted file mode 100644
index ddd20b1279..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wordpress/img/video.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js b/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
new file mode 100644
index 0000000000..4cf15899b1
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
@@ -0,0 +1,417 @@
+/* global tinymce, autosave, getUserSetting, setUserSetting, switchEditors */
+tinymce.PluginManager.add( 'wordpress', function( editor ) {
+ var DOM = tinymce.DOM, wpAdvButton, modKey, style,
+ last = 0;
+
+ function toggleToolbars( state ) {
+ var iframe,
+ pixels = 0,
+ initial = state === 'hide',
+ toolbars = editor.theme.panel && editor.theme.panel.find('.toolbar');
+
+ if ( ! toolbars || toolbars.length < 2 || ( state === 'hide' && ! toolbars[1].visible() ) ) {
+ return;
+ }
+
+ if ( ! state && toolbars[1].visible() ) {
+ state = 'hide';
+ }
+
+ tinymce.each( toolbars, function( toolbar, i ) {
+ if ( i > 0 ) {
+ if ( state === 'hide' ) {
+ toolbar.hide();
+ pixels += 30;
+ } else {
+ toolbar.show();
+ pixels -= 30;
+ }
+ }
+ });
+
+ if ( pixels && ! initial ) {
+ iframe = editor.getContentAreaContainer().firstChild;
+ DOM.setStyle( iframe, 'height', iframe.clientHeight + pixels ); // Resize iframe
+
+ if ( state === 'hide' ) {
+ setUserSetting('hidetb', '1');
+ wpAdvButton && wpAdvButton.active( false );
+ } else {
+ setUserSetting('hidetb', '0');
+ wpAdvButton && wpAdvButton.active( true );
+ }
+ }
+ }
+
+ // Add the kitchen sink button :)
+ editor.addButton( 'wp_adv', {
+ tooltip: 'Toolbar Toggle',
+ cmd: 'WP_Adv',
+ onPostRender: function() {
+ wpAdvButton = this;
+ }
+ });
+
+ // Hide the toolbars after loading
+ editor.on( 'PostRender', function() {
+ if ( getUserSetting('hidetb', '1') === '1' ) {
+ toggleToolbars( 'hide' );
+ }
+ });
+
+ editor.addCommand( 'WP_Adv', function() {
+ toggleToolbars();
+ });
+
+ editor.on( 'focus', function() {
+ window.wpActiveEditor = editor.id;
+ });
+
+ // Replace Read More/Next Page tags with images
+ editor.on( 'BeforeSetContent', function( e ) {
+ if ( e.content ) {
+ if ( e.content.indexOf( '/g, function( match, moretext ) {
+ return '
';
+ });
+ }
+
+ if ( e.content.indexOf( '' ) !== -1 ) {
+ e.content = e.content.replace( //g,
+ '
' );
+ }
+ }
+ });
+
+ // Replace images with tags
+ editor.on( 'PostProcess', function( e ) {
+ if ( e.get ) {
+ e.content = e.content.replace(/
]+>/g, function( image ) {
+ var match, moretext = '';
+
+ if ( image.indexOf('wp-more-tag') !== -1 ) {
+ if ( image.indexOf('mce-wp-more') !== -1 ) {
+ if ( match = image.match( /data-wp-more="([^"]+)"/ ) ) {
+ moretext = match[1];
+ }
+
+ image = '';
+ } else if ( image.indexOf('mce-wp-nextpage') !== -1 ) {
+ image = '';
+ }
+ }
+
+ return image;
+ });
+ }
+ });
+
+ // Display the tag name instead of img in element path
+ editor.on( 'ResolveName', function( e ) {
+ var dom = editor.dom,
+ target = e.target;
+
+ if ( target.nodeName === 'IMG' && dom.hasClass( target, 'wp-more-tag' ) ) {
+ if ( dom.hasClass( target, 'mce-wp-more' ) ) {
+ e.name = 'more';
+ } else if ( dom.hasClass( target, 'mce-wp-nextpage' ) ) {
+ e.name = 'nextpage';
+ }
+ }
+ });
+
+ // Register commands
+ editor.addCommand( 'WP_More', function( tag ) {
+ var parent, html, title,
+ classname = 'wp-more-tag',
+ dom = editor.dom,
+ node = editor.selection.getNode();
+
+ tag = tag || 'more';
+ classname += ' mce-wp-' + tag;
+ title = tag === 'more' ? 'More...' : 'Next Page';
+ html = '
';
+
+ if ( node.nodeName === 'BODY' ) {
+ editor.insertContent( '' + html + '
' );
+ return;
+ }
+
+ // Get the top level parent node
+ parent = dom.getParent( node, function( found ) {
+ if ( found.parentNode && found.parentNode.nodeName === 'BODY' ) {
+ return true;
+ }
+
+ return false;
+ }, editor.getBody() );
+
+ if ( parent ) {
+ dom.insertAfter( dom.create( 'p', null, html ), parent );
+ }
+ });
+
+ editor.addCommand( 'WP_Page', function() {
+ editor.execCommand( 'WP_More', 'nextpage' );
+ });
+
+ editor.addCommand( 'WP_Help', function() {
+ editor.windowManager.open({
+ url: tinymce.baseURL + '/wp-mce-help.php',
+ width: 450,
+ height: 420,
+ inline: 1
+ });
+ });
+
+ editor.addCommand( 'WP_Medialib', function() {
+ if ( typeof wp !== 'undefined' && wp.media && wp.media.editor ) {
+ wp.media.editor.open( editor.id );
+ }
+ });
+
+ // Register buttons
+ editor.addButton( 'wp_more', {
+ tooltip: 'Insert Read More tag',
+ onclick: function() {
+ editor.execCommand( 'WP_More', 'more' );
+ }
+ });
+
+ editor.addButton( 'wp_page', {
+ tooltip: 'Page break',
+ onclick: function() {
+ editor.execCommand( 'WP_More', 'nextpage' );
+ }
+ });
+
+ editor.addButton( 'wp_help', {
+ tooltip: 'Help',
+ cmd: 'WP_Help'
+ });
+
+ // Menubar
+ // Insert->Add Media
+ if ( typeof wp !== 'undefined' && wp.media && wp.media.editor ) {
+ editor.addMenuItem( 'add_media', {
+ text: 'Add Media',
+ context: 'insert',
+ cmd: 'WP_Medialib'
+ });
+ }
+
+ // Insert "Read More..."
+ editor.addMenuItem( 'wp_more', {
+ text: 'Insert Read More tag',
+ context: 'insert',
+ onclick: function() {
+ editor.execCommand( 'WP_More', 'more' );
+ }
+ });
+
+ // Insert "Next Page"
+ editor.addMenuItem( 'wp_page', {
+ text: 'Page break',
+ context: 'insert',
+ onclick: function() {
+ editor.execCommand( 'WP_More', 'nextpage' );
+ }
+ });
+
+ editor.on( 'BeforeExecCommand', function(e) {
+ if ( tinymce.Env.webkit && ( e.command === 'InsertUnorderedList' || e.command === 'InsertOrderedList' ) ) {
+ if ( ! style ) {
+ style = editor.dom.create( 'style', {'type': 'text/css'},
+ '#tinymce,#tinymce span,#tinymce li,#tinymce li>span,#tinymce p,#tinymce p>span{font:medium sans-serif;color:#000;line-height:normal;}');
+ }
+
+ editor.getDoc().head.appendChild( style );
+ }
+ });
+
+ editor.on( 'ExecCommand', function( e ) {
+ if ( tinymce.Env.webkit && style &&
+ ( 'InsertUnorderedList' === e.command || 'InsertOrderedList' === e.command ) ) {
+
+ editor.dom.remove( style );
+ }
+ });
+
+ editor.on( 'init', function() {
+ var env = tinymce.Env,
+ bodyClass = ['mceContentBody'], // back-compat for themes that use this in editor-style.css...
+ body = editor.getBody();
+
+ if ( editor.getParam( 'directionality' ) === 'rtl' ) {
+ bodyClass.push('rtl');
+ }
+
+ if ( env.ie ) {
+ if ( parseInt( env.ie, 10 ) === 9 ) {
+ bodyClass.push('ie9');
+ } else if ( parseInt( env.ie, 10 ) === 8 ) {
+ bodyClass.push('ie8');
+ } else if ( env.ie < 8 ) {
+ bodyClass.push('ie7');
+ }
+ }
+
+ bodyClass.push('wp-editor');
+
+ tinymce.each( bodyClass, function( cls ) {
+ if ( cls ) {
+ editor.dom.addClass( body, cls );
+ }
+ });
+
+ // Remove invalid parent paragraphs when inserting HTML
+ // TODO: still needed?
+ editor.on( 'BeforeSetContent', function( e ) {
+ if ( e.content ) {
+ e.content = e.content.replace(/\s*<(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)( [^>]*)?>/gi, '<$1$2>');
+ e.content = e.content.replace(/<\/(p|div|ul|ol|dl|table|blockquote|h[1-6]|fieldset|pre|address)>\s*<\/p>/gi, '$1>');
+ }
+ });
+ });
+
+ // Word count
+ if ( typeof jQuery !== 'undefined' ) {
+ editor.on( 'keyup', function( e ) {
+ var key = e.keyCode || e.charCode;
+
+ if ( key === last ) {
+ return;
+ }
+
+ if ( 13 === key || 8 === last || 46 === last ) {
+ jQuery(document).triggerHandler( 'wpcountwords', [ editor.getContent({ format : 'raw' }) ] );
+ }
+
+ last = key;
+ });
+ }
+
+ editor.on( 'SaveContent', function( e ) {
+ // If editor is hidden, we just want the textarea's value to be saved
+ if ( editor.isHidden() ) {
+ e.content = e.element.value;
+ return;
+ }
+
+ // Keep empty paragraphs :(
+ e.content = e.content.replace( /
(
|\u00a0|\uFEFF)?<\/p>/g, '
' );
+
+ if ( editor.getParam( 'wpautop', true ) && typeof switchEditors !== 'undefined' ) {
+ e.content = switchEditors.pre_wpautop( e.content );
+ }
+ });
+
+ // Add custom shortcuts
+ modKey = 'alt+shift';
+
+ editor.addShortcut( modKey + '+c', '', 'JustifyCenter' );
+ editor.addShortcut( modKey + '+r', '', 'JustifyRight' );
+ editor.addShortcut( modKey + '+l', '', 'JustifyLeft' );
+ editor.addShortcut( modKey + '+j', '', 'JustifyFull' );
+ editor.addShortcut( modKey + '+q', '', 'mceBlockQuote' );
+ editor.addShortcut( modKey + '+u', '', 'InsertUnorderedList' );
+ editor.addShortcut( modKey + '+o', '', 'InsertOrderedList' );
+ editor.addShortcut( modKey + '+n', '', 'mceSpellCheck' );
+ editor.addShortcut( modKey + '+a', '', 'WP_Link' );
+ editor.addShortcut( modKey + '+s', '', 'unlink' );
+ editor.addShortcut( modKey + '+m', '', 'WP_Medialib' );
+ editor.addShortcut( modKey + '+z', '', 'WP_Adv' );
+ editor.addShortcut( modKey + '+t', '', 'WP_More' );
+ editor.addShortcut( modKey + '+d', '', 'Strikethrough' );
+ editor.addShortcut( modKey + '+h', '', 'WP_Help' );
+ editor.addShortcut( modKey + '+p', '', 'WP_Page' );
+ editor.addShortcut( 'ctrl+s', '', function() {
+ if ( typeof autosave === 'function' ) {
+ autosave();
+ }
+ });
+
+ // popup buttons for the gallery, etc.
+ editor.on( 'init', function() {
+ editor.dom.bind( editor.getWin(), 'scroll', function() {
+ _hideButtons();
+ });
+
+ editor.dom.bind( editor.getBody(), 'dragstart', function() {
+ _hideButtons();
+ });
+ });
+
+ editor.on( 'BeforeExecCommand', function() {
+ _hideButtons();
+ });
+
+ editor.on( 'SaveContent', function() {
+ _hideButtons();
+ });
+
+ editor.on( 'MouseDown', function( e ) {
+ if ( e.target.nodeName !== 'IMG' ) {
+ _hideButtons();
+ }
+ });
+
+ editor.on( 'keydown', function( e ) {
+ if ( e.which === tinymce.util.VK.DELETE || e.which === tinymce.util.VK.BACKSPACE ) {
+ _hideButtons();
+ }
+ });
+
+ // Internal functions
+ function _setEmbed( c ) {
+ return c.replace( /\[embed\]([\s\S]+?)\[\/embed\][\s\u00a0]*/g, function( a, b ) {
+ return '
';
+ });
+ }
+
+ function _getEmbed( c ) {
+ return c.replace( /
]+>/g, function( a ) {
+ if ( a.indexOf('class="wp-oembed') !== -1 ) {
+ var u = a.match( /alt="([^\"]+)"/ );
+
+ if ( u[1] ) {
+ a = '[embed]' + u[1] + '[/embed]';
+ }
+ }
+
+ return a;
+ });
+ }
+
+ function _showButtons( n, id ) {
+ var p1, p2, vp, X, Y;
+
+ vp = editor.dom.getViewPort( editor.getWin() );
+ p1 = DOM.getPos( editor.getContentAreaContainer() );
+ p2 = editor.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'
+ });
+ }
+
+ function _hideButtons() {
+ DOM.hide( DOM.select( '#wp_editbtns, #wp_gallerybtns' ) );
+ }
+
+ // Expose some functions (back-compat)
+ return {
+ _showButtons: _showButtons,
+ _hideButtons: _hideButtons,
+ _setEmbed: _setEmbed,
+ _getEmbed: _getEmbed
+ };
+});
diff --git a/src/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js
deleted file mode 100644
index 0270c0dcbf..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpdialogs/editor_plugin_src.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* global tinymce */
-(function() {
- tinymce.create('tinymce.plugins.WPDialogs', {
- init : function( ed ) {
- 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);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js b/src/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js
deleted file mode 100644
index db6f01e801..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpdialogs/js/popup.js
+++ /dev/null
@@ -1,436 +0,0 @@
-/**
- * popup.js
- *
- * An altered version of tinyMCEPopup to work in the same window as tinymce.
- *
- * ------------------------------------------------------------------
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-// Some global instances
-
-/**
- * TinyMCE popup/dialog helper class. This gives you easy access to the
- * parent editor instance and a bunch of other things. It's higly recommended
- * that you load this script into your dialogs.
- *
- * @static
- * @class tinyMCEPopup
- */
-var tinyMCEPopup = {
- /**
- * Initializes the popup this will be called automatically.
- *
- * @method init
- */
- init : function() {
- var t = this, w, ti;
-
- // Find window & API
- w = t.getWin();
- tinymce = w.tinymce;
- tinyMCE = w.tinyMCE;
- t.editor = tinymce.EditorManager.activeEditor;
- t.params = t.editor.windowManager.params;
- t.features = t.editor.windowManager.features;
- t.dom = tinymce.dom;
-
- // Setup on init listeners
- t.listeners = [];
- t.onInit = {
- add : function(f, s) {
- t.listeners.push({func : f, scope : s});
- }
- };
-
- t.isWindow = false;
- t.id = t.features.id;
- t.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window);
- },
-
- /**
- * Returns the reference to the parent window that opened the dialog.
- *
- * @method getWin
- * @return {Window} Reference to the parent window that opened the dialog.
- */
- getWin : function() {
- return window;
- },
-
- /**
- * Returns a window argument/parameter by name.
- *
- * @method getWindowArg
- * @param {String} n Name of the window argument to retrieve.
- * @param {String} dv Optional default value to return.
- * @return {String} Argument value or default value if it wasn't found.
- */
- getWindowArg : function(n, dv) {
- var v = this.params[n];
-
- return tinymce.is(v) ? v : dv;
- },
-
- /**
- * Returns a editor parameter/config option value.
- *
- * @method getParam
- * @param {String} n Name of the editor config option to retrieve.
- * @param {String} dv Optional default value to return.
- * @return {String} Parameter value or default value if it wasn't found.
- */
- getParam : function(n, dv) {
- return this.editor.getParam(n, dv);
- },
-
- /**
- * Returns a language item by key.
- *
- * @method getLang
- * @param {String} n Language item like mydialog.something.
- * @param {String} dv Optional default value to return.
- * @return {String} Language value for the item like "my string" or the default value if it wasn't found.
- */
- getLang : function(n, dv) {
- return this.editor.getLang(n, dv);
- },
-
- /**
- * Executed a command on editor that opened the dialog/popup.
- *
- * @method execCommand
- * @param {String} cmd Command to execute.
- * @param {Boolean} ui Optional boolean value if the UI for the command should be presented or not.
- * @param {Object} val Optional value to pass with the comman like an URL.
- * @param {Object} a Optional arguments object.
- */
- execCommand : function(cmd, ui, val, a) {
- a = a || {};
- a.skip_focus = 1;
-
- this.restoreSelection();
- return this.editor.execCommand(cmd, ui, val, a);
- },
-
- /**
- * Resizes the dialog to the inner size of the window. This is needed since various browsers
- * have different border sizes on windows.
- *
- * @method resizeToInnerSize
- */
- resizeToInnerSize : function() {
- var t = this;
-
- // Detach it to workaround a Chrome specific bug
- // https://sourceforge.net/tracker/?func=detail&atid=635682&aid=2926339&group_id=103281
- setTimeout(function() {
- var vp = t.dom.getViewPort(window);
-
- t.editor.windowManager.resizeBy(
- t.getWindowArg('mce_width') - vp.w,
- t.getWindowArg('mce_height') - vp.h,
- t.id || window
- );
- }, 0);
- },
-
- /**
- * Will executed the specified string when the page has been loaded. This function
- * was added for compatibility with the 2.x branch.
- *
- * @method executeOnLoad
- * @param {String} s String to evalutate on init.
- */
- executeOnLoad : function(s) {
- this.onInit.add(function() {
- eval(s);
- });
- },
-
- /**
- * Stores the current editor selection for later restoration. This can be useful since some browsers
- * loses its selection if a control element is selected/focused inside the dialogs.
- *
- * @method storeSelection
- */
- storeSelection : function() {
- this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
- },
-
- /**
- * Restores any stored selection. This can be useful since some browsers
- * loses its selection if a control element is selected/focused inside the dialogs.
- *
- * @method restoreSelection
- */
- restoreSelection : function() {
- var t = tinyMCEPopup;
-
- if (!t.isWindow && tinymce.isIE) {
- t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
- }
- },
-
- /**
- * Loads a specific dialog language pack. If you pass in plugin_url as a arugment
- * when you open the window it will load the /langs/_dlg.js lang pack file.
- *
- * @method requireLangPack
- */
- requireLangPack : function() {
- var t = this, u = t.getWindowArg('plugin_url') || t.getWindowArg('theme_url');
-
- if (u && t.editor.settings.language && t.features.translate_i18n !== false) {
- u += '/langs/' + t.editor.settings.language + '_dlg.js';
-
- if (!tinymce.ScriptLoader.isDone(u)) {
- document.write('');
- tinymce.ScriptLoader.markDone(u);
- }
- }
- },
-
- /**
- * Executes a color picker on the specified element id. When the user
- * then selects a color it will be set as the value of the specified element.
- *
- * @method pickColor
- * @param {DOMEvent} e DOM event object.
- * @param {string} element_id Element id to be filled with the color value from the picker.
- */
- pickColor : function(e, element_id) {
- this.execCommand('mceColorPicker', true, {
- color : document.getElementById(element_id).value,
- func : function(c) {
- document.getElementById(element_id).value = c;
-
- try {
- document.getElementById(element_id).onchange();
- } catch (ex) {
- // Try fire event, ignore errors
- }
- }
- });
- },
-
- /**
- * Opens a filebrowser/imagebrowser this will set the output value from
- * the browser as a value on the specified element.
- *
- * @method openBrowser
- * @param {string} element_id Id of the element to set value in.
- * @param {string} type Type of browser to open image/file/flash.
- * @param {string} option Option name to get the file_broswer_callback function name from.
- */
- openBrowser : function(element_id, type, option) {
- tinyMCEPopup.restoreSelection();
- this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
- },
-
- /**
- * Creates a confirm dialog. Please don't use the blocking behavior of this
- * native version use the callback method instead then it can be extended.
- *
- * @method confirm
- * @param {String} t Title for the new confirm dialog.
- * @param {function} cb Callback function to be executed after the user has selected ok or cancel.
- * @param {Object} s Optional scope to execute the callback in.
- */
- confirm : function(t, cb, s) {
- this.editor.windowManager.confirm(t, cb, s, window);
- },
-
- /**
- * Creates an alert dialog. Please don't use the blocking behavior of this
- * native version use the callback method instead then it can be extended.
- *
- * @method alert
- * @param {String} t Title for the new alert dialog.
- * @param {function} cb Callback function to be executed after the user has selected ok.
- * @param {Object} s Optional scope to execute the callback in.
- */
- alert : function(tx, cb, s) {
- this.editor.windowManager.alert(tx, cb, s, window);
- },
-
- /**
- * Closes the current window.
- *
- * @method close
- */
- close : function() {
- var t = this;
-
- // To avoid domain relaxing issue in Opera
- function close() {
- t.editor.windowManager.close(window);
- t.editor = null;
- };
-
- if (tinymce.isOpera)
- t.getWin().setTimeout(close, 0);
- else
- close();
- },
-
- // Internal functions
-
- _restoreSelection : function(e) {
- var el = e && e.target ? e.target : window.event.srcElement;
-
- if ( el.nodeName == 'INPUT' && ( el.type == 'submit' || el.type == 'button' ) ) {
- tinyMCEPopup.restoreSelection();
- }
- },
-
-/* _restoreSelection : function() {
- var e = window.event.srcElement;
-
- // If user focus a non text input or textarea
- if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')
- tinyMCEPopup.restoreSelection();
- },*/
-
- _onDOMLoaded : function() {
- var t = tinyMCEPopup, ti = document.title, bm, h, nv;
-
- if (t.domLoaded)
- return;
-
- t.domLoaded = 1;
-
- tinyMCEPopup.init();
-
- // Translate page
- if (t.features.translate_i18n !== false) {
- h = document.body.innerHTML;
-
- // Replace a=x with a="x" in IE
- if (tinymce.isIE)
- h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"')
-
- document.dir = t.editor.getParam('directionality','');
-
- if ((nv = t.editor.translate(h)) && nv != h)
- document.body.innerHTML = nv;
-
- if ((nv = t.editor.translate(ti)) && nv != ti)
- document.title = ti = nv;
- }
-
- document.body.style.display = '';
-
- // Restore selection in IE when focus is placed on a non textarea or input element of the type text
- if ( tinymce.isIE && ! tinymce.isIE11 ) {
- document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
-
- // Add base target element for it since it would fail with modal dialogs
- t.dom.add(t.dom.select('head')[0], 'base', {target : '_self'});
- } else if ( tinymce.isIE11 ) {
- document.addEventListener('mouseup', tinyMCEPopup._restoreSelection, false);
- }
-
- t.restoreSelection();
-
- // Set inline title
- if (!t.isWindow)
- t.editor.windowManager.setTitle(window, ti);
- else
- window.focus();
-
- if (!tinymce.isIE && !t.isWindow) {
- tinymce.dom.Event._add(document, 'focus', function() {
- t.editor.windowManager.focus(t.id);
- });
- }
-
- // Patch for accessibility
- tinymce.each(t.dom.select('select'), function(e) {
- e.onkeydown = tinyMCEPopup._accessHandler;
- });
-
- // Call onInit
- // Init must be called before focus so the selection won't get lost by the focus call
- tinymce.each(t.listeners, function(o) {
- o.func.call(o.scope, t.editor);
- });
-
- // Move focus to window
- if (t.getWindowArg('mce_auto_focus', true)) {
- window.focus();
-
- // Focus element with mceFocus class
- tinymce.each(document.forms, function(f) {
- tinymce.each(f.elements, function(e) {
- if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) {
- e.focus();
- return false; // Break loop
- }
- });
- });
- }
-
- document.onkeyup = tinyMCEPopup._closeWinKeyHandler;
- },
-
- _accessHandler : function(e) {
- e = e || window.event;
-
- if (e.keyCode == 13 || e.keyCode == 32) {
- e = e.target || e.srcElement;
-
- if (e.onchange)
- e.onchange();
-
- return tinymce.dom.Event.cancel(e);
- }
- },
-
- _closeWinKeyHandler : function(e) {
- e = e || window.event;
-
- if (e.keyCode == 27)
- tinyMCEPopup.close();
- },
-
- _wait : function() {
- // Use IE method
- if (document.attachEvent) {
- document.attachEvent("onreadystatechange", function() {
- if (document.readyState === "complete") {
- document.detachEvent("onreadystatechange", arguments.callee);
- tinyMCEPopup._onDOMLoaded();
- }
- });
-
- if (document.documentElement.doScroll && window == window.top) {
- (function() {
- if (tinyMCEPopup.domLoaded)
- return;
-
- try {
- // If IE is used, use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- document.documentElement.doScroll("left");
- } catch (ex) {
- setTimeout(arguments.callee, 0);
- return;
- }
-
- tinyMCEPopup._onDOMLoaded();
- })();
- }
-
- document.attachEvent('onload', tinyMCEPopup._onDOMLoaded);
- } else if (document.addEventListener) {
- window.addEventListener('DOMContentLoaded', tinyMCEPopup._onDOMLoaded, false);
- window.addEventListener('load', tinyMCEPopup._onDOMLoaded, false);
- }
- }
-};
diff --git a/src/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.js b/src/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.js
deleted file mode 100644
index cb168ddfad..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpdialogs/js/wpdialog.js
+++ /dev/null
@@ -1,28 +0,0 @@
-(function($){
- $.ui.dialog.prototype.options.closeOnEscape = false;
- $.widget('wp.wpdialog', $.ui.dialog, {
- // Work around a bug in jQuery UI 1.9.1.
- // http://bugs.jqueryui.com/ticket/8805
- widgetEventPrefix: 'wpdialog',
-
- open: function() {
- var ed;
-
- // Initialize tinyMCEPopup if it exists and the editor is active.
- if ( tinyMCEPopup && typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) {
- tinyMCEPopup.init();
- }
-
- // Add beforeOpen event.
- if ( this.isOpen() || false === this._trigger('beforeOpen') ) {
- return;
- }
-
- // Open the dialog.
- this._super();
- // WebKit leaves focus in the TinyMCE editor unless we shift focus.
- this.element.focus();
- this._trigger('refresh');
- }
- });
-})(jQuery);
diff --git a/src/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js b/src/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js
new file mode 100644
index 0000000000..c6d164a494
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/wpdialogs/plugin.js
@@ -0,0 +1,59 @@
+/* global tinymce */
+
+tinymce.WPWindowManager = function( editor ) {
+ var element;
+
+ this.parent = editor.windowManager;
+ this.editor = editor;
+
+ tinymce.extend( this, this.parent )
+
+ this.open = function( args, params ) {
+ var self = this, element;
+
+ if ( ! args.wpDialog )
+ return this.parent.open( args, params );
+ else if ( ! args.id )
+ return;
+
+ self.element = element = jQuery('#' + args.id);
+ if ( ! element.length )
+ return;
+
+ self.features = args;
+ self.params = params;
+ self.onOpen.dispatch( self, args, params );
+ self.windows.push( element );
+
+ // Store selection
+ // self.bookmark = self.editor.selection.getBookmark(1);
+
+ // Create the dialog if necessary
+ if ( ! element.data('wpdialog') ) {
+ element.wpdialog({
+ title: args.title,
+ width: args.width,
+ height: args.height,
+ modal: true,
+ dialogClass: 'wp-dialog',
+ zIndex: 300000
+ });
+ }
+
+ element.wpdialog('open');
+ };
+
+ this.close = function() {
+ if ( ! this.features.wpDialog )
+ return this.parent.close.apply( this, arguments );
+
+ this.element.wpdialog('close');
+ };
+}
+
+tinymce.PluginManager.add( 'wpdialogs', function( editor ) {
+ // Replace window manager
+ editor.on( 'init', function() {
+ editor.windowManager = new tinymce.WPWindowManager( editor );
+ });
+});
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css b/src/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css
deleted file mode 100644
index e380ad594a..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css
+++ /dev/null
@@ -1,443 +0,0 @@
-
-html, body {
- background-color: #fff;
- margin: 0;
- padding: 0;
-}
-
-body {
- font-family: sans-serif;
- font-size: 12px;
- line-height: 1.4em;
-}
-
-a.button {
- padding: 4px 8px;
-}
-
-textarea,
-input,
-select {
- font: inherit;
- margin: 1px;
- padding: 3px;
-}
-
-p.help {
- margin: 4px 0;
- font-size: 12px;
- font-style: italic;
-}
-
-abbr.required {
- color: #FF0000;
- text-align: left;
-}
-
-img.alignright,
-.alignright {
- float: right;
- margin-left: 5px;
-}
-
-img.alignleft,
-.alignleft {
- float: left;
- margin-right: 5px;
-}
-
-img.aligncenter {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-label {
- cursor: pointer;
-}
-
-th.label {
- width: 107px;
-}
-
-#media-upload #basic th.label {
- padding: 5px 5px 5px 0;
-}
-
-.show-align {
- height: 200px;
- width: 480px;
- float: right;
- background-color: #f1f1f1;
- cursor: default;
- -moz-user-select: none;
- user-select: none;
- overflow: hidden;
-}
-
-#img-edit {
- border: 1px solid #dfdfdf;
- width: 623px;
- margin: 15px auto;
-}
-
-#media-upload .media-upload-form table.describe {
- border-top-style: none;
- border-top-width: 0;
-}
-
-#img_demo_txt {
- font-size: 9px;
- line-height: 13px;
- font-family: Monaco,"Courier New",Courier,monospace;
- color: #888;
-}
-
-#img_demo {
- padding: 0;
-}
-
-#saveeditimg {
- padding: 10px 0 0 5px;
- border-top: 1px solid #ccc;
-}
-
-#sidemenu,
-#sidemenu li {
- list-style: none;
-}
-
-#sidemenu li {
- display: inline;
-}
-
-#sidemenu a {
- border-bottom-style: solid;
- border-bottom-width: 1px;
- border-top-style: solid;
- border-top-width: 1px;
- display: block;
- float: left;
- height: 28px;
- line-height: 28px;
- text-decoration: none;
- text-align: center;
- white-space: nowrap;
- margin: 0;
- padding: 0pt 7px;
- background-color: #f9f9f9;
- border-color: #f9f9f9;
- border-bottom-color: #dfdfdf;
-}
-
-a {
- color: #21759B;
-}
-
-a:hover,
-a:active,
-a:focus {
- color: #D54E21;
-}
-
-#sidemenu a.current {
- -webkit-border-top-left-radius: 4px;
- border-top-left-radius: 4px;
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
- border-style: solid;
- border-width: 1px;
- font-weight: normal;
- background-color: #fff;
- border-color: #dfdfdf #dfdfdf #fff;
- color: #D54E21;
-}
-
-#adv_settings .field label {
- padding: 0 5px 5px;
-}
-
-#media-upload h3 {
- clear: both;
- padding: 0pt 0pt 3px;
- border-bottom-style: solid;
- border-bottom-width: 1px;
- font-family: Georgia,"Times New Roman",Times,serif;
- font-size: 20px;
- font-weight: normal;
- line-height: normal;
- margin: 0 0 10px -4px;
- padding: 15px 0 3px;
- border-bottom-color: #DADADA;
- color: #5A5A5A;
-}
-
-#img_dim #width,
-#img_dim #height,
-#img_prop #border,
-#img_prop #vspace,
-#img_prop #hspace {
- width: 36px;
-}
-
-#img_dim abbr {
- padding: 0 4px;
-}
-
-#show_align_sp {
- width: 115px;
-}
-
-#img_dim input,
-#img_prop input {
- margin-right: 10px;
-}
-
-#basic .align .field label {
- padding: 0 0 0 24px;
-}
-
-#basic {
- padding-top: 2px;
-}
-
-td {
- padding: 2px 0;
-}
-
-#img_size {
- float: right;
- text-align: center;
- cursor: pointer;
- background-color: #f1f1f1;
- padding: 5px 0;
- width: 45px;
-}
-
-#img_size div {
- font-size: 10px;
- padding: 2px;
- border: 1px solid #f1f1f1;
- line-height: 15px;
- height: 15px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- color: #07273E;
-}
-
-#img_size div#s100 {
- border-color: #A3A3A3;
- background-color: #E5E5E5;
-}
-
-#img_size_div {
- width: 100px;
- float: left;
- cursor: default;
-}
-
-#img_size_title {
- margin: 0 7px 5px;
- text-align: right;
- font-weight: bold;
-}
-
-#img_align_td {
- padding: 2px 0 8px;
-}
-
-#media-upload tr.align td.field {
- text-align: center;
-}
-
-.describe td {
- vertical-align: middle;
-}
-
-#media-upload .describe th.label {
- padding-top: .5em;
- text-align: left;
-}
-
-#media-upload .describe {
- border-top-width: 1px;
- border-top-style: solid;
- padding: 5px;
- width: 100%;
- clear: both;
- cursor: default;
-}
-
-form {
- margin: 1em;
-}
-
-.describe input[type="text"],
-.describe textarea {
- width: 460px;
- border: 1px solid #dfdfdf;
- -webkit-border-radius: 4px;
- border-radius: 4px;
-}
-
-.media-upload-form label,
-.media-upload-form legend {
- font-weight: bold;
- font-size: 12px;
- color: #464646;
-}
-
-.align .field label {
- display: inline;
- padding: 0 0 0 28px;
- margin: 0 1em 0 0;
-}
-
-.image-align-none-label {
- background: url(../../../../../../wp-admin/images/align-none.png) no-repeat center left;
-}
-
-.image-align-left-label {
- background: url(../../../../../../wp-admin/images/align-left.png) no-repeat center left;
-}
-
-.image-align-center-label {
- background: url(../../../../../../wp-admin/images/align-center.png) no-repeat center left;
-}
-
-.image-align-right-label {
- background: url(../../../../../../wp-admin/images/align-right.png) no-repeat center left;
-}
-
-div#media-upload-header {
- margin: 0;
- padding: 0 5px;
- font-weight: bold;
- position: relative;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- height: 33px;
- background-color: #f9f9f9;
- border-bottom-color: #dfdfdf;
-}
-
-body#media-upload ul#sidemenu {
- font-weight: normal;
- margin: 0 5px;
- position: relative;
- left: 0px;
- bottom: -4px;
-}
-
-div#media-upload-error {
- margin: 1em;
- font-weight: bold;
-}
-
-#TB_window #TB_title {
- background-color: #222222;
- color: #CFCFCF;
-}
-
-.hidden {
- display: none;
-}
-
-/* RTL */
-body#media-upload.rtl ul#sidemenu {
- left: auto;
- right: 0;
-}
-
-.rtl #basic .align .field label {
- display: block;
- float: right;
- padding: 0 24px 0 0;
- margin: 5px 3px 5px 5px;
-}
-
-.rtl .align .field input {
- display: block;
- float: right;
- margin: 5px 15px 5px 0;
-}
-
-.rtl tr.image-size label {
- margin: 0;
-}
-
-.rtl tr.image-size input {
- margin: 3px 15px 0 5px;
-}
-
-.rtl .image-align-none-label,
-.rtl .image-align-left-label,
-.rtl .image-align-center-label,
-.rtl .image-align-right-label {
- background-position: center right;
-}
-
-#media-upload.rtl .describe th.label {
- text-align: right;
-}
-
-.rtl .show-align,
-.rtl #img_size,
-.rtl .alignright,
-.rtl #img_demo.alignleft {
- float: left;
-}
-
-.rtl tr.image-size label,
-.rtl tr.image-size input,
-.rtl #img_dim label,
-.rtl #img_dim input,
-.rtl #img_prop label,
-.rtl #img_prop input,
-.rtl #img_size_div,
-.rtl .alignleft,
-.rtl #img_demo.alignright {
- float: right;
-}
-
-.rtl #img_dim label,
-.rtl #img_prop label {
- margin: 5px 0pt;
-}
-
-.rtl #img_dim input,
-.rtl #img_prop input {
- margin: 0 5px 0 10px;
-}
-
-.rtl #img_size_title {
- text-align: left;
-}
-
-/**
- * Retina display 2x icons
- */
-@media print,
- (-o-min-device-pixel-ratio: 5/4),
- (-webkit-min-device-pixel-ratio: 1.25),
- (min-resolution: 120dpi) {
- .image-align-none-label {
- background: url(../../../../../../wp-admin/images/align-none-2x.png) no-repeat center left;
- background-size: auto 15px;
- }
-
- .image-align-left-label {
- background: url(../../../../../../wp-admin/images/align-left-2x.png) no-repeat center left;
- background-size: auto 15px;
- }
-
- .image-align-center-label {
- background: url(../../../../../../wp-admin/images/align-center-2x.png) no-repeat center left;
- background-size: auto 15px;
- }
-
- .image-align-right-label {
- background: url(../../../../../../wp-admin/images/align-right-2x.png) no-repeat center left;
- background-size: auto 15px;
- }
-}
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html b/src/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
deleted file mode 100644
index a4526535ad..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
+++ /dev/null
@@ -1,274 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
deleted file mode 100644
index e99c307492..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
+++ /dev/null
@@ -1,328 +0,0 @@
-/* global tinymce */
-(function() {
- var mouse = {};
-
- tinymce.create('tinymce.plugins.wpEditImage', {
- url: '',
- editor: {},
-
- init: function(ed, url) {
- var t = this;
-
- t.url = url;
- t.editor = ed;
- t._createButtons();
-
- ed.addCommand('WP_EditImage', t._editImage);
-
- ed.onInit.add(function(ed) {
- ed.dom.events.add(ed.getBody(), 'mousedown', function(e) {
- var parent;
-
- if ( e.target.nodeName == 'IMG' && ( parent = ed.dom.getParent(e.target, 'div.mceTemp') ) ) {
- if ( tinymce.isGecko )
- ed.selection.select(parent);
- else if ( tinymce.isWebKit )
- ed.dom.events.prevent(e);
- }
- });
-
- // when pressing Return inside a caption move the caret to a new parapraph under it
- ed.dom.events.add(ed.getBody(), 'keydown', function(e) {
- var n, DL, DIV, P;
-
- if ( e.keyCode == 13 ) {
- n = ed.selection.getNode();
- DL = ed.dom.getParent(n, 'dl.wp-caption');
-
- if ( DL )
- DIV = ed.dom.getParent(DL, 'div.mceTemp');
-
- if ( DIV ) {
- ed.dom.events.cancel(e);
- P = ed.dom.create('p', {}, '\uFEFF');
- ed.dom.insertAfter( P, DIV );
- ed.selection.setCursorLocation(P, 0);
- return false;
- }
- }
- });
-
- // iOS6 doesn't show the buttons properly on click, show them on 'touchstart'
- if ( 'ontouchstart' in window ) {
- ed.dom.events.add(ed.getBody(), 'touchstart', function(e){
- t._showButtons(e);
- });
- }
- });
-
- // resize the caption when the image is soft-resized by the user
- ed.onMouseUp.add(function(ed, e) {
- if ( tinymce.isWebKit || tinymce.isOpera )
- return;
-
- if ( mouse.x && (e.clientX != mouse.x || e.clientY != mouse.y) ) {
- var n = ed.selection.getNode();
-
- if ( 'IMG' == n.nodeName ) {
- window.setTimeout(function(){
- var DL = ed.dom.getParent(n, 'dl.wp-caption'), width;
-
- if ( n.width != mouse.img_w || n.height != mouse.img_h )
- n.className = n.className.replace(/size-[^ "']+/, '');
-
- 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){
- t._showButtons(e);
- });
-
- ed.onBeforeSetContent.add(function(ed, o) {
- o.content = ed.wpSetImgCaption(o.content);
- });
-
- ed.onPostProcess.add(function(ed, o) {
- if (o.get)
- o.content = ed.wpGetImgCaption(o.content);
- });
-
- ed.wpSetImgCaption = function(content) {
- return t._do_shcode(content);
- };
-
- ed.wpGetImgCaption = function(content) {
- return t._get_shcode(content);
- };
-
- // When inserting content, if the caret is inside a caption create new paragraph under
- // and move the caret there
- ed.onBeforeExecCommand.add( function( ed, cmd ) {
- var node, p;
-
- if ( cmd == 'mceInsertContent' ) {
- node = ed.dom.getParent(ed.selection.getNode(), 'div.mceTemp');
-
- if ( !node )
- return;
-
- p = ed.dom.create('p');
- ed.dom.insertAfter( p, node );
- ed.selection.setCursorLocation(p, 0);
- }
- });
- },
-
- _do_shcode : function(content) {
- return content.replace(/(?:)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function(a,b,c){
- var id, cls, w, cap, div_cls, img, trim = tinymce.trim;
-
- id = b.match(/id=['"]([^'"]*)['"] ?/);
- if ( id )
- b = b.replace(id[0], '');
-
- cls = b.match(/align=['"]([^'"]*)['"] ?/);
- if ( cls )
- b = b.replace(cls[0], '');
-
- w = b.match(/width=['"]([0-9]*)['"] ?/);
- if ( w )
- b = b.replace(w[0], '');
-
- c = trim(c);
- img = c.match(/((?:]+>)?
]+>(?:<\/a>)?)([\s\S]*)/i);
-
- if ( img && img[2] ) {
- cap = trim( img[2] );
- img = trim( img[1] );
- } else {
- // old captions shortcode style
- cap = trim(b).replace(/caption=['"]/, '').replace(/['"]$/, '');
- img = c;
- }
-
- id = ( id && id[1] ) ? id[1] : '';
- cls = ( cls && cls[1] ) ? cls[1] : 'alignnone';
- w = ( w && w[1] ) ? w[1] : '';
-
- if ( !w || !cap )
- return c;
-
- div_cls = 'mceTemp';
- if ( cls == 'aligncenter' )
- div_cls += ' mceIEcenter';
-
- w = parseInt( w, 10 ) + 10;
- return '- '+img+'
- '+cap+'
';
- });
- },
-
- _get_shcode : function(content) {
- return content.replace(/]*>([\s\S]+?)<\/div>/g, function(a, b){
- var ret = b.replace(/]+)>\s*- ]+>([\s\S]+?)<\/dt>\s*
- ]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi, function(a,b,c,cap){
- var id, cls, w;
-
- w = c.match(/width="([0-9]*)"/);
- w = ( w && w[1] ) ? w[1] : '';
-
- if ( !w || !cap )
- return c;
-
- id = b.match(/id="([^"]*)"/);
- id = ( id && id[1] ) ? id[1] : '';
-
- cls = b.match(/class="([^"]*)"/);
- cls = ( cls && cls[1] ) ? cls[1] : '';
- cls = cls.match(/align[a-z]+/) || 'alignnone';
-
- cap = cap.replace(/\r\n|\r/g, '\n').replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){
- // no line breaks inside HTML tags
- return a.replace(/[\r\n\t]+/, ' ');
- });
-
- // convert remaining line breaks to
- cap = cap.replace(/\s*\n\s*/g, '
');
-
- return '[caption id="'+id+'" align="'+cls+'" width="'+w+'"]'+c+' '+cap+'[/caption]';
- });
-
- if ( ret.indexOf('[caption') !== 0 ) {
- // the caption html seems brocken, try to find the image that may be wrapped in a link
- // and may be followed by with the caption text.
- ret = b.replace(/[\s\S]*?((?:]+>)?
]+>(?:<\/a>)?)([\s\S]*<\/p>)?[\s\S]*/gi, '
$1
$2');
- }
-
- return ret;
- });
- },
-
- _createButtons : function() {
- var t = this, ed = tinymce.activeEditor, DOM = tinymce.DOM, editButton, dellButton, isRetina;
-
- if ( DOM.get('wp_editbtns') )
- return;
-
- isRetina = ( window.devicePixelRatio && window.devicePixelRatio > 1 ) || // WebKit, Opera
- ( window.matchMedia && window.matchMedia('(min-resolution:130dpi)').matches ); // Firefox, IE10, Opera
-
- DOM.add(document.body, 'div', {
- id : 'wp_editbtns',
- style : 'display:none;'
- });
-
- editButton = DOM.add('wp_editbtns', 'img', {
- src : isRetina ? t.url+'/img/image-2x.png' : 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() {
- t._editImage();
- ed.plugins.wordpress._hideButtons();
- });
-
- dellButton = DOM.add('wp_editbtns', 'img', {
- src : isRetina ? t.url+'/img/delete-2x.png' : 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() {
- var ed = tinymce.activeEditor, el = ed.selection.getNode(), parent;
-
- if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('mceItem') == -1 ) {
- if ( (parent = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(parent, 'mceTemp') ) {
- ed.dom.remove(parent);
- } else {
- if ( el.parentNode.nodeName == 'A' && el.parentNode.childNodes.length == 1 )
- el = el.parentNode;
-
- if ( el.parentNode.nodeName == 'P' && el.parentNode.childNodes.length == 1 )
- el = el.parentNode;
-
- ed.dom.remove(el);
- }
-
- ed.execCommand('mceRepaint');
- return false;
- }
- ed.plugins.wordpress._hideButtons();
- });
- },
-
- _editImage : function() {
- var ed = tinymce.activeEditor, url = this.url, el = ed.selection.getNode(), vp, H, W, cls = el.className;
-
- if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' )
- return;
-
- vp = tinymce.DOM.getViewPort();
- H = 680 < (vp.h - 70) ? 680 : vp.h - 70;
- W = 650 < vp.w ? 650 : vp.w;
-
- ed.windowManager.open({
- file: url + '/editimage.html',
- width: W+'px',
- height: H+'px',
- inline: true
- });
- },
-
- _showButtons : function(e) {
- var ed = this.editor, target = e.target;
-
- if ( target.nodeName != 'IMG' ) {
- if ( target.firstChild && target.firstChild.nodeName == 'IMG' && target.childNodes.length == 1 ) {
- target = target.firstChild;
- } else {
- ed.plugins.wordpress._hideButtons();
- return;
- }
- }
-
- if ( ed.dom.getAttrib(target, 'class').indexOf('mceItem') == -1 ) {
- mouse = {
- x: e.clientX,
- y: e.clientY,
- img_w: target.clientWidth,
- img_h: target.clientHeight
- };
-
- if ( e.type == 'touchstart' ) {
- ed.selection.select(target);
- ed.dom.events.cancel(e);
- }
-
- ed.plugins.wordpress._hideButtons();
- ed.plugins.wordpress._showButtons(target, 'wp_editbtns');
- }
- },
-
- getInfo : function() {
- return {
- longname : 'Edit Image',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : '',
- version : '1.0'
- };
- }
- });
-
- tinymce.PluginManager.add('wpeditimage', tinymce.plugins.wpEditImage);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/img/delete-2x.png b/src/wp-includes/js/tinymce/plugins/wpeditimage/img/delete-2x.png
deleted file mode 100644
index 859d853548..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpeditimage/img/delete-2x.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png b/src/wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png
deleted file mode 100644
index fe537f0a70..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/img/image-2x.png b/src/wp-includes/js/tinymce/plugins/wpeditimage/img/image-2x.png
deleted file mode 100644
index b3843ce511..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpeditimage/img/image-2x.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/img/image.png b/src/wp-includes/js/tinymce/plugins/wpeditimage/img/image.png
deleted file mode 100644
index ee6f0755f5..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpeditimage/img/image.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js b/src/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
deleted file mode 100644
index e00ca2b8ea..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js
+++ /dev/null
@@ -1,613 +0,0 @@
-
-var tinymce = null, tinyMCEPopup, tinyMCE, wpImage;
-
-tinyMCEPopup = {
- init: function() {
- var t = this, w, ti;
-
- // Find window & API
- w = t.getWin();
- tinymce = w.tinymce;
- tinyMCE = w.tinyMCE;
- t.editor = tinymce.EditorManager.activeEditor;
- t.params = t.editor.windowManager.params;
- t.features = t.editor.windowManager.features;
-
- // Setup local DOM
- t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document);
- t.editor.windowManager.onOpen.dispatch(t.editor.windowManager, window);
- },
-
- getWin : function() {
- return (!window.frameElement && window.dialogArguments) || opener || parent || top;
- },
-
- getParam : function(n, dv) {
- return this.editor.getParam(n, dv);
- },
-
- close : function() {
- var t = this;
-
- // To avoid domain relaxing issue in Opera
- function close() {
- t.editor.windowManager.close(window);
- tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
- };
-
- if (tinymce.isOpera)
- t.getWin().setTimeout(close, 0);
- else
- close();
- },
-
- execCommand : function(cmd, ui, val, a) {
- a = a || {};
- a.skip_focus = 1;
-
- this.restoreSelection();
- return this.editor.execCommand(cmd, ui, val, a);
- },
-
- storeSelection : function() {
- this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
- },
-
- restoreSelection : function() {
- var t = tinyMCEPopup;
-
- if ( tinymce.isIE )
- t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
- }
-}
-tinyMCEPopup.init();
-
-wpImage = {
- preInit : function() {
- // import colors stylesheet from parent
- var ed = tinyMCEPopup.editor, win = tinyMCEPopup.getWin(), styles = win.document.styleSheets, url, i;
-
- for ( i = 0; i < styles.length; i++ ) {
- url = styles.item(i).href;
- if ( url && url.indexOf('colors') != -1 ) {
- document.getElementsByTagName('head')[0].appendChild( ed.dom.create('link', {rel:'stylesheet', href: url}) );
- break;
- }
- }
- },
-
- I : function(e) {
- return document.getElementById(e);
- },
-
- current : '',
- link : '',
- link_rel : '',
- target_value : '',
- current_size_sel : 's100',
- width : '',
- height : '',
- align : '',
- img_alt : '',
-
- setTabs : function(tab) {
- var t = this;
-
- if ( 'current' == tab.className ) return false;
- t.I('div_advanced').style.display = ( 'tab_advanced' == tab.id ) ? 'block' : 'none';
- t.I('div_basic').style.display = ( 'tab_basic' == tab.id ) ? 'block' : 'none';
- t.I('tab_basic').className = t.I('tab_advanced').className = '';
- tab.className = 'current';
- return false;
- },
-
- img_seturl : function(u) {
- var t = this, rel = t.I('link_rel').value;
-
- if ( 'current' == u ) {
- t.I('link_href').value = t.current;
- t.I('link_rel').value = t.link_rel;
- } else {
- t.I('link_href').value = t.link;
- if ( rel ) {
- rel = rel.replace( /attachment|wp-att-[0-9]+/gi, '' );
- t.I('link_rel').value = tinymce.trim(rel);
- }
- }
- },
-
- imgAlignCls : function(v) {
- var t = this, cls = t.I('img_classes').value;
-
- t.I('img_demo').className = t.align = v;
-
- cls = cls.replace( /align[^ "']+/gi, '' );
- cls += (' ' + v);
- cls = cls.replace( /\s+/g, ' ' ).replace( /^\s/, '' );
-
- if ( 'aligncenter' == v ) {
- t.I('hspace').value = '';
- t.updateStyle('hspace');
- }
-
- t.I('img_classes').value = cls;
- },
-
- showSize : function(el) {
- var t = this, demo = t.I('img_demo'), w = t.width, h = t.height, id = el.id || 's100', size;
-
- size = parseInt(id.substring(1)) / 200;
- demo.width = Math.round(w * size);
- demo.height = Math.round(h * size);
-
- t.showSizeClear();
- el.style.borderColor = '#A3A3A3';
- el.style.backgroundColor = '#E5E5E5';
- },
-
- showSizeSet : function() {
- var t = this, s130, s120, s110;
-
- if ( (t.width * 1.3) > parseInt(t.preloadImg.width) ) {
- s130 = t.I('s130'), s120 = t.I('s120'), s110 = t.I('s110');
-
- s130.onclick = s120.onclick = s110.onclick = null;
- s130.onmouseover = s120.onmouseover = s110.onmouseover = null;
- s130.style.color = s120.style.color = s110.style.color = '#aaa';
- }
- },
-
- showSizeRem : function() {
- var t = this, demo = t.I('img_demo'), f = document.forms[0];
-
- demo.width = Math.round(f.width.value * 0.5);
- demo.height = Math.round(f.height.value * 0.5);
- t.showSizeClear();
- t.I(t.current_size_sel).style.borderColor = '#A3A3A3';
- t.I(t.current_size_sel).style.backgroundColor = '#E5E5E5';
-
- return false;
- },
-
- showSizeClear : function() {
- var divs = this.I('img_size').getElementsByTagName('div'), i;
-
- for ( i = 0; i < divs.length; i++ ) {
- divs[i].style.borderColor = '#f1f1f1';
- divs[i].style.backgroundColor = '#f1f1f1';
- }
- },
-
- imgEditSize : function(el) {
- var t = this, f = document.forms[0], W, H, w, h, id;
-
- if ( ! t.preloadImg || ! t.preloadImg.width || ! t.preloadImg.height )
- return;
-
- W = parseInt(t.preloadImg.width), H = parseInt(t.preloadImg.height), w = t.width || W, h = t.height || H, id = el.id || 's100';
-
- size = parseInt(id.substring(1)) / 100;
-
- w = Math.round(w * size);
- h = Math.round(h * size);
-
- f.width.value = Math.min(W, w);
- f.height.value = Math.min(H, h);
-
- t.current_size_sel = id;
- t.demoSetSize();
- },
-
- demoSetSize : function(img) {
- var demo = this.I('img_demo'), f = document.forms[0];
-
- demo.width = f.width.value ? Math.round(f.width.value * 0.5) : '';
- demo.height = f.height.value ? Math.round(f.height.value * 0.5) : '';
- },
-
- demoSetStyle : function() {
- var f = document.forms[0], demo = this.I('img_demo'), dom = tinyMCEPopup.editor.dom;
-
- if (demo) {
- dom.setAttrib(demo, 'style', f.img_style.value);
- dom.setStyle(demo, 'width', '');
- dom.setStyle(demo, 'height', '');
- }
- },
-
- origSize : function() {
- var t = this, f = document.forms[0], el = t.I('s100');
-
- f.width.value = t.width = t.preloadImg.width;
- f.height.value = t.height = t.preloadImg.height;
- t.showSizeSet();
- t.demoSetSize();
- t.showSize(el);
- },
-
- init : function() {
- var ed = tinyMCEPopup.editor, h;
-
- h = document.body.innerHTML;
- document.body.innerHTML = ed.translate(h);
- window.setTimeout( function(){wpImage.setup();}, 500 );
- },
-
- setup : function() {
- var t = this, c, el, link, fname, f = document.forms[0], ed = tinyMCEPopup.editor,
- d = t.I('img_demo'), dom = tinyMCEPopup.dom, DL, DD, caption = '', dlc, pa;
-
- document.dir = tinyMCEPopup.editor.getParam('directionality','');
-
- if ( tinyMCEPopup.editor.getParam('wpeditimage_disable_captions', false) )
- t.I('cap_field').style.display = 'none';
-
- tinyMCEPopup.restoreSelection();
- el = ed.selection.getNode();
- if (el.nodeName != 'IMG')
- return;
-
- f.img_src.value = d.src = link = ed.dom.getAttrib(el, 'src');
- ed.dom.setStyle(el, 'float', '');
- t.getImageData();
- c = ed.dom.getAttrib(el, 'class');
-
- if ( DL = dom.getParent(el, 'dl') ) {
- dlc = ed.dom.getAttrib(DL, 'class');
- dlc = dlc.match(/align[^ "']+/i);
- if ( dlc && ! dom.hasClass(el, dlc) ) {
- c += ' '+dlc;
- tinymce.trim(c);
- }
-
- DD = ed.dom.select('dd.wp-caption-dd', DL);
- if ( DD && DD[0] )
- caption = ed.serializer.serialize(DD[0]).replace(/^/, '').replace(/<\/p>$/, '');
- }
-
- f.img_cap_text.value = caption;
- f.img_title.value = ed.dom.getAttrib(el, 'title');
- f.img_alt.value = ed.dom.getAttrib(el, 'alt');
- f.border.value = ed.dom.getAttrib(el, 'border');
- f.vspace.value = ed.dom.getAttrib(el, 'vspace');
- f.hspace.value = ed.dom.getAttrib(el, 'hspace');
- f.align.value = ed.dom.getAttrib(el, 'align');
- f.width.value = t.width = ed.dom.getAttrib(el, 'width');
- f.height.value = t.height = ed.dom.getAttrib(el, 'height');
- f.img_classes.value = c;
- f.img_style.value = ed.dom.getAttrib(el, 'style');
-
- // Move attribs to styles
- if ( dom.getAttrib(el, 'hspace') )
- t.updateStyle('hspace');
-
- if ( dom.getAttrib(el, 'border') )
- t.updateStyle('border');
-
- if ( dom.getAttrib(el, 'vspace') )
- t.updateStyle('vspace');
-
- if ( pa = ed.dom.getParent(el, 'A') ) {
- f.link_href.value = t.current = ed.dom.getAttrib(pa, 'href');
- f.link_title.value = ed.dom.getAttrib(pa, 'title');
- f.link_rel.value = t.link_rel = ed.dom.getAttrib(pa, 'rel');
- f.link_style.value = ed.dom.getAttrib(pa, 'style');
- t.target_value = ed.dom.getAttrib(pa, 'target');
- f.link_classes.value = ed.dom.getAttrib(pa, 'class');
- }
-
- f.link_target.checked = ( t.target_value && t.target_value == '_blank' ) ? 'checked' : '';
-
- fname = link.substring( link.lastIndexOf('/') );
- fname = fname.replace(/-[0-9]{2,4}x[0-9]{2,4}/, '' );
- t.link = link.substring( 0, link.lastIndexOf('/') ) + fname;
-
- if ( c.indexOf('alignleft') != -1 ) {
- t.I('alignleft').checked = "checked";
- d.className = t.align = "alignleft";
- } else if ( c.indexOf('aligncenter') != -1 ) {
- t.I('aligncenter').checked = "checked";
- d.className = t.align = "aligncenter";
- } else if ( c.indexOf('alignright') != -1 ) {
- t.I('alignright').checked = "checked";
- d.className = t.align = "alignright";
- } else if ( c.indexOf('alignnone') != -1 ) {
- t.I('alignnone').checked = "checked";
- d.className = t.align = "alignnone";
- }
-
- if ( t.width && t.preloadImg.width )
- t.showSizeSet();
-
- document.body.style.display = '';
- },
-
- remove : function() {
- var ed = tinyMCEPopup.editor, p, el;
-
- tinyMCEPopup.restoreSelection();
- el = ed.selection.getNode();
- if (el.nodeName != 'IMG') return;
-
- if ( (p = ed.dom.getParent(el, 'div')) && ed.dom.hasClass(p, 'mceTemp') )
- ed.dom.remove(p);
- else if ( (p = ed.dom.getParent(el, 'A')) && p.childNodes.length == 1 )
- ed.dom.remove(p);
- else ed.dom.remove(el);
-
- ed.execCommand('mceRepaint');
- tinyMCEPopup.close();
- return;
- },
-
- update : function() {
- var t = this, f = document.forms[0], ed = tinyMCEPopup.editor, el, b, fixSafari = null,
- DL, P, A, DIV, do_caption = null, img_class = f.img_classes.value, html,
- id, cap_id = '', cap, DT, DD, cap_width, div_cls, lnk = '', pa, aa, caption;
-
- tinyMCEPopup.restoreSelection();
- el = ed.selection.getNode();
-
- if (el.nodeName != 'IMG') return;
- if (f.img_src.value === '') {
- t.remove();
- return;
- }
-
- if ( f.img_cap_text.value != '' && f.width.value != '' ) {
- do_caption = 1;
- img_class = img_class.replace( /align[^ "']+\s?/gi, '' );
- }
-
- A = ed.dom.getParent(el, 'a');
- P = ed.dom.getParent(el, 'p');
- DL = ed.dom.getParent(el, 'dl');
- DIV = ed.dom.getParent(el, 'div');
-
- tinyMCEPopup.execCommand("mceBeginUndoLevel");
-
- if ( f.width.value != el.width || f.height.value != el.height )
- img_class = img_class.replace(/size-[^ "']+/, '');
-
- ed.dom.setAttribs(el, {
- src : f.img_src.value,
- title : f.img_title.value,
- alt : f.img_alt.value,
- width : f.width.value,
- height : f.height.value,
- style : f.img_style.value,
- 'class' : img_class
- });
-
- if ( f.link_href.value ) {
- // Create new anchor elements
- if ( A == null ) {
- if ( ! f.link_href.value.match(/https?:\/\//i) )
- f.link_href.value = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.link_href.value);
-
- ed.getDoc().execCommand("unlink", false, null);
- tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
-
- tinymce.each(ed.dom.select("a"), function(n) {
- if ( ed.dom.getAttrib(n, 'href') == '#mce_temp_url#' ) {
-
- ed.dom.setAttribs(n, {
- href : f.link_href.value,
- title : f.link_title.value,
- rel : f.link_rel.value,
- target : (f.link_target.checked == true) ? '_blank' : '',
- 'class' : f.link_classes.value,
- style : f.link_style.value
- });
- }
- });
- } else {
- ed.dom.setAttribs(A, {
- href : f.link_href.value,
- title : f.link_title.value,
- rel : f.link_rel.value,
- target : (f.link_target.checked == true) ? '_blank' : '',
- 'class' : f.link_classes.value,
- style : f.link_style.value
- });
- }
- }
-
- if ( do_caption ) {
- cap_width = 10 + parseInt(f.width.value);
- div_cls = (t.align == 'aligncenter') ? 'mceTemp mceIEcenter' : 'mceTemp';
- caption = f.img_cap_text.value;
-
- caption = caption.replace(/\r\n|\r/g, '\n').replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){
- return a.replace(/[\r\n\t]+/, ' ');
- });
-
- caption = caption.replace(/\s*\n\s*/g, '
');
-
- if ( DL ) {
- ed.dom.setAttribs(DL, {
- 'class' : 'wp-caption '+t.align,
- style : 'width: '+cap_width+'px;'
- });
-
- if ( DIV )
- ed.dom.setAttrib(DIV, 'class', div_cls);
-
- if ( (DT = ed.dom.getParent(el, 'dt')) && (DD = DT.nextSibling) && ed.dom.hasClass(DD, 'wp-caption-dd') )
- ed.dom.setHTML(DD, caption);
-
- } else {
- if ( (id = f.img_classes.value.match( /wp-image-([0-9]{1,6})/ )) && id[1] )
- cap_id = 'attachment_'+id[1];
-
- if ( f.link_href.value && (lnk = ed.dom.getParent(el, 'a')) ) {
- if ( lnk.childNodes.length == 1 ) {
- html = ed.dom.getOuterHTML(lnk);
- } else {
- html = ed.dom.getOuterHTML(lnk);
- html = html.match(/]+>/i);
- html = html+ed.dom.getOuterHTML(el)+'';
- }
- } else {
- html = ed.dom.getOuterHTML(el);
- }
-
- html = '
- '+html+'
- '+caption+'
';
-
- cap = ed.dom.create('div', {'class': div_cls}, html);
-
- if ( P ) {
- P.parentNode.insertBefore(cap, P);
- if ( P.childNodes.length == 1 )
- ed.dom.remove(P);
- else if ( lnk && lnk.childNodes.length == 1 )
- ed.dom.remove(lnk);
- else ed.dom.remove(el);
- } else if ( pa = ed.dom.getParent(el, 'TD,TH,LI') ) {
- pa.appendChild(cap);
- if ( lnk && lnk.childNodes.length == 1 )
- ed.dom.remove(lnk);
- else ed.dom.remove(el);
- }
- }
-
- } else {
- if ( DL && DIV ) {
- if ( f.link_href.value && (aa = ed.dom.getParent(el, 'a')) ) html = ed.dom.getOuterHTML(aa);
- else html = ed.dom.getOuterHTML(el);
-
- P = ed.dom.create('p', {}, html);
- DIV.parentNode.insertBefore(P, DIV);
- ed.dom.remove(DIV);
- }
- }
-
- if ( f.img_classes.value.indexOf('aligncenter') != -1 ) {
- if ( P && ( ! P.style || P.style.textAlign != 'center' ) )
- ed.dom.setStyle(P, 'textAlign', 'center');
- } else {
- if ( P && P.style && P.style.textAlign == 'center' )
- ed.dom.setStyle(P, 'textAlign', '');
- }
-
- if ( ! f.link_href.value && A ) {
- b = ed.selection.getBookmark();
- ed.dom.remove(A, 1);
- ed.selection.moveToBookmark(b);
- }
-
- ed.execCommand("mceEndUndoLevel");
- ed.execCommand('mceRepaint');
- tinyMCEPopup.close();
- },
-
- updateStyle : function(ty) {
- var dom = tinyMCEPopup.dom, v, f = document.forms[0], img = dom.create('img', {style : f.img_style.value});
-
- if (tinyMCEPopup.editor.settings.inline_styles) {
- // Handle align
- if (ty == 'align') {
- dom.setStyle(img, 'float', '');
- dom.setStyle(img, 'vertical-align', '');
-
- v = f.align.value;
- if (v) {
- if (v == 'left' || v == 'right')
- dom.setStyle(img, 'float', v);
- else
- img.style.verticalAlign = v;
- }
- }
-
- // Handle border
- if (ty == 'border') {
- dom.setStyle(img, 'border', '');
-
- v = f.border.value;
- if (v || v == '0') {
- if (v == '0')
- img.style.border = '0';
- else
- img.style.border = v + 'px solid black';
- }
- }
-
- // Handle hspace
- if (ty == 'hspace') {
- dom.setStyle(img, 'marginLeft', '');
- dom.setStyle(img, 'marginRight', '');
-
- v = f.hspace.value;
- if (v) {
- img.style.marginLeft = v + 'px';
- img.style.marginRight = v + 'px';
- }
- }
-
- // Handle vspace
- if (ty == 'vspace') {
- dom.setStyle(img, 'marginTop', '');
- dom.setStyle(img, 'marginBottom', '');
-
- v = f.vspace.value;
- if (v) {
- img.style.marginTop = v + 'px';
- img.style.marginBottom = v + 'px';
- }
- }
-
- // Merge
- f.img_style.value = dom.serializeStyle(dom.parseStyle(img.style.cssText));
- this.demoSetStyle();
- }
- },
-
- checkVal : function(f) {
-
- if ( f.value == '' ) {
- // if ( f.id == 'width' ) f.value = this.width || this.preloadImg.width;
- // if ( f.id == 'height' ) f.value = this.height || this.preloadImg.height;
- if ( f.id == 'img_src' ) f.value = this.I('img_demo').src || this.preloadImg.src;
- }
- },
-
- resetImageData : function() {
- var f = document.forms[0];
-
- f.width.value = f.height.value = '';
- },
-
- updateImageData : function() {
- var f = document.forms[0], t = wpImage, w = f.width.value, h = f.height.value;
-
- if ( !w && h )
- w = f.width.value = t.width = Math.round( t.preloadImg.width / (t.preloadImg.height / h) );
- else if ( w && !h )
- h = f.height.value = t.height = Math.round( t.preloadImg.height / (t.preloadImg.width / w) );
-
- if ( !w )
- f.width.value = t.width = t.preloadImg.width;
-
- if ( !h )
- f.height.value = t.height = t.preloadImg.height;
-
- t.showSizeSet();
- t.demoSetSize();
- if ( f.img_style.value )
- t.demoSetStyle();
- },
-
- getImageData : function() {
- var t = wpImage, f = document.forms[0];
-
- t.preloadImg = new Image();
- t.preloadImg.onload = t.updateImageData;
- t.preloadImg.onerror = t.resetImageData;
- t.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.img_src.value);
- }
-};
-
-window.onload = function(){wpImage.init();}
-wpImage.preInit();
-
diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
new file mode 100644
index 0000000000..0c244b1a3f
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js
@@ -0,0 +1,431 @@
+/* global tinymce */
+tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
+ function parseShortcode( content ) {
+ return content.replace( /(?:)?\[(?:wp_)?caption([^\]]+)\]([\s\S]+?)\[\/(?:wp_)?caption\](?:<\/p>)?/g, function( a, b, c ) {
+ var id, cls, w, cap, img, width,
+ trim = tinymce.trim;
+
+ id = b.match( /id=['"]([^'"]*)['"] ?/ );
+ if ( id ) {
+ b = b.replace( id[0], '' );
+ }
+
+ cls = b.match( /align=['"]([^'"]*)['"] ?/ );
+ if ( cls ) {
+ b = b.replace( cls[0], '' );
+ }
+
+ w = b.match( /width=['"]([0-9]*)['"] ?/ );
+ if ( w ) {
+ b = b.replace( w[0], '' );
+ }
+
+ c = trim( c );
+ img = c.match( /((?:]+>)?
]+>(?:<\/a>)?)([\s\S]*)/i );
+
+ if ( img && img[2] ) {
+ cap = trim( img[2] );
+ img = trim( img[1] );
+ } else {
+ // old captions shortcode style
+ cap = trim( b ).replace( /caption=['"]/, '' ).replace( /['"]$/, '' );
+ img = c;
+ }
+
+ id = ( id && id[1] ) ? id[1] : '';
+ cls = ( cls && cls[1] ) ? cls[1] : 'alignnone';
+ w = ( w && w[1] ) ? w[1] : '';
+
+ if ( ! w || ! cap ) {
+ return c;
+ }
+
+ width = parseInt( w, 10 ) + 10;
+
+ return '' +
+ '- '+ img +'
- '+ cap +'
';
+ });
+ }
+
+ function getShortcode( content ) {
+ return content.replace( /]*>([\s\S]+?)<\/div>/g, function( a, b ) {
+ var ret = b.replace( /]+)>\s*- ]+>([\s\S]+?)<\/dt>\s*
- ]+>([\s\S]*?)<\/dd>\s*<\/dl>/gi, function( a, b, c, cap ) {
+ var id, cls, w;
+
+ w = c.match( /width="([0-9]*)"/ );
+ w = ( w && w[1] ) ? w[1] : '';
+
+ if ( ! w || ! cap ) {
+ return c;
+ }
+
+ id = b.match( /id="([^"]*)"/ );
+ id = ( id && id[1] ) ? id[1] : '';
+
+ cls = b.match( /class="([^"]*)"/ );
+ cls = ( cls && cls[1] ) ? cls[1] : '';
+ cls = cls.match( /align[a-z]+/ ) || 'alignnone';
+
+ cap = cap.replace( /\r\n|\r/g, '\n' ).replace( /<[a-zA-Z0-9]+( [^<>]+)?>/g, function( a ) {
+ // no line breaks inside HTML tags
+ return a.replace( /[\r\n\t]+/, ' ' );
+ });
+
+ // convert remaining line breaks to
+ cap = cap.replace( /\s*\n\s*/g, '
' );
+
+ return '[caption id="'+ id +'" align="'+ cls +'" width="'+ w +'"]'+ c +' '+ cap +'[/caption]';
+ });
+
+ if ( ret.indexOf('[caption') !== 0 ) {
+ // the caption html seems brocken, try to find the image that may be wrapped in a link
+ // and may be followed by with the caption text.
+ ret = b.replace( /[\s\S]*?((?:]+>)?
]+>(?:<\/a>)?)([\s\S]*<\/p>)?[\s\S]*/gi, '
$1
$2' );
+ }
+
+ return ret;
+ });
+ }
+
+ editor.on( 'init', function() {
+ var dom = editor.dom;
+
+ // Add caption field to the default image dialog
+ editor.on( 'wpLoadImageForm', function( e ) {
+ if ( editor.getParam( 'wpeditimage_disable_captions' ) ) {
+ return;
+ }
+
+ var captionField = {
+ type: 'textbox',
+ flex: 1,
+ name: 'caption',
+ minHeight: 60,
+ multiline: true,
+ scroll: true,
+ label: 'Image caption'
+ };
+
+ e.data.splice( e.data.length - 1, 0, captionField );
+ });
+
+ // Fix caption parent width for images added from URL
+ editor.on( 'wpNewImageRefresh', function( e ) {
+ var parent, captionWidth;
+
+ if ( parent = dom.getParent( e.node, 'dl.wp-caption' ) ) {
+ if ( ! parent.style.width ) {
+ captionWidth = parseInt( e.node.clientWidth, 10 ) + 10;
+ captionWidth = captionWidth ? captionWidth + 'px' : '50%';
+ dom.setStyle( parent, 'width', captionWidth );
+ }
+ }
+ });
+
+ editor.on( 'wpImageFormSubmit', function( e ) {
+ var data = e.imgData.data,
+ imgNode = e.imgData.node,
+ caption = e.imgData.caption,
+ captionId = '',
+ captionAlign = '',
+ captionWidth = '',
+ wrap, parent, html, P, imgId;
+
+ // Temp image id so we can find the node later
+ data.id = '__wp-temp-img-id';
+ // Cancel the original callback
+ e.imgData.cancel = true;
+
+ if ( ! data.style ) {
+ data.style = null;
+ }
+
+ if ( ! data.src ) {
+ // Delete the image and the caption
+ if ( imgNode ) {
+ if ( wrap = dom.getParent( imgNode, 'div.mceTemp' ) ) {
+ dom.remove( wrap );
+ } else if ( imgNode.parentNode.nodeName === 'A' ) {
+ dom.remove( imgNode.parentNode );
+ } else {
+ dom.remove( imgNode );
+ }
+
+ editor.nodeChanged();
+ }
+ return;
+ }
+
+ if ( ! imgNode ) {
+ // New image inserted
+ html = dom.createHTML( 'img', data );
+
+ if ( caption ) {
+ node = editor.selection.getNode();
+
+ if ( data.width ) {
+ captionWidth = parseInt( data.width, 10 ) + 10;
+ captionWidth = ' style="width: '+ captionWidth +'px"';
+ }
+
+ html = '' +
+ '- '+ html +'
- '+ caption +'
';
+
+ if ( node.nodeName === 'P' ) {
+ parent = node;
+ } else {
+ parent = dom.getParent( node, 'p' );
+ }
+
+ if ( parent && parent.nodeName === 'P' ) {
+ wrap = dom.create( 'div', { 'class': 'mceTemp' }, html );
+ dom.insertAfter( wrap, parent );
+ editor.selection.select( wrap );
+ editor.nodeChanged();
+
+ if ( dom.isEmpty( parent ) ) {
+ dom.remove( parent );
+ }
+ } else {
+ editor.selection.setContent( '' + html + '' );
+ }
+ } else {
+ editor.selection.setContent( html );
+ }
+ } else {
+ // Edit existing image
+
+ // Store the original image id if any
+ imgId = imgNode.id || null;
+ // Update the image node
+ dom.setAttribs( imgNode, data );
+ wrap = dom.getParent( imgNode, 'dl.wp-caption' );
+
+ if ( caption ) {
+ if ( wrap ) {
+ if ( parent = dom.select( 'dd.wp-caption-dd', wrap )[0] ) {
+ parent.innerHTML = caption;
+ }
+ } else {
+ if ( imgNode.className ) {
+ captionId = imgNode.className.match( /wp-image-([0-9]+)/ );
+ captionAlign = imgNode.className.match( /align(left|right|center|none)/ );
+ }
+
+ if ( captionAlign ) {
+ captionAlign = captionAlign[0];
+ imgNode.className = imgNode.className.replace( /align(left|right|center|none)/g, '' );
+ } else {
+ captionAlign = 'alignnone';
+ }
+
+ captionAlign = ' class="wp-caption ' + captionAlign + '"';
+
+ if ( captionId ) {
+ captionId = ' id="attachment_' + captionId[1] + '"';
+ }
+
+ captionWidth = data.width || imgNode.clientWidth;
+
+ if ( captionWidth ) {
+ captionWidth = parseInt( captionWidth, 10 ) + 10;
+ captionWidth = ' style="width: '+ captionWidth +'px"';
+ }
+
+ if ( imgNode.parentNode && imgNode.parentNode.nodeName === 'A' ) {
+ html = dom.getOuterHTML( imgNode.parentNode );
+ node = imgNode.parentNode;
+ } else {
+ html = dom.getOuterHTML( imgNode );
+ node = imgNode;
+ }
+
+ html = '' +
+ '- '+ html +'
- '+ caption +'
';
+
+ if ( parent = dom.getParent( imgNode, 'p' ) ) {
+ wrap = dom.create( 'div', { 'class': 'mceTemp' }, html );
+ dom.insertAfter( wrap, parent );
+ editor.selection.select( wrap );
+ editor.nodeChanged();
+
+ // Delete the old image node
+ dom.remove( node );
+
+ if ( dom.isEmpty( parent ) ) {
+ dom.remove( parent );
+ }
+ } else {
+ editor.selection.setContent( '' + html + '' );
+ }
+ }
+ } else {
+ if ( wrap ) {
+ // Remove the caption wrapper and place the image in new paragraph
+ if ( imgNode.parentNode.nodeName === 'A' ) {
+ html = dom.getOuterHTML( imgNode.parentNode );
+ } else {
+ html = dom.getOuterHTML( imgNode );
+ }
+
+ parent = dom.create( 'p', {}, html );
+ dom.insertAfter( parent, wrap.parentNode );
+ editor.selection.select( parent );
+ editor.nodeChanged();
+ dom.remove( wrap.parentNode );
+ }
+ }
+ }
+
+ imgNode = dom.get('__wp-temp-img-id');
+ dom.setAttrib( imgNode, 'id', imgId );
+ e.imgData.node = imgNode;
+ });
+
+ editor.on( 'wpLoadImageData', function( e ) {
+ var parent,
+ data = e.imgData.data
+ imgNode = e.imgData.node;
+
+ if ( parent = dom.getParent( imgNode, 'dl.wp-caption' ) ) {
+ parent = dom.select( 'dd.wp-caption-dd', parent )[0];
+ data.caption = parent ? parent.innerHTML : '';
+ }
+ });
+
+ // Prevent dragging images out of the caption elements
+ dom.bind( editor.getDoc(), 'dragstart', function( event ) {
+ var node = editor.selection.getNode();
+
+ if ( node.nodeName === 'IMG' && dom.getParent( node, '.wp-caption' ) ) {
+ event.preventDefault();
+ }
+ });
+ });
+
+ editor.on( 'BeforeExecCommand', function( e ) {
+ var node, p, DL, align,
+ cmd = e.command,
+ dom = editor.dom;
+
+ if ( cmd === 'mceInsertContent' ) {
+ // When inserting content, if the caret is inside a caption create new paragraph under
+ // and move the caret there
+ if ( node = dom.getParent( editor.selection.getNode(), 'div.mceTemp' ) ) {
+ p = dom.create( 'p' );
+ dom.insertAfter( p, node );
+ editor.selection.setCursorLocation( p, 0 );
+ editor.nodeChanged();
+
+ if ( tinymce.Env.ie > 8 ) {
+ setTimeout( function() {
+ editor.selection.setCursorLocation( p, 0 );
+ editor.selection.setContent( e.value );
+ }, 500 );
+
+ return false;
+ }
+ }
+ } else if ( cmd === 'JustifyLeft' || cmd === 'JustifyRight' || cmd === 'JustifyCenter' ) {
+ // When inside an image caption, set the align* class on dt.wp-caption
+ node = editor.selection.getNode();
+ align = cmd.substr(7).toLowerCase();
+ align = 'align' + align;
+
+ if ( dom.is( node, 'dl.wp-caption' ) ) {
+ DL = node;
+ } else {
+ DL = dom.getParent( node, 'dl.wp-caption' );
+ }
+
+ if ( DL ) {
+ if ( dom.hasClass( DL, align ) ) {
+ dom.removeClass( DL, align );
+ dom.addClass( DL, 'alignnone' );
+ } else {
+ DL.className = DL.className.replace( /align[^ ]+/g, '' );
+ dom.addClass( DL, align );
+ }
+
+ return false;
+ }
+ }
+ });
+
+ editor.on( 'keydown', function( e ) {
+ var node, wrap, P, spacer,
+ selection = editor.selection,
+ dom = editor.dom;
+
+ if ( e.keyCode === tinymce.util.VK.ENTER ) {
+ // When pressing Enter inside a caption move the caret to a new parapraph under it
+ wrap = dom.getParent( editor.selection.getNode(), 'div.mceTemp' );
+
+ if ( wrap ) {
+ dom.events.cancel(e); // Doesn't cancel all :(
+
+ // Remove any extra dt and dd cleated on pressing Enter...
+ tinymce.each( dom.select( 'dt, dd', wrap ), function( element ) {
+ if ( dom.isEmpty( element ) ) {
+ dom.remove( element );
+ }
+ });
+
+ spacer = tinymce.Env.ie ? '' : '
';
+ P = dom.create( 'p', null, spacer );
+ dom.insertAfter( P, wrap );
+ selection.setCursorLocation( P, 0 );
+ editor.nodeChanged();
+ }
+ } else if ( e.keyCode === tinymce.util.VK.DELETE || e.keyCode === tinymce.util.VK.BACKSPACE ) {
+ node = selection.getNode();
+
+ if ( node.nodeName === 'DIV' && dom.hasClass( node, 'mceTemp' ) ) {
+ wrap = node;
+ } else if ( node.nodeName === 'IMG' || node.nodeName === 'DT' || node.nodeName === 'A' ) {
+ wrap = dom.getParent( node, 'div.mceTemp' );
+ }
+
+ if ( wrap ) {
+ dom.events.cancel(e);
+
+ if ( wrap.nextSibling ) {
+ selection.select( wrap.nextSibling );
+ } else if ( wrap.previousSibling ) {
+ selection.select( wrap.previousSibling );
+ } else {
+ selection.select( wrap.parentNode );
+ }
+
+ selection.collapse( true );
+ editor.nodeChanged();
+ dom.remove( wrap );
+ wrap = null;
+ return false;
+ }
+ }
+ });
+
+ editor.wpSetImgCaption = function( content ) {
+ return parseShortcode( content );
+ };
+
+ editor.wpGetImgCaption = function( content ) {
+ return getShortcode( content );
+ };
+
+ editor.on( 'BeforeSetContent', function( e ) {
+ e.content = editor.wpSetImgCaption( e.content );
+ });
+
+ editor.on( 'PostProcess', function( e ) {
+ if ( e.get ) {
+ e.content = editor.wpGetImgCaption( e.content );
+ }
+ });
+
+ return {
+ _do_shcode: parseShortcode,
+ _get_shcode: getShortcode
+ };
+});
diff --git a/src/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css b/src/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css
deleted file mode 100644
index 686fedf29c..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpfullscreen/css/wp-fullscreen.css
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-Distraction Free Writing mode TinyMCE Styles
-*/
-
-html,
-body {
- background: transparent;
- width: auto !important;
- max-width: none !important;
- margin: 0 !important;
- padding: 0 !important;
- min-height: 0 !important;
-}
diff --git a/src/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js
deleted file mode 100644
index 27f0f7d530..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js
+++ /dev/null
@@ -1,190 +0,0 @@
-/* global tinymce:false, switchEditors, fullscreen */
-/**
- * WP Fullscreen TinyMCE plugin
- *
- * Contains code from Moxiecode Systems AB released under LGPL http://tinymce.moxiecode.com/license
- */
-
-(function() {
- tinymce.create('tinymce.plugins.wpFullscreenPlugin', {
- resize_timeout: false,
-
- init : function( ed ) {
- var t = this, s = {}, DOM = tinymce.DOM;
-
- // 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.activeEditor;
- 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() {
- 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 );
- });
- }
- });
-
- ed.addCommand('wpFullScreen', function() {
- if ( typeof(fullscreen) == 'undefined' )
- return;
-
- if ( 'wp_mce_fullscreen' == ed.id )
- fullscreen.off();
- else
- fullscreen.on();
- });
-
- // Register buttons
- ed.addButton('wp_fullscreen', {
- title : 'wordpress.wp_fullscreen_desc',
- cmd : 'wpFullScreen'
- });
-
- // 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(editor, e) {
- var DOM = tinymce.DOM, body = ed.getBody(), ifr = DOM.get(ed.id + '_ifr'), height, y = ed.dom.win.scrollY;
-
- if ( t.resize_timeout )
- return;
-
- // sometimes several events are fired few ms apart, trottle down resizing a little
- t.resize_timeout = true;
- setTimeout(function(){
- t.resize_timeout = false;
- }, 500);
-
- height = body.scrollHeight > 300 ? body.scrollHeight : 300;
-
- if ( height != ifr.scrollHeight ) {
- DOM.setStyle(ifr, 'height', height + 'px');
- ed.getWin().scrollTo(0, 0); // iframe window object, make sure there's no scrolling
- }
-
- // WebKit scrolls to top on paste...
- if ( e && e.type == 'paste' && tinymce.isWebKit ) {
- setTimeout(function(){
- ed.dom.win.scrollTo(0, y);
- }, 40);
- }
- }
-
- // Add appropriate listeners for resizing content area
- ed.onInit.add( function( ed ) {
- ed.onChange.add(resize);
- ed.onSetContent.add(resize);
- ed.onPaste.add(resize);
- ed.onKeyUp.add(resize);
- ed.onPostRender.add(resize);
-
- ed.getBody().style.overflowY = 'hidden';
- });
-
- if ( ed.getParam('autoresize_on_init', true) ) {
- ed.onLoadContent.add( function() {
- // 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);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js b/src/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js
new file mode 100644
index 0000000000..f8d5159530
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js
@@ -0,0 +1,104 @@
+/* global tinymce */
+/**
+ * WP Fullscreen (Distraction Free Writing) TinyMCE plugin
+ */
+tinymce.PluginManager.add( 'wpfullscreen', function( editor ) {
+ var settings = editor.settings,
+ oldSize = 0;
+
+ function resize( e ) {
+ var deltaSize, myHeight,
+ d = editor.getDoc(),
+ body = d.body,
+ de = d.documentElement,
+ DOM = tinymce.DOM
+ resizeHeight = 250;
+
+ if ( ( e && e.type == 'setcontent' && e.initial ) || editor.settings.inline ) {
+ return;
+ }
+
+ // Get height differently depending on the browser used
+ myHeight = tinymce.Env.ie ? body.scrollHeight : ( tinymce.Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight );
+
+ // Don't make it smaller than 250px
+ if ( myHeight > 250 ) {
+ resizeHeight = myHeight;
+ }
+
+ body.scrollTop = 0;
+
+ // Resize content element
+ if ( resizeHeight !== oldSize ) {
+ deltaSize = resizeHeight - oldSize;
+ DOM.setStyle( DOM.get( editor.id + '_ifr' ), 'height', resizeHeight + 'px' );
+ oldSize = resizeHeight;
+
+ // WebKit doesn't decrease the size of the body element until the iframe gets resized
+ // So we need to continue to resize the iframe down until the size gets fixed
+ if ( tinymce.isWebKit && deltaSize < 0 ) {
+ resize( e );
+ }
+ }
+ }
+
+ // Register the command
+ editor.addCommand( 'wpAutoResize', resize );
+
+ function fullscreenOn() {
+ settings.wp_fullscreen = true;
+ editor.dom.addClass( editor.getDoc().documentElement, 'wp-fullscreen' );
+ // Add listeners for auto-resizing
+ editor.on( 'change setcontent paste keyup', resize );
+ }
+
+ function fullscreenOff() {
+ settings.wp_fullscreen = false;
+ editor.dom.removeClass( editor.getDoc().documentElement, 'wp-fullscreen' );
+ // Remove listeners for auto-resizing
+ editor.off( 'change setcontent paste keyup', resize );
+ oldSize = 0;
+ }
+
+ // For use from outside the editor.
+ editor.addCommand( 'wpFullScreenOn', fullscreenOn );
+ editor.addCommand( 'wpFullScreenOff', fullscreenOff );
+
+ function toggleFullscreen() {
+ // Toggle DFW mode. For use from inside the editor.
+ if ( typeof wp === 'undefined' || ! wp.editor || ! wp.editor.fullscreen ) {
+ return;
+ }
+
+ if ( editor.getParam('wp_fullscreen') ) {
+ wp.editor.fullscreen.off();
+ } else {
+ wp.editor.fullscreen.on();
+ }
+ }
+
+ editor.addCommand( 'wpFullScreen', toggleFullscreen );
+
+ editor.on( 'init', function() {
+ // Set the editor when initializing from whitin DFW
+ if ( editor.getParam('wp_fullscreen') ) {
+ fullscreenOn();
+ }
+
+ editor.addShortcut( 'alt+shift+w', '', 'wpFullScreen' );
+ });
+
+ // Register buttons
+ editor.addButton( 'wp_fullscreen', {
+ tooltip: 'Distraction Free Writing',
+ shortcut: 'Alt+Shift+W',
+ onclick: toggleFullscreen
+ });
+
+ editor.addMenuItem( 'wp_fullscreen', {
+ text: 'Distraction Free Writing',
+ shortcut: 'Alt+Shift+W',
+ context: 'view',
+ onclick: toggleFullscreen
+ });
+});
diff --git a/src/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js
deleted file mode 100644
index 555cd6c1c2..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/* global tinymce */
-(function() {
- tinymce.create('tinymce.plugins.wpGallery', {
-
- init : function(ed, url) {
- var t = this;
-
- t.url = url;
- t.editor = ed;
- t._createButtons();
-
- // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
- ed.addCommand('WP_Gallery', function() {
- if ( tinymce.isIE )
- ed.selection.moveToBookmark( ed.wpGalleryBookmark );
-
- var el = ed.selection.getNode(),
- gallery = wp.media.gallery,
- frame;
-
- // Check if the `wp.media.gallery` API exists.
- if ( typeof wp === 'undefined' || ! wp.media || ! wp.media.gallery )
- return;
-
- // Make sure we've selected a gallery node.
- if ( el.nodeName != 'IMG' || ed.dom.getAttrib(el, 'class').indexOf('wp-gallery') == -1 )
- return;
-
- frame = gallery.edit( '[' + ed.dom.getAttrib( el, 'title' ) + ']' );
-
- frame.state('gallery-edit').on( 'update', function( selection ) {
- var shortcode = gallery.shortcode( selection ).string().slice( 1, -1 );
- ed.dom.setAttrib( el, 'title', shortcode );
- });
- });
-
- ed.onInit.add(function(ed) {
- // iOS6 doesn't show the buttons properly on click, show them on 'touchstart'
- if ( 'ontouchstart' in window ) {
- ed.dom.events.add(ed.getBody(), 'touchstart', function(e){
- var target = e.target;
-
- if ( target.nodeName == 'IMG' && ed.dom.hasClass(target, 'wp-gallery') ) {
- ed.selection.select(target);
- ed.dom.events.cancel(e);
- ed.plugins.wordpress._hideButtons();
- ed.plugins.wordpress._showButtons(target, 'wp_gallerybtns');
- }
- });
- }
- });
-
- ed.onMouseDown.add(function(ed, e) {
- if ( e.target.nodeName == 'IMG' && ed.dom.hasClass(e.target, 'wp-gallery') ) {
- ed.plugins.wordpress._hideButtons();
- 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 '
';
- });
- },
-
- _get_gallery : function(co) {
-
- function getAttr(s, n) {
- n = new RegExp(n + '=\"([^\"]+)\"', 'g').exec(s);
- return n ? tinymce.DOM.decode(n[1]) : '';
- }
-
- return co.replace(/(?:]*>)*(
]+>)(?:<\/p>)*/g, function(a,im) {
- var cls = getAttr(im, 'class');
-
- if ( cls.indexOf('wp-gallery') != -1 )
- return '
['+tinymce.trim(getAttr(im, 'title'))+']
';
-
- return a;
- });
- },
-
- _createButtons : function() {
- var t = this, ed = tinymce.activeEditor, DOM = tinymce.DOM, editButton, dellButton, isRetina;
-
- if ( DOM.get('wp_gallerybtns') )
- return;
-
- isRetina = ( window.devicePixelRatio && window.devicePixelRatio > 1 ) || // WebKit, Opera
- ( window.matchMedia && window.matchMedia('(min-resolution:130dpi)').matches ); // Firefox, IE10, Opera
-
- DOM.add(document.body, 'div', {
- id : 'wp_gallerybtns',
- style : 'display:none;'
- });
-
- editButton = DOM.add('wp_gallerybtns', 'img', {
- src : isRetina ? t.url+'/img/edit-2x.png' : t.url+'/img/edit.png',
- id : 'wp_editgallery',
- width : '24',
- height : '24',
- title : ed.getLang('wordpress.editgallery')
- });
-
- tinymce.dom.Event.add( editButton, 'mousedown', function() {
- var ed = tinymce.activeEditor;
- ed.wpGalleryBookmark = ed.selection.getBookmark('simple');
- ed.execCommand('WP_Gallery');
- ed.plugins.wordpress._hideButtons();
- });
-
- dellButton = DOM.add('wp_gallerybtns', 'img', {
- src : isRetina ? t.url+'/img/delete-2x.png' : 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' && ed.dom.hasClass(el, 'wp-gallery') ) {
- ed.dom.remove(el);
-
- ed.execCommand('mceRepaint');
- ed.dom.events.cancel(e);
- }
-
- ed.plugins.wordpress._hideButtons();
- });
- },
-
- getInfo : function() {
- return {
- longname : 'Gallery Settings',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : '',
- version : '1.0'
- };
- }
- });
-
- tinymce.PluginManager.add('wpgallery', tinymce.plugins.wpGallery);
-})();
diff --git a/src/wp-includes/js/tinymce/plugins/wpgallery/img/delete-2x.png b/src/wp-includes/js/tinymce/plugins/wpgallery/img/delete-2x.png
deleted file mode 100644
index 859d853548..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpgallery/img/delete-2x.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpgallery/img/delete.png b/src/wp-includes/js/tinymce/plugins/wpgallery/img/delete.png
deleted file mode 100644
index fe537f0a70..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpgallery/img/delete.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpgallery/img/edit-2x.png b/src/wp-includes/js/tinymce/plugins/wpgallery/img/edit-2x.png
deleted file mode 100644
index b43dc234a7..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpgallery/img/edit-2x.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpgallery/img/edit.png b/src/wp-includes/js/tinymce/plugins/wpgallery/img/edit.png
deleted file mode 100644
index 793193bf92..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpgallery/img/edit.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif b/src/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif
deleted file mode 100644
index 388486517f..0000000000
Binary files a/src/wp-includes/js/tinymce/plugins/wpgallery/img/t.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/plugins/wpgallery/plugin.js b/src/wp-includes/js/tinymce/plugins/wpgallery/plugin.js
new file mode 100644
index 0000000000..fd23c9bcb3
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/wpgallery/plugin.js
@@ -0,0 +1,111 @@
+/* global tinymce */
+tinymce.PluginManager.add('wpgallery', function( editor, url ) {
+
+ function parseGallery( content ) {
+ return content.replace( /\[gallery([^\]]*)\]/g, function( match, attr ) {
+ var data = tinymce.DOM.encode( attr );
+
+ return '
';
+ });
+ }
+
+ function getGallery( content ) {
+ function getAttr( str, name ) {
+ name = new RegExp( name + '=\"([^\"]+)\"', 'g' ).exec( str );
+ return name ? tinymce.DOM.decode( name[1] ) : '';
+ }
+
+ return content.replace( /(?:]*>)*(
]+>)(?:<\/p>)*/g, function( match, image ) {
+ var cls = getAttr( image, 'class' );
+
+ if ( cls.indexOf('wp-gallery') !== -1 ) {
+ return '
['+ tinymce.trim( getAttr( image, 'title' ) ) +']
';
+ }
+
+ return match;
+ });
+ }
+
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
+ editor.addCommand( 'WP_Gallery', function() {
+ var gallery, frame, node;
+
+ // Check if the `wp.media.gallery` API exists.
+ if ( typeof wp === 'undefined' || ! wp.media || ! wp.media.gallery ) {
+ return;
+ }
+
+ node = editor.selection.getNode();
+ gallery = wp.media.gallery;
+
+ // Make sure we've selected a gallery node.
+ if ( node.nodeName === 'IMG' && editor.dom.hasClass( node, 'wp-gallery' ) ) {
+ frame = gallery.edit( '[' + editor.dom.getAttrib( node, 'title' ) + ']' );
+
+ frame.state('gallery-edit').on( 'update', function( selection ) {
+ var shortcode = gallery.shortcode( selection ).string().slice( 1, -1 );
+ editor.dom.setAttrib( node, 'title', shortcode );
+ });
+ }
+ });
+/*
+ editor.on( 'init', function( e ) {
+ // _createButtons()
+
+ // iOS6 doesn't show the buttons properly on click, show them on 'touchstart'
+ if ( 'ontouchstart' in window ) {
+ editor.dom.events.bind( editor.getBody(), 'touchstart', function( e ) {
+ var target = e.target;
+
+ if ( target.nodeName == 'IMG' && editor.dom.hasClass( target, 'wp-gallery' ) ) {
+ editor.selection.select( target );
+ editor.dom.events.cancel( e );
+ editor.plugins.wordpress._hideButtons();
+ editor.plugins.wordpress._showButtons( target, 'wp_gallerybtns' );
+ }
+ });
+ }
+ });
+*/
+ editor.on( 'mouseup', function( e ) {
+ if ( e.target.nodeName == 'IMG' && editor.dom.hasClass( e.target, 'wp-gallery' ) ) {
+ // Don't trigger on right-click
+ if ( e.button !== 2 ) {
+ if ( editor.dom.hasClass( e.target, 'wp-gallery-selected' ) ) {
+ editor.execCommand('WP_Gallery');
+ editor.dom.removeClass( e.target, 'wp-gallery-selected' );
+ } else {
+ editor.dom.addClass( e.target, 'wp-gallery-selected' );
+ }
+ }
+ } else {
+ editor.dom.removeClass( editor.dom.select( 'img.wp-gallery-selected' ), 'wp-gallery-selected' );
+ }
+ });
+
+ // Display 'gallery' instead of img in element path
+ editor.on( 'ResolveName', function( e ) {
+ var dom = editor.dom,
+ target = e.target;
+
+ if ( target.nodeName === 'IMG' && dom.hasClass( target, 'wp-gallery' ) ) {
+ e.name = 'gallery';
+ }
+ });
+
+ editor.on( 'BeforeSetContent', function( e ) {
+ e.content = parseGallery( e.content );
+ });
+
+ editor.on( 'PostProcess', function( e ) {
+ if ( e.get ) {
+ e.content = getGallery( e.content );
+ }
+ });
+
+ return {
+ _do_gallery: parseGallery,
+ _get_gallery: getGallery
+ };
+});
diff --git a/src/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js
deleted file mode 100644
index 31aac846f9..0000000000
--- a/src/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* global tinymce */
-
-(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 its 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 : 'auto',
- wpDialog : true,
- title : ed.getLang('advlink.link_desc')
- }, {
- plugin_url : url // Plugin absolute URL
- });
- });
-
- // Register example button
- ed.addButton('link', {
- title : 'advanced.link_desc',
- cmd : 'WP_Link'
- });
-
- ed.onNodeChange.add(function(ed, cm, n, co) {
- disabled = co && 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 : '1.0'
- };
- }
- });
-
- // Register plugin
- tinymce.PluginManager.add('wplink', tinymce.plugins.wpLink);
-})();
-
diff --git a/src/wp-includes/js/tinymce/plugins/wplink/plugin.js b/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
new file mode 100644
index 0000000000..aa0738039e
--- /dev/null
+++ b/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
@@ -0,0 +1,27 @@
+/* global tinymce */
+tinymce.PluginManager.add( 'wplink', function( editor ) {
+ // Register a command so that it can be invoked by using tinyMCE.activeEditor.execCommand( 'WP_Link' );
+ editor.addCommand( 'WP_Link', function() {
+ if ( typeof window.wpLink !== 'undefined' ) {
+ window.wpLink.open( editor.id );
+ }
+ });
+
+ editor.addButton( 'link', {
+ icon: 'link',
+ tooltip: 'Insert/edit link',
+ shortcut: 'Alt+Shift+A',
+ cmd: 'WP_Link',
+ stateSelector: 'a[href]'
+ });
+
+ editor.addMenuItem( 'link', {
+ icon: 'link',
+ text: 'Insert link',
+ shortcut: 'Alt+Shift+A',
+ cmd: 'WP_Link',
+ stateSelector: 'a[href]',
+ context: 'insert',
+ prependToContext: true
+ });
+});
diff --git a/src/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js b/src/wp-includes/js/tinymce/plugins/wpview/plugin.js
similarity index 78%
rename from src/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js
rename to src/wp-includes/js/tinymce/plugins/wpview/plugin.js
index a0d28a4851..c2ec6925ec 100644
--- a/src/wp-includes/js/tinymce/plugins/wpview/editor_plugin_src.js
+++ b/src/wp-includes/js/tinymce/plugins/wpview/plugin.js
@@ -16,7 +16,7 @@
if ( typeof wp === 'undefined' || ! wp.mce )
return;
- editor.onPreInit.add( function( editor ) {
+ editor.on( 'PreInit', function() {
// Add elements so we can set `contenteditable` to false.
editor.schema.addValidElements('div[*],span[*]');
});
@@ -25,26 +25,26 @@
// matching view patterns, and transform the matches into
// view wrappers. Since the editor's DOM is outdated at this point,
// we'll wait to render the views.
- editor.onBeforeSetContent.add( function( editor, o ) {
- if ( ! o.content )
+ editor.on( 'BeforeSetContent', function( e ) {
+ if ( ! e.content )
return;
- o.content = wp.mce.view.toViews( o.content );
+ e.content = wp.mce.view.toViews( e.content );
});
// When the editor's content has been updated and the DOM has been
// processed, render the views in the document.
- editor.onSetContent.add( function( editor ) {
+ editor.on( 'SetContent', function() {
wp.mce.view.render( editor.getDoc() );
});
- editor.onInit.add( function( editor ) {
-
+ editor.on( 'init', function() {
+ var selection = editor.selection;
// When a view is selected, ensure content that is being pasted
// or inserted is added to a text node (instead of the view).
- editor.selection.onBeforeSetContent.add( function( selection ) {
- var view = wpView.getParentView( selection.getNode() ),
- walker, target;
+ editor.on( 'BeforeSetContent', function( e ) {
+ var walker, target,
+ view = wpView.getParentView( selection.getNode() );
// If the selection is not within a view, bail.
if ( ! view )
@@ -71,8 +71,8 @@
// for matching views and immediately render them.
//
// Runs on paste and on inserting nodes/html.
- editor.selection.onSetContent.add( function( selection, o ) {
- if ( ! o.context )
+ editor.on( 'SetContent', function( e ) {
+ if ( ! e.context )
return;
var node = selection.getNode();
@@ -87,16 +87,16 @@
// When the editor's contents are being accessed as a string,
// transform any views back to their text representations.
- editor.onPostProcess.add( function( editor, o ) {
- if ( ( ! o.get && ! o.save ) || ! o.content )
+ editor.on( 'PostProcess', function( e ) {
+ if ( ( ! e.get && ! e.save ) || ! e.content )
return;
- o.content = wp.mce.view.toText( o.content );
+ e.content = wp.mce.view.toText( e.content );
});
// Triggers when the selection is changed.
// Add the event handler to the top of the stack.
- editor.onNodeChange.addToTop( function( editor, controlManager, node ) {
+ editor.on( 'NodeChange', function( e ) {
var view = wpView.getParentView( node );
// Update the selected view.
@@ -112,7 +112,7 @@
}
});
- editor.onKeyDown.addToTop( function( editor, event ) {
+ editor.on( 'keydown', function( event ) {
var keyCode = event.keyCode,
view, instance;
@@ -122,7 +122,7 @@
// If the caret is not within the selected view, deselect the
// view and bail.
- view = wpView.getParentView( editor.selection.getNode() );
+ view = wpView.getParentView( selection.getNode() );
if ( view !== selected ) {
wpView.deselect();
return;
@@ -171,19 +171,9 @@
if ( selected )
wp.mce.view.deselect( selected );
selected = null;
- },
-
- getInfo : function() {
- return {
- longname : 'WordPress Views',
- author : 'WordPress',
- authorurl : 'http://wordpress.org',
- infourl : 'http://wordpress.org',
- version : '1.0'
- };
}
});
// Register plugin
tinymce.PluginManager.add( 'wpview', tinymce.plugins.wpView );
-})();
\ No newline at end of file
+})();
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css b/src/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css
new file mode 100644
index 0000000000..2f0db0e954
--- /dev/null
+++ b/src/wp-includes/js/tinymce/skins/lightgray/content.inline.min.css
@@ -0,0 +1 @@
+.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333}
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/content.min.css b/src/wp-includes/js/tinymce/skins/lightgray/content.min.css
new file mode 100644
index 0000000000..340a53778f
--- /dev/null
+++ b/src/wp-includes/js/tinymce/skins/lightgray/content.min.css
@@ -0,0 +1 @@
+body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#3399ff !important}.mce-edit-focus{outline:1px dotted #333}
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md b/src/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md
new file mode 100644
index 0000000000..fa5d63946c
--- /dev/null
+++ b/src/wp-includes/js/tinymce/skins/lightgray/fonts/readme.md
@@ -0,0 +1 @@
+Icons are generated and provided by the http://icomoon.io service.
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot
new file mode 100644
index 0000000000..128a98f3d8
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.eot differ
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg
new file mode 100644
index 0000000000..fd5e3ff4d2
--- /dev/null
+++ b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.svg
@@ -0,0 +1,175 @@
+
+
+
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf
new file mode 100644
index 0000000000..7b50bfdae9
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf differ
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff
new file mode 100644
index 0000000000..725aaf19e2
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce-small.woff differ
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot
new file mode 100644
index 0000000000..b769c2c661
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.eot differ
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg
new file mode 100644
index 0000000000..fe4e31bf03
--- /dev/null
+++ b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.svg
@@ -0,0 +1,153 @@
+
+
+
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf
new file mode 100644
index 0000000000..a31b584c2b
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.ttf differ
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff
new file mode 100644
index 0000000000..f0e8a34c6f
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/fonts/tinymce.woff differ
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif b/src/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif
new file mode 100644
index 0000000000..606348c7f5
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/img/anchor.gif differ
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/img/loader.gif b/src/wp-includes/js/tinymce/skins/lightgray/img/loader.gif
new file mode 100644
index 0000000000..c69e937232
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/img/loader.gif differ
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/img/object.gif b/src/wp-includes/js/tinymce/skins/lightgray/img/object.gif
new file mode 100644
index 0000000000..cccd7f023f
Binary files /dev/null and b/src/wp-includes/js/tinymce/skins/lightgray/img/object.gif differ
diff --git a/src/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif b/src/wp-includes/js/tinymce/skins/lightgray/img/trans.gif
similarity index 100%
rename from src/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif
rename to src/wp-includes/js/tinymce/skins/lightgray/img/trans.gif
diff --git a/src/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif b/src/wp-includes/js/tinymce/skins/lightgray/img/wline.gif
similarity index 100%
rename from src/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif
rename to src/wp-includes/js/tinymce/skins/lightgray/img/wline.gif
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css b/src/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css
new file mode 100644
index 0000000000..509ce7f078
--- /dev/null
+++ b/src/wp-includes/js/tinymce/skins/lightgray/skin.ie7.min.css
@@ -0,0 +1 @@
+.mce-container,.mce-container *,.mce-widget,.mce-widget *{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-container ::-webkit-scrollbar{width:8px;height:8px;-webkit-border-radius:4px}.mce-container ::-webkit-scrollbar-track,.mce-container ::-webkit-scrollbar-track-piece{background-color:transparent}.mce-container ::-webkit-scrollbar-thumb{background-color:rgba(53,57,71,0.3);width:6px;height:6px;-webkit-border-radius:4px}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:visible !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #9e9e9e;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td div{border:1px solid #d6d6d6;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover{border-color:#a1a1a1}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#a1a1a1;background:#c8def4}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-toolbar-grp{padding-bottom:2px}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fdfdfd, #ddd);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fdfdfd), to(#ddd));background-image:-webkit-linear-gradient(top, #fdfdfd, #ddd);background-image:-o-linear-gradient(top, #fdfdfd, #ddd);background-image:linear-gradient(to bottom, #fdfdfd, #ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd', endColorstr='#ffdddddd', GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);top:0;left:0;background:#fff;border:1px solid #9e9e9e;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-shadow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:not(.mce-disabled):active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #003cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:linear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px solid transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);border:0;overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn.mce-disabled span{color:#aaa}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + ' ')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-inserttime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#BBB}
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/skins/lightgray/skin.min.css b/src/wp-includes/js/tinymce/skins/lightgray/skin.min.css
new file mode 100644
index 0000000000..bcf7b87ddf
--- /dev/null
+++ b/src/wp-includes/js/tinymce/skins/lightgray/skin.min.css
@@ -0,0 +1 @@
+.mce-container,.mce-container *,.mce-widget,.mce-widget *{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-container ::-webkit-scrollbar{width:8px;height:8px;-webkit-border-radius:4px}.mce-container ::-webkit-scrollbar-track,.mce-container ::-webkit-scrollbar-track-piece{background-color:transparent}.mce-container ::-webkit-scrollbar-thumb{background-color:rgba(53,57,71,0.3);width:6px;height:6px;-webkit-border-radius:4px}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:visible !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #9e9e9e;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td div{border:1px solid #d6d6d6;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover{border-color:#a1a1a1}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#a1a1a1;background:#c8def4}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-toolbar-grp{padding-bottom:2px}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fdfdfd, #ddd);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fdfdfd), to(#ddd));background-image:-webkit-linear-gradient(top, #fdfdfd, #ddd);background-image:-o-linear-gradient(top, #fdfdfd, #ddd);background-image:linear-gradient(to bottom, #fdfdfd, #ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd', endColorstr='#ffdddddd', GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2)}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);top:0;left:0;background:#fff;border:1px solid #9e9e9e;border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#9e9e9e;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#fff;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000000;-moz-box-shadow:0 0 5px #000000;box-shadow:0 0 5px #000000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;background-image:-moz-linear-gradient(top, #f2f2f2, #ccc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#ccc));background-image:-webkit-linear-gradient(top, #f2f2f2, #ccc);background-image:-o-linear-gradient(top, #f2f2f2, #ccc);background-image:linear-gradient(to bottom, #f2f2f2, #ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffcccccc', GradientType=0);zoom:1}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn:not(.mce-disabled):active{background-color:#d6d6d6;background-image:-moz-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#c0c0c0));background-image:-webkit-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:-o-linear-gradient(top, #e6e6e6, #c0c0c0);background-image:linear-gradient(to bottom, #e6e6e6, #c0c0c0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffc0c0c0', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{min-width:50px;color:#fff;border:1px solid #b1b1b1;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25) rgba(0,0,0,0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #08c, #04c);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#04c));background-image:-webkit-linear-gradient(top, #08c, #04c);background-image:-o-linear-gradient(top, #08c, #04c);background-image:linear-gradient(to bottom, #08c, #04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);zoom:1}.mce-primary:hover,.mce-primary:focus{background-color:#005fb3;background-image:-moz-linear-gradient(top, #0077b3, #003cb3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0077b3), to(#003cb3));background-image:-webkit-linear-gradient(top, #0077b3, #003cb3);background-image:-o-linear-gradient(top, #0077b3, #003cb3);background-image:linear-gradient(to bottom, #0077b3, #003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3', endColorstr='#ff003cb3', GradientType=0);zoom:1}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#005299;background-image:-moz-linear-gradient(top, #069, #039);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#069), to(#039));background-image:-webkit-linear-gradient(top, #069, #039);background-image:-o-linear-gradient(top, #069, #039);background-image:linear-gradient(to bottom, #069, #039);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff006699', endColorstr='#ff003399', GradientType=0);zoom:1;-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px #333}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-first{border-left:1px solid #b1b1b1;border-left:1px solid rgba(0,0,0,0.25);-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #b1b1b1;border-right:1px solid rgba(0,0,0,0.1);-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top, #fff, #d9d9d9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#d9d9d9));background-image:-webkit-linear-gradient(top, #fff, #d9d9d9);background-image:-o-linear-gradient(top, #fff, #d9d9d9);background-image:linear-gradient(to bottom, #fff, #d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffd9d9d9', GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:4px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-14px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;border-left:1px solid transparent;border-right:1px solid transparent}.mce-colorbutton:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:4px;margin-right:-14px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;margin-right:-17px;padding-left:0}.mce-rtl .mce-colorbutton button{padding-right:10px;padding-left:10px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid #9e9e9e;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);border:0;overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #c4c4c4}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:transparent;background:#e6e6e6;filter:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-menubtn.mce-disabled span{color:#aaa}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#c8def4}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#333}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #08c, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));background-image:-webkit-linear-gradient(top, #08c, #0077b3);background-image:-o-linear-gradient(top, #08c, #0077b3);background-image:linear-gradient(to bottom, #08c, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);zoom:1}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#cbcbcb;border-bottom:1px solid #fff;cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#bdbdbd;border-right-color:#bdbdbd}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05)}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:10px;padding-left:10px}.mce-rtl .mce-splitbtn .mce-open{padding-left:4px;padding-right:4px}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.65)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-inserttime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-untitled:before{content:"\e029"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb}
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/embedded.png b/src/wp-includes/js/tinymce/skins/wordpress/images/embedded.png
similarity index 100%
rename from src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/embedded.png
rename to src/wp-includes/js/tinymce/skins/wordpress/images/embedded.png
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery-2x.png b/src/wp-includes/js/tinymce/skins/wordpress/images/gallery-2x.png
similarity index 100%
rename from src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery-2x.png
rename to src/wp-includes/js/tinymce/skins/wordpress/images/gallery-2x.png
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery.png b/src/wp-includes/js/tinymce/skins/wordpress/images/gallery.png
similarity index 100%
rename from src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/gallery.png
rename to src/wp-includes/js/tinymce/skins/wordpress/images/gallery.png
diff --git a/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css b/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
new file mode 100644
index 0000000000..a7e1aae054
--- /dev/null
+++ b/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
@@ -0,0 +1,132 @@
+/* Additional default styles for the editor */
+body {
+ font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
+ font-size: 13px;
+ line-height: 19px;
+ color: #333;
+ margin: 10px;
+}
+
+/* DFW mode */
+html.wp-fullscreen,
+html.wp-fullscreen body {
+ background: transparent;
+ width: auto;
+ max-width: none;
+ min-height: 0;
+ overflow: hidden;
+}
+
+.aligncenter,
+dl.aligncenter {
+ display: block;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.alignleft {
+ float: left;
+}
+
+.alignright {
+ float: right;
+}
+
+.wp-caption {
+ border: 1px solid #ddd;
+ text-align: center;
+ background-color: #f3f3f3;
+ padding-top: 4px;
+ margin: 10px 0;
+}
+
+.mceIEcenter {
+ text-align: center;
+}
+
+.wp-caption img {
+ margin: 0;
+ padding: 0;
+ border: 0 none;
+}
+
+.wp-caption img,
+.wp-caption a {
+ -webkit-user-drag: none;
+}
+
+.wp-caption-dd {
+ font-size: 11px;
+ line-height: 17px;
+ padding: 0 4px 5px;
+ margin: 0;
+}
+
+pre {
+ font: 12px/18px Consolas, Monaco, monospace;
+}
+
+td {
+ color: #000;
+ font-size: 11px;
+ margin: 8px;
+}
+
+/* Styles for the WordPress plugins */
+.mce-content-body img.mce-wp-nextpage,
+.mce-content-body img.mce-wp-more {
+ border: 0;
+ width: 95%;
+ height: 10px;
+ display: block;
+ margin: 15px auto 0;
+ outline: 0;
+ cursor: default;
+}
+
+/* Remove blue highlighting of selected images in WebKit */
+img::selection {
+ background-color: transparent;
+}
+
+.mce-content-body img.mce-wp-nextpage[data-mce-selected],
+.mce-content-body img.mce-wp-more[data-mce-selected] {
+ background-color: rgba(128,128,128,0.2);
+ outline: 1px dotted #888;
+ border-color: transparent;
+}
+
+.mce-content-body img.mce-wp-more {
+ border-top: 2px dashed #bbb;
+}
+
+.mce-content-body img.mce-wp-nextpage {
+ border-top: 3px dotted #bbb;
+}
+
+.mce-content-body img.wp-gallery {
+ border: 1px dashed #888;
+ background: #f2f2f2 url("images/gallery.png") no-repeat scroll center center;
+ width: 99%;
+ height: 250px;
+ outline: 0;
+ cursor: pointer;
+}
+
+.mce-content-body img.wp-gallery:hover {
+ background-color: #ededed;
+ border-style: solid;
+}
+
+.mce-content-body img.wp-gallery.wp-gallery-selected {
+ background-color: #d8d8d8;
+ border-style: solid;
+}
+
+img.wp-oembed {
+ border: 1px dashed #888;
+ background: #f7f5f2 url("images/embedded.png") no-repeat scroll center center;
+ width: 300px;
+ height: 250px;
+ outline: 0;
+}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/about.htm b/src/wp-includes/js/tinymce/themes/advanced/about.htm
deleted file mode 100644
index c7ff0a4c4c..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/about.htm
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
- {#advanced_dlg.about_title}
-
-
-
-
-
-
-
-
-
- {#advanced_dlg.about_title}
- Version: ()
- TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL
- by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.
- Copyright © 2003-2008, Moxiecode Systems AB, All rights reserved.
- For more information about this software visit the TinyMCE website.
-
-
-
-
-
-
- {#advanced_dlg.about_loaded}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/themes/advanced/anchor.htm b/src/wp-includes/js/tinymce/themes/advanced/anchor.htm
deleted file mode 100644
index 6571a72d74..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/anchor.htm
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- {#advanced_dlg.anchor_title}
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/themes/advanced/charmap.htm b/src/wp-includes/js/tinymce/themes/advanced/charmap.htm
deleted file mode 100644
index 41bfaf178b..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/charmap.htm
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
- {#advanced_dlg.charmap_title}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {#advanced_dlg.charmap_usage}
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/themes/advanced/color_picker.htm b/src/wp-includes/js/tinymce/themes/advanced/color_picker.htm
deleted file mode 100644
index 208cdbd365..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/color_picker.htm
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
- {#advanced_dlg.colorpicker_title}
-
-
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/themes/advanced/editor_template.js b/src/wp-includes/js/tinymce/themes/advanced/editor_template.js
deleted file mode 100644
index 4b8d563757..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/editor_template.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(p,m){var k,l,o=p.dom,j="",n,r;previewStyles=p.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function q(s){return s.replace(/%(\w+)/g,"")}k=m.block||m.inline||"span";l=o.create(k);f(m.styles,function(t,s){t=q(t);if(t){o.setStyle(l,s,t)}});f(m.attributes,function(t,s){t=q(t);if(t){o.setAttrib(l,s,t)}});f(m.classes,function(s){s=q(s);if(!o.hasClass(l,s)){o.addClass(l,s)}});o.setStyles(l,{position:"absolute",left:-65535});p.getBody().appendChild(l);n=o.getStyle(p.getBody(),"fontSize",true);n=/px$/.test(n)?parseInt(n,10):0;f(previewStyles.split(" "),function(s){var t=o.getStyle(l,s,true);if(s=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)){t=o.getStyle(p.getBody(),s,true);if(o.toHex(t).toLowerCase()=="#ffffff"){return}}if(s=="font-size"){if(/em|%$/.test(t)){if(n===0){return}t=parseFloat(t,10)/(/%$/.test(t)?100:1);t=(t*n)+"px"}}j+=s+":"+t+";"});o.remove(l);return j}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],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(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"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",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:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={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"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},""),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{}," ")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true);q.nodeChanged()}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce));
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/themes/advanced/editor_template_src.js b/src/wp-includes/js/tinymce/themes/advanced/editor_template_src.js
deleted file mode 100644
index 84039ce2ac..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/editor_template_src.js
+++ /dev/null
@@ -1,1490 +0,0 @@
-/**
- * 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;
-
- // Generates a preview for a format
- function getPreviewCss(ed, fmt) {
- var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
-
- previewStyles = ed.settings.preview_styles;
-
- // No preview forced
- if (previewStyles === false)
- return '';
-
- // Default preview
- if (!previewStyles)
- previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color';
-
- // Removes any variables since these can't be previewed
- function removeVars(val) {
- return val.replace(/%(\w+)/g, '');
- };
-
- // Create block/inline element to use for preview
- name = fmt.block || fmt.inline || 'span';
- previewElm = dom.create(name);
-
- // Add format styles to preview element
- each(fmt.styles, function(value, name) {
- value = removeVars(value);
-
- if (value)
- dom.setStyle(previewElm, name, value);
- });
-
- // Add attributes to preview element
- each(fmt.attributes, function(value, name) {
- value = removeVars(value);
-
- if (value)
- dom.setAttrib(previewElm, name, value);
- });
-
- // Add classes to preview element
- each(fmt.classes, function(value) {
- value = removeVars(value);
-
- if (!dom.hasClass(previewElm, value))
- dom.addClass(previewElm, value);
- });
-
- // Add the previewElm outside the visual area
- dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF});
- ed.getBody().appendChild(previewElm);
-
- // Get parent container font size so we can compute px values out of em/% for older IE:s
- parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true);
- parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
-
- each(previewStyles.split(' '), function(name) {
- var value = dom.getStyle(previewElm, name, true);
-
- // If background is transparent then check if the body has a background color we can use
- if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
- value = dom.getStyle(ed.getBody(), name, true);
-
- // Ignore white since it's the default color, not the nicest fix
- if (dom.toHex(value).toLowerCase() == '#ffffff') {
- return;
- }
- }
-
- // Old IE won't calculate the font size so we need to do that manually
- if (name == 'font-size') {
- if (/em|%$/.test(value)) {
- if (parentFontSize === 0) {
- return;
- }
-
- // Convert font size from em/% to px
- value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1);
- value = (value * parentFontSize) + 'px';
- }
- }
-
- previewCss += name + ':' + value + ';';
- });
-
- dom.remove(previewElm);
-
- return previewCss;
- };
-
- // 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);
- s = ed.settings;
-
- ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();
- ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
-
- // Setup default buttons
- if (!s.theme_advanced_buttons1) {
- s = extend({
- theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
- theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
- theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
- }, s);
- }
-
- // Default settings
- t.settings = s = extend({
- theme_advanced_path : true,
- theme_advanced_toolbar_location : 'top',
- theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
- theme_advanced_toolbar_align : "left",
- theme_advanced_statusbar_location : "bottom",
- theme_advanced_fonts : "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",
- 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 : "1,2,3,4,5,6,7",
- theme_advanced_font_selector : "span",
- theme_advanced_show_current_color: 0,
- readonly : ed.settings.readonly
- }, s);
-
- // Setup default font_size_style_values
- if (!s.font_size_style_values)
- s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
-
- 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 && v >= 1 && v <= 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) && 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 + "/skins/" + ed.settings.skin + "/content.css"));
-
- // 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 + "/skins/" + ed.settings.skin + "/ui.css");
-
- if (s.skin_variant)
- DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
- },
-
- _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)' && actualColor != '#abef56';
- },
-
- createControl : function(n, cf) {
- var cd, c;
-
- if (c = cf.createControl(n))
- return c;
-
- switch (n) {
- case "styleselect":
- return this._createStyleSelect();
-
- case "formatselect":
- return this._createBlockFormats();
-
- case "fontselect":
- return this._createFontSelect();
-
- case "fontsizeselect":
- return this._createFontSizeSelect();
-
- case "forecolor":
- return this._createForeColorMenu();
-
- case "backcolor":
- return this._createBackColorMenu();
- }
-
- if ((cd = this.controls[n]))
- return cf.createButton(n, {title : "advanced." + 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, fmt;
-
- fmt = {
- inline : 'span',
- attributes : {'class' : o['class']},
- selector : '*'
- };
-
- ed.formatter.register(name, fmt);
-
- ctrl.add(o['class'], name, {
- style: function() {
- return getPreviewCss(ed, fmt);
- }
- });
- });
- }
- },
-
- _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 = [], removedFormat;
-
- each(ctrl.items, function(item) {
- formatNames.push(item.value);
- });
-
- ed.focus();
- ed.undoManager.add();
-
- // Toggle off the current format(s)
- matches = ed.formatter.matchAll(formatNames);
- tinymce.each(matches, function(match) {
- if (!name || match == name) {
- if (match)
- ed.formatter.remove(match);
-
- removedFormat = true;
- }
- });
-
- if (!removedFormat)
- ed.formatter.apply(name);
-
- ed.undoManager.add();
- ed.nodeChanged();
-
- return false; // No auto select
- }
- });
-
- // Handle specified format
- ed.onPreInit.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 > 1) {
- name = fmt.name = fmt.name || 'style_' + (counter++);
- ed.formatter.register(name, fmt);
- ctrl.add(fmt.title, name, {
- style: function() {
- return getPreviewCss(ed, fmt);
- }
- });
- } else
- ctrl.add(fmt.title);
- });
- } else {
- each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
- var name, fmt;
-
- if (val) {
- name = 'style_' + (counter++);
- fmt = {
- inline : 'span',
- classes : val,
- selector : '*'
- };
-
- ed.formatter.register(name, fmt);
- ctrl.add(t.editor.translate(key), name, {
- style: function() {
- return getPreviewCss(ed, fmt);
- }
- });
- }
- });
- }
- });
-
- // 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 && 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 && 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 && 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 && (cur.value.fontSize == v.fontSize || cur.value['class'] && 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 >= 1 && fz <= 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, style: function() {
- return getPreviewCss(t.editor, {block: 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) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')});
- 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 : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
- n = tb = DOM.add(n, 'tbody');
-
- switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
- case "rowlayout":
- ic = t._rowLayout(s, tb, o);
- break;
-
- case "customlayout":
- ic = ed.execCallback("theme_advanced_custom_layout", 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 false;
- }
- });
-/*
- if (DOM.get(ed.id + '_path_row')) {
- Event.add(ed.id + '_tbl', 'mouseover', function(e) {
- var re;
-
- e = e.target;
-
- if (e.nodeName == 'SPAN' && 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 : '#'}, ''), '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 + "." + 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 < e.clientWidth) {
- w = e.clientWidth;
- DOM.setStyle(ifr, 'width', e.clientWidth);
- }
- }
-
- // Store away the size
- if (store && s.theme_advanced_resizing_use_cookie) {
- Cookie.setHash("TinyMCE_" + ed.id + "_size", {
- 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);
- return false;
- });
-
- 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("toolbar" + 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 && !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 && di[n])
- return;
-
- // Compatiblity with 2.x
- if (n == 'tablecontrols') {
- each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], 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, toolbarsExist = false;
-
- 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, "role":"toolbar"});
-
- // Create toolbar and add the controls
- for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
- toolbarsExist = true;
- tb = cf.createToolbar("toolbar" + 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;
- }
- // Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly
- if (!toolbarsExist)
- o.deltaHeight -= s.theme_advanced_row_height;
- h.push(toolbarGroup.renderHTML());
- h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, ''));
- 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', {}, ' ');
- }
-
-
- if (s.theme_advanced_resizing) {
- DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
-
- if (s.theme_advanced_resizing_use_cookie) {
- ed.onPostRender.add(function() {
- var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), 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);
-
- ed.nodeChanged();
- };
-
- 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() && !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 < 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')) {
- c.setDisabled((!p && co) || (p && !p.href));
- c.setActive(!!p && (!p.name && !p.id));
- }
-
- if (c = cm.get('unlink')) {
- c.setDisabled(!p && co);
- c.setActive(!!p && !p.name && !p.id);
- }
-
- if (c = cm.get('anchor')) {
- c.setActive(!co && !!p && (p.name || (p.id && !p.href)));
- }
-
- p = getParent('IMG');
- if (c = cm.get('image'))
- c.setActive(!co && !!p && 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]);
- tinymce.each(matches, function(match, index) {
- if (index > 0) {
- c.mark(match);
- }
- });
- }
-
- if (c = cm.get('formatselect')) {
- p = getParent(ed.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 && n.className)
- cl = n.className;
- }
-
- if (ed.dom.is(n, s.theme_advanced_font_selector)) {
- if (!fz && n.style.fontSize)
- fz = n.style.fontSize;
-
- if (!fn && n.style.fontFamily)
- fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
-
- if (!fc && n.style.color)
- fc = n.style.color;
-
- if (!bc && 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 && !fz && !cl)
- fz = ed.dom.getStyle(n, 'fontSize', true);
-
- c.select(function(v) {
- if (v.fontSize && v.fontSize === fz)
- return true;
-
- if (v['class'] && 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 && 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 && n.scopeName !== 'HTML' && n.scopeName)
- 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 (ed.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 = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
- pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", 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 > 0) {
- t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
- root: ed.id + "_path_row",
- 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("theme_advanced_source_editor_width", 720)),
- height : parseInt(ed.getParam("theme_advanced_source_editor_height", 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));
diff --git a/src/wp-includes/js/tinymce/themes/advanced/image.htm b/src/wp-includes/js/tinymce/themes/advanced/image.htm
deleted file mode 100644
index 1a3d72e258..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/image.htm
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
- {#advanced_dlg.image_title}
-
-
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg b/src/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg
deleted file mode 100644
index b1a377aba7..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/flash.gif b/src/wp-includes/js/tinymce/themes/advanced/img/flash.gif
deleted file mode 100644
index dec3f7c702..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/flash.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png b/src/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png
deleted file mode 100644
index 1af3e3e6c5..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/gotmoxie.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/icons.gif b/src/wp-includes/js/tinymce/themes/advanced/img/icons.gif
deleted file mode 100644
index ca22249018..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/icons.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/iframe.gif b/src/wp-includes/js/tinymce/themes/advanced/img/iframe.gif
deleted file mode 100644
index 410c7ad084..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/iframe.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/pagebreak.gif b/src/wp-includes/js/tinymce/themes/advanced/img/pagebreak.gif
deleted file mode 100644
index acdf4085f3..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/pagebreak.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/quicktime.gif b/src/wp-includes/js/tinymce/themes/advanced/img/quicktime.gif
deleted file mode 100644
index 8f10e7aa6b..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/quicktime.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/realmedia.gif b/src/wp-includes/js/tinymce/themes/advanced/img/realmedia.gif
deleted file mode 100644
index fdfe0b9ac0..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/realmedia.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/shockwave.gif b/src/wp-includes/js/tinymce/themes/advanced/img/shockwave.gif
deleted file mode 100644
index 9314d04470..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/shockwave.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/trans.gif b/src/wp-includes/js/tinymce/themes/advanced/img/trans.gif
deleted file mode 100644
index 388486517f..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/trans.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/video.gif b/src/wp-includes/js/tinymce/themes/advanced/img/video.gif
deleted file mode 100644
index 3570104077..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/video.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/img/windowsmedia.gif b/src/wp-includes/js/tinymce/themes/advanced/img/windowsmedia.gif
deleted file mode 100644
index ab50f2d887..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/img/windowsmedia.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/js/about.js b/src/wp-includes/js/tinymce/themes/advanced/js/about.js
deleted file mode 100644
index daf4909ad2..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/js/about.js
+++ /dev/null
@@ -1,73 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-function init() {
- var ed, tcont;
-
- tinyMCEPopup.resizeToInnerSize();
- ed = tinyMCEPopup.editor;
-
- // Give FF some time
- window.setTimeout(insertHelpIFrame, 10);
-
- tcont = document.getElementById('plugintablecontainer');
- document.getElementById('plugins_tab').style.display = 'none';
-
- var html = "";
- html += '';
- html += '';
- html += '';
- html += '' + ed.getLang('advanced_dlg.about_plugin') + ' ';
- html += '' + ed.getLang('advanced_dlg.about_author') + ' ';
- html += '' + ed.getLang('advanced_dlg.about_version') + ' ';
- html += ' ';
- html += '';
- html += '';
-
- tinymce.each(ed.plugins, function(p, n) {
- var info;
-
- if (!p.getInfo)
- return;
-
- html += '';
-
- info = p.getInfo();
-
- if (info.infourl != null && info.infourl != '')
- html += '' + info.longname + ' ';
- else
- html += '' + info.longname + ' ';
-
- if (info.authorurl != null && info.authorurl != '')
- html += '' + info.author + ' ';
- else
- html += '' + info.author + ' ';
-
- html += '' + info.version + ' ';
- html += ' ';
-
- document.getElementById('plugins_tab').style.display = '';
-
- });
-
- html += '';
- html += '
';
-
- tcont.innerHTML = html;
-
- tinyMCEPopup.dom.get('version').innerHTML = tinymce.majorVersion + "." + tinymce.minorVersion;
- tinyMCEPopup.dom.get('date').innerHTML = tinymce.releaseDate;
-}
-
-function insertHelpIFrame() {
- var html;
-
- if (tinyMCEPopup.getParam('docs_url')) {
- html = '';
- document.getElementById('iframecontainer').innerHTML = html;
- document.getElementById('help_tab').style.display = 'block';
- document.getElementById('help_tab').setAttribute("aria-hidden", "false");
- }
-}
-
-tinyMCEPopup.onInit.add(init);
diff --git a/src/wp-includes/js/tinymce/themes/advanced/js/anchor.js b/src/wp-includes/js/tinymce/themes/advanced/js/anchor.js
deleted file mode 100644
index a3a018635b..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/js/anchor.js
+++ /dev/null
@@ -1,56 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var AnchorDialog = {
- init : function(ed) {
- var action, elm, f = document.forms[0];
-
- this.editor = ed;
- elm = ed.dom.getParent(ed.selection.getNode(), 'A');
- v = ed.dom.getAttrib(elm, 'name') || ed.dom.getAttrib(elm, 'id');
-
- if (v) {
- this.action = 'update';
- f.anchorName.value = v;
- }
-
- f.insert.value = ed.getLang(elm ? 'update' : 'insert');
- },
-
- update : function() {
- var ed = this.editor, elm, name = document.forms[0].anchorName.value, attribName;
-
- if (!name || !/^[a-z][a-z0-9\-\_:\.]*$/i.test(name)) {
- tinyMCEPopup.alert('advanced_dlg.anchor_invalid');
- return;
- }
-
- tinyMCEPopup.restoreSelection();
-
- if (this.action != 'update')
- ed.selection.collapse(1);
-
- var aRule = ed.schema.getElementRule('a');
- if (!aRule || aRule.attributes.name) {
- attribName = 'name';
- } else {
- attribName = 'id';
- }
-
- elm = ed.dom.getParent(ed.selection.getNode(), 'A');
- if (elm) {
- elm.setAttribute(attribName, name);
- elm[attribName] = name;
- ed.undoManager.add();
- } else {
- // create with zero-sized nbsp so that in Webkit where anchor is on last line by itself caret cannot be placed after it
- var attrs = {'class' : 'mceItemAnchor'};
- attrs[attribName] = name;
- ed.execCommand('mceInsertContent', 0, ed.dom.createHTML('a', attrs, '\uFEFF'));
- ed.nodeChanged();
- }
-
- tinyMCEPopup.close();
- }
-};
-
-tinyMCEPopup.onInit.add(AnchorDialog.init, AnchorDialog);
diff --git a/src/wp-includes/js/tinymce/themes/advanced/js/charmap.js b/src/wp-includes/js/tinymce/themes/advanced/js/charmap.js
deleted file mode 100644
index cbb4172bac..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/js/charmap.js
+++ /dev/null
@@ -1,363 +0,0 @@
-/**
- * charmap.js
- *
- * Copyright 2009, Moxiecode Systems AB
- * Released under LGPL License.
- *
- * License: http://tinymce.moxiecode.com/license
- * Contributing: http://tinymce.moxiecode.com/contributing
- */
-
-tinyMCEPopup.requireLangPack();
-
-var charmap = [
- [' ', ' ', true, 'no-break space'],
- ['&', '&', true, 'ampersand'],
- ['"', '"', true, 'quotation mark'],
-// finance
- ['¢', '¢', true, 'cent sign'],
- ['€', '€', true, 'euro sign'],
- ['£', '£', true, 'pound sign'],
- ['¥', '¥', true, 'yen sign'],
-// signs
- ['©', '©', true, 'copyright sign'],
- ['®', '®', true, 'registered sign'],
- ['™', '™', true, 'trade mark sign'],
- ['‰', '‰', true, 'per mille sign'],
- ['µ', 'µ', true, 'micro sign'],
- ['·', '·', true, 'middle dot'],
- ['•', '•', true, 'bullet'],
- ['…', '…', true, 'three dot leader'],
- ['′', '′', true, 'minutes / feet'],
- ['″', '″', true, 'seconds / inches'],
- ['§', '§', true, 'section sign'],
- ['¶', '¶', true, 'paragraph sign'],
- ['ß', 'ß', true, 'sharp s / ess-zed'],
-// quotations
- ['‹', '‹', true, 'single left-pointing angle quotation mark'],
- ['›', '›', true, 'single right-pointing angle quotation mark'],
- ['«', '«', true, 'left pointing guillemet'],
- ['»', '»', true, 'right pointing guillemet'],
- ['‘', '‘', true, 'left single quotation mark'],
- ['’', '’', true, 'right single quotation mark'],
- ['“', '“', true, 'left double quotation mark'],
- ['”', '”', true, 'right double quotation mark'],
- ['‚', '‚', true, 'single low-9 quotation mark'],
- ['„', '„', true, 'double low-9 quotation mark'],
- ['<', '<', true, 'less-than sign'],
- ['>', '>', true, 'greater-than sign'],
- ['≤', '≤', true, 'less-than or equal to'],
- ['≥', '≥', true, 'greater-than or equal to'],
- ['–', '–', true, 'en dash'],
- ['—', '—', true, 'em dash'],
- ['¯', '¯', true, 'macron'],
- ['‾', '‾', true, 'overline'],
- ['¤', '¤', true, 'currency sign'],
- ['¦', '¦', true, 'broken bar'],
- ['¨', '¨', true, 'diaeresis'],
- ['¡', '¡', true, 'inverted exclamation mark'],
- ['¿', '¿', true, 'turned question mark'],
- ['ˆ', 'ˆ', true, 'circumflex accent'],
- ['˜', '˜', true, 'small tilde'],
- ['°', '°', true, 'degree sign'],
- ['−', '−', true, 'minus sign'],
- ['±', '±', true, 'plus-minus sign'],
- ['÷', '÷', true, 'division sign'],
- ['⁄', '⁄', true, 'fraction slash'],
- ['×', '×', true, 'multiplication sign'],
- ['¹', '¹', true, 'superscript one'],
- ['²', '²', true, 'superscript two'],
- ['³', '³', true, 'superscript three'],
- ['¼', '¼', true, 'fraction one quarter'],
- ['½', '½', true, 'fraction one half'],
- ['¾', '¾', true, 'fraction three quarters'],
-// math / logical
- ['ƒ', 'ƒ', true, 'function / florin'],
- ['∫', '∫', true, 'integral'],
- ['∑', '∑', true, 'n-ary sumation'],
- ['∞', '∞', true, 'infinity'],
- ['√', '√', true, 'square root'],
- ['∼', '∼', false,'similar to'],
- ['≅', '≅', false,'approximately equal to'],
- ['≈', '≈', true, 'almost equal to'],
- ['≠', '≠', true, 'not equal to'],
- ['≡', '≡', true, 'identical to'],
- ['∈', '∈', false,'element of'],
- ['∉', '∉', false,'not an element of'],
- ['∋', '∋', false,'contains as member'],
- ['∏', '∏', true, 'n-ary product'],
- ['∧', '∧', false,'logical and'],
- ['∨', '∨', false,'logical or'],
- ['¬', '¬', true, 'not sign'],
- ['∩', '∩', true, 'intersection'],
- ['∪', '∪', false,'union'],
- ['∂', '∂', true, 'partial differential'],
- ['∀', '∀', false,'for all'],
- ['∃', '∃', false,'there exists'],
- ['∅', '∅', false,'diameter'],
- ['∇', '∇', false,'backward difference'],
- ['∗', '∗', false,'asterisk operator'],
- ['∝', '∝', false,'proportional to'],
- ['∠', '∠', false,'angle'],
-// undefined
- ['´', '´', true, 'acute accent'],
- ['¸', '¸', true, 'cedilla'],
- ['ª', 'ª', true, 'feminine ordinal indicator'],
- ['º', 'º', true, 'masculine ordinal indicator'],
- ['†', '†', true, 'dagger'],
- ['‡', '‡', true, 'double dagger'],
-// alphabetical special chars
- ['À', 'À', true, 'A - grave'],
- ['Á', 'Á', true, 'A - acute'],
- ['Â', 'Â', true, 'A - circumflex'],
- ['Ã', 'Ã', true, 'A - tilde'],
- ['Ä', 'Ä', true, 'A - diaeresis'],
- ['Å', 'Å', true, 'A - ring above'],
- ['Æ', 'Æ', true, 'ligature AE'],
- ['Ç', 'Ç', true, 'C - cedilla'],
- ['È', 'È', true, 'E - grave'],
- ['É', 'É', true, 'E - acute'],
- ['Ê', 'Ê', true, 'E - circumflex'],
- ['Ë', 'Ë', true, 'E - diaeresis'],
- ['Ì', 'Ì', true, 'I - grave'],
- ['Í', 'Í', true, 'I - acute'],
- ['Î', 'Î', true, 'I - circumflex'],
- ['Ï', 'Ï', true, 'I - diaeresis'],
- ['Ð', 'Ð', true, 'ETH'],
- ['Ñ', 'Ñ', true, 'N - tilde'],
- ['Ò', 'Ò', true, 'O - grave'],
- ['Ó', 'Ó', true, 'O - acute'],
- ['Ô', 'Ô', true, 'O - circumflex'],
- ['Õ', 'Õ', true, 'O - tilde'],
- ['Ö', 'Ö', true, 'O - diaeresis'],
- ['Ø', 'Ø', true, 'O - slash'],
- ['Œ', 'Œ', true, 'ligature OE'],
- ['Š', 'Š', true, 'S - caron'],
- ['Ù', 'Ù', true, 'U - grave'],
- ['Ú', 'Ú', true, 'U - acute'],
- ['Û', 'Û', true, 'U - circumflex'],
- ['Ü', 'Ü', true, 'U - diaeresis'],
- ['Ý', 'Ý', true, 'Y - acute'],
- ['Ÿ', 'Ÿ', true, 'Y - diaeresis'],
- ['Þ', 'Þ', true, 'THORN'],
- ['à', 'à', true, 'a - grave'],
- ['á', 'á', true, 'a - acute'],
- ['â', 'â', true, 'a - circumflex'],
- ['ã', 'ã', true, 'a - tilde'],
- ['ä', 'ä', true, 'a - diaeresis'],
- ['å', 'å', true, 'a - ring above'],
- ['æ', 'æ', true, 'ligature ae'],
- ['ç', 'ç', true, 'c - cedilla'],
- ['è', 'è', true, 'e - grave'],
- ['é', 'é', true, 'e - acute'],
- ['ê', 'ê', true, 'e - circumflex'],
- ['ë', 'ë', true, 'e - diaeresis'],
- ['ì', 'ì', true, 'i - grave'],
- ['í', 'í', true, 'i - acute'],
- ['î', 'î', true, 'i - circumflex'],
- ['ï', 'ï', true, 'i - diaeresis'],
- ['ð', 'ð', true, 'eth'],
- ['ñ', 'ñ', true, 'n - tilde'],
- ['ò', 'ò', true, 'o - grave'],
- ['ó', 'ó', true, 'o - acute'],
- ['ô', 'ô', true, 'o - circumflex'],
- ['õ', 'õ', true, 'o - tilde'],
- ['ö', 'ö', true, 'o - diaeresis'],
- ['ø', 'ø', true, 'o slash'],
- ['œ', 'œ', true, 'ligature oe'],
- ['š', 'š', true, 's - caron'],
- ['ù', 'ù', true, 'u - grave'],
- ['ú', 'ú', true, 'u - acute'],
- ['û', 'û', true, 'u - circumflex'],
- ['ü', 'ü', true, 'u - diaeresis'],
- ['ý', 'ý', true, 'y - acute'],
- ['þ', 'þ', true, 'thorn'],
- ['ÿ', 'ÿ', true, 'y - diaeresis'],
- ['Α', 'Α', true, 'Alpha'],
- ['Β', 'Β', true, 'Beta'],
- ['Γ', 'Γ', true, 'Gamma'],
- ['Δ', 'Δ', true, 'Delta'],
- ['Ε', 'Ε', true, 'Epsilon'],
- ['Ζ', 'Ζ', true, 'Zeta'],
- ['Η', 'Η', true, 'Eta'],
- ['Θ', 'Θ', true, 'Theta'],
- ['Ι', 'Ι', true, 'Iota'],
- ['Κ', 'Κ', true, 'Kappa'],
- ['Λ', 'Λ', true, 'Lambda'],
- ['Μ', 'Μ', true, 'Mu'],
- ['Ν', 'Ν', true, 'Nu'],
- ['Ξ', 'Ξ', true, 'Xi'],
- ['Ο', 'Ο', true, 'Omicron'],
- ['Π', 'Π', true, 'Pi'],
- ['Ρ', 'Ρ', true, 'Rho'],
- ['Σ', 'Σ', true, 'Sigma'],
- ['Τ', 'Τ', true, 'Tau'],
- ['Υ', 'Υ', true, 'Upsilon'],
- ['Φ', 'Φ', true, 'Phi'],
- ['Χ', 'Χ', true, 'Chi'],
- ['Ψ', 'Ψ', true, 'Psi'],
- ['Ω', 'Ω', true, 'Omega'],
- ['α', 'α', true, 'alpha'],
- ['β', 'β', true, 'beta'],
- ['γ', 'γ', true, 'gamma'],
- ['δ', 'δ', true, 'delta'],
- ['ε', 'ε', true, 'epsilon'],
- ['ζ', 'ζ', true, 'zeta'],
- ['η', 'η', true, 'eta'],
- ['θ', 'θ', true, 'theta'],
- ['ι', 'ι', true, 'iota'],
- ['κ', 'κ', true, 'kappa'],
- ['λ', 'λ', true, 'lambda'],
- ['μ', 'μ', true, 'mu'],
- ['ν', 'ν', true, 'nu'],
- ['ξ', 'ξ', true, 'xi'],
- ['ο', 'ο', true, 'omicron'],
- ['π', 'π', true, 'pi'],
- ['ρ', 'ρ', true, 'rho'],
- ['ς', 'ς', true, 'final sigma'],
- ['σ', 'σ', true, 'sigma'],
- ['τ', 'τ', true, 'tau'],
- ['υ', 'υ', true, 'upsilon'],
- ['φ', 'φ', true, 'phi'],
- ['χ', 'χ', true, 'chi'],
- ['ψ', 'ψ', true, 'psi'],
- ['ω', 'ω', true, 'omega'],
-// symbols
- ['ℵ', 'ℵ', false,'alef symbol'],
- ['ϖ', 'ϖ', false,'pi symbol'],
- ['ℜ', 'ℜ', false,'real part symbol'],
- ['ϑ','ϑ', false,'theta symbol'],
- ['ϒ', 'ϒ', false,'upsilon - hook symbol'],
- ['℘', '℘', false,'Weierstrass p'],
- ['ℑ', 'ℑ', false,'imaginary part'],
-// arrows
- ['←', '←', true, 'leftwards arrow'],
- ['↑', '↑', true, 'upwards arrow'],
- ['→', '→', true, 'rightwards arrow'],
- ['↓', '↓', true, 'downwards arrow'],
- ['↔', '↔', true, 'left right arrow'],
- ['↵', '↵', false,'carriage return'],
- ['⇐', '⇐', false,'leftwards double arrow'],
- ['⇑', '⇑', false,'upwards double arrow'],
- ['⇒', '⇒', false,'rightwards double arrow'],
- ['⇓', '⇓', false,'downwards double arrow'],
- ['⇔', '⇔', false,'left right double arrow'],
- ['∴', '∴', false,'therefore'],
- ['⊂', '⊂', false,'subset of'],
- ['⊃', '⊃', false,'superset of'],
- ['⊄', '⊄', false,'not a subset of'],
- ['⊆', '⊆', false,'subset of or equal to'],
- ['⊇', '⊇', false,'superset of or equal to'],
- ['⊕', '⊕', false,'circled plus'],
- ['⊗', '⊗', false,'circled times'],
- ['⊥', '⊥', false,'perpendicular'],
- ['⋅', '⋅', false,'dot operator'],
- ['⌈', '⌈', false,'left ceiling'],
- ['⌉', '⌉', false,'right ceiling'],
- ['⌊', '⌊', false,'left floor'],
- ['⌋', '⌋', false,'right floor'],
- ['〈', '〈', false,'left-pointing angle bracket'],
- ['〉', '〉', false,'right-pointing angle bracket'],
- ['◊', '◊', true, 'lozenge'],
- ['♠', '♠', true, 'black spade suit'],
- ['♣', '♣', true, 'black club suit'],
- ['♥', '♥', true, 'black heart suit'],
- ['♦', '♦', true, 'black diamond suit'],
- [' ', ' ', false,'en space'],
- [' ', ' ', false,'em space'],
- [' ', ' ', false,'thin space'],
- ['', '', false,'zero width non-joiner'],
- ['', '', false,'zero width joiner'],
- ['', '', false,'left-to-right mark'],
- ['', '', false,'right-to-left mark'],
- ['', '', false,'soft hyphen']
-];
-
-tinyMCEPopup.onInit.add(function() {
- tinyMCEPopup.dom.setHTML('charmapView', renderCharMapHTML());
- addKeyboardNavigation();
-});
-
-function addKeyboardNavigation(){
- var tableElm, cells, settings;
-
- cells = tinyMCEPopup.dom.select("a.charmaplink", "charmapgroup");
-
- settings ={
- root: "charmapgroup",
- items: cells
- };
- cells[0].tabindex=0;
- tinyMCEPopup.dom.addClass(cells[0], "mceFocus");
- if (tinymce.isGecko) {
- cells[0].focus();
- } else {
- setTimeout(function(){
- cells[0].focus();
- }, 100);
- }
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
-}
-
-function renderCharMapHTML() {
- var charsPerRow = 20, tdWidth=20, tdHeight=20, i;
- var html = ''+
- '';
- var cols=-1;
-
- for (i=0; i'
- + ''
- + charmap[i][1]
- + '';
- if ((cols+1) % charsPerRow == 0)
- html += ' ';
- }
- }
-
- if (cols % charsPerRow > 0) {
- var padd = charsPerRow - (cols % charsPerRow);
- for (var i=0; i ';
- }
-
- html += '
';
- html = html.replace(/<\/tr>/g, '');
-
- return html;
-}
-
-function insertChar(chr) {
- tinyMCEPopup.execCommand('mceInsertContent', false, '' + chr + ';');
-
- // Refocus in window
- if (tinyMCEPopup.isWindow)
- window.focus();
-
- tinyMCEPopup.editor.focus();
- tinyMCEPopup.close();
-}
-
-function previewChar(codeA, codeB, codeN) {
- var elmA = document.getElementById('codeA');
- var elmB = document.getElementById('codeB');
- var elmV = document.getElementById('codeV');
- var elmN = document.getElementById('codeN');
-
- if (codeA=='#160;') {
- elmV.innerHTML = '__';
- } else {
- elmV.innerHTML = '&' + codeA;
- }
-
- elmB.innerHTML = '&' + codeA;
- elmA.innerHTML = '&' + codeB;
- elmN.innerHTML = codeN;
-}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/js/color_picker.js b/src/wp-includes/js/tinymce/themes/advanced/js/color_picker.js
deleted file mode 100644
index cc891c1711..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/js/color_picker.js
+++ /dev/null
@@ -1,345 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var detail = 50, strhex = "0123456789abcdef", i, isMouseDown = false, isMouseOver = false;
-
-var colors = [
- "#000000","#000033","#000066","#000099","#0000cc","#0000ff","#330000","#330033",
- "#330066","#330099","#3300cc","#3300ff","#660000","#660033","#660066","#660099",
- "#6600cc","#6600ff","#990000","#990033","#990066","#990099","#9900cc","#9900ff",
- "#cc0000","#cc0033","#cc0066","#cc0099","#cc00cc","#cc00ff","#ff0000","#ff0033",
- "#ff0066","#ff0099","#ff00cc","#ff00ff","#003300","#003333","#003366","#003399",
- "#0033cc","#0033ff","#333300","#333333","#333366","#333399","#3333cc","#3333ff",
- "#663300","#663333","#663366","#663399","#6633cc","#6633ff","#993300","#993333",
- "#993366","#993399","#9933cc","#9933ff","#cc3300","#cc3333","#cc3366","#cc3399",
- "#cc33cc","#cc33ff","#ff3300","#ff3333","#ff3366","#ff3399","#ff33cc","#ff33ff",
- "#006600","#006633","#006666","#006699","#0066cc","#0066ff","#336600","#336633",
- "#336666","#336699","#3366cc","#3366ff","#666600","#666633","#666666","#666699",
- "#6666cc","#6666ff","#996600","#996633","#996666","#996699","#9966cc","#9966ff",
- "#cc6600","#cc6633","#cc6666","#cc6699","#cc66cc","#cc66ff","#ff6600","#ff6633",
- "#ff6666","#ff6699","#ff66cc","#ff66ff","#009900","#009933","#009966","#009999",
- "#0099cc","#0099ff","#339900","#339933","#339966","#339999","#3399cc","#3399ff",
- "#669900","#669933","#669966","#669999","#6699cc","#6699ff","#999900","#999933",
- "#999966","#999999","#9999cc","#9999ff","#cc9900","#cc9933","#cc9966","#cc9999",
- "#cc99cc","#cc99ff","#ff9900","#ff9933","#ff9966","#ff9999","#ff99cc","#ff99ff",
- "#00cc00","#00cc33","#00cc66","#00cc99","#00cccc","#00ccff","#33cc00","#33cc33",
- "#33cc66","#33cc99","#33cccc","#33ccff","#66cc00","#66cc33","#66cc66","#66cc99",
- "#66cccc","#66ccff","#99cc00","#99cc33","#99cc66","#99cc99","#99cccc","#99ccff",
- "#cccc00","#cccc33","#cccc66","#cccc99","#cccccc","#ccccff","#ffcc00","#ffcc33",
- "#ffcc66","#ffcc99","#ffcccc","#ffccff","#00ff00","#00ff33","#00ff66","#00ff99",
- "#00ffcc","#00ffff","#33ff00","#33ff33","#33ff66","#33ff99","#33ffcc","#33ffff",
- "#66ff00","#66ff33","#66ff66","#66ff99","#66ffcc","#66ffff","#99ff00","#99ff33",
- "#99ff66","#99ff99","#99ffcc","#99ffff","#ccff00","#ccff33","#ccff66","#ccff99",
- "#ccffcc","#ccffff","#ffff00","#ffff33","#ffff66","#ffff99","#ffffcc","#ffffff"
-];
-
-var named = {
- '#F0F8FF':'Alice Blue','#FAEBD7':'Antique White','#00FFFF':'Aqua','#7FFFD4':'Aquamarine','#F0FFFF':'Azure','#F5F5DC':'Beige',
- '#FFE4C4':'Bisque','#000000':'Black','#FFEBCD':'Blanched Almond','#0000FF':'Blue','#8A2BE2':'Blue Violet','#A52A2A':'Brown',
- '#DEB887':'Burly Wood','#5F9EA0':'Cadet Blue','#7FFF00':'Chartreuse','#D2691E':'Chocolate','#FF7F50':'Coral','#6495ED':'Cornflower Blue',
- '#FFF8DC':'Cornsilk','#DC143C':'Crimson','#00FFFF':'Cyan','#00008B':'Dark Blue','#008B8B':'Dark Cyan','#B8860B':'Dark Golden Rod',
- '#A9A9A9':'Dark Gray','#A9A9A9':'Dark Grey','#006400':'Dark Green','#BDB76B':'Dark Khaki','#8B008B':'Dark Magenta','#556B2F':'Dark Olive Green',
- '#FF8C00':'Darkorange','#9932CC':'Dark Orchid','#8B0000':'Dark Red','#E9967A':'Dark Salmon','#8FBC8F':'Dark Sea Green','#483D8B':'Dark Slate Blue',
- '#2F4F4F':'Dark Slate Gray','#2F4F4F':'Dark Slate Grey','#00CED1':'Dark Turquoise','#9400D3':'Dark Violet','#FF1493':'Deep Pink','#00BFFF':'Deep Sky Blue',
- '#696969':'Dim Gray','#696969':'Dim Grey','#1E90FF':'Dodger Blue','#B22222':'Fire Brick','#FFFAF0':'Floral White','#228B22':'Forest Green',
- '#FF00FF':'Fuchsia','#DCDCDC':'Gainsboro','#F8F8FF':'Ghost White','#FFD700':'Gold','#DAA520':'Golden Rod','#808080':'Gray','#808080':'Grey',
- '#008000':'Green','#ADFF2F':'Green Yellow','#F0FFF0':'Honey Dew','#FF69B4':'Hot Pink','#CD5C5C':'Indian Red','#4B0082':'Indigo','#FFFFF0':'Ivory',
- '#F0E68C':'Khaki','#E6E6FA':'Lavender','#FFF0F5':'Lavender Blush','#7CFC00':'Lawn Green','#FFFACD':'Lemon Chiffon','#ADD8E6':'Light Blue',
- '#F08080':'Light Coral','#E0FFFF':'Light Cyan','#FAFAD2':'Light Golden Rod Yellow','#D3D3D3':'Light Gray','#D3D3D3':'Light Grey','#90EE90':'Light Green',
- '#FFB6C1':'Light Pink','#FFA07A':'Light Salmon','#20B2AA':'Light Sea Green','#87CEFA':'Light Sky Blue','#778899':'Light Slate Gray','#778899':'Light Slate Grey',
- '#B0C4DE':'Light Steel Blue','#FFFFE0':'Light Yellow','#00FF00':'Lime','#32CD32':'Lime Green','#FAF0E6':'Linen','#FF00FF':'Magenta','#800000':'Maroon',
- '#66CDAA':'Medium Aqua Marine','#0000CD':'Medium Blue','#BA55D3':'Medium Orchid','#9370D8':'Medium Purple','#3CB371':'Medium Sea Green','#7B68EE':'Medium Slate Blue',
- '#00FA9A':'Medium Spring Green','#48D1CC':'Medium Turquoise','#C71585':'Medium Violet Red','#191970':'Midnight Blue','#F5FFFA':'Mint Cream','#FFE4E1':'Misty Rose','#FFE4B5':'Moccasin',
- '#FFDEAD':'Navajo White','#000080':'Navy','#FDF5E6':'Old Lace','#808000':'Olive','#6B8E23':'Olive Drab','#FFA500':'Orange','#FF4500':'Orange Red','#DA70D6':'Orchid',
- '#EEE8AA':'Pale Golden Rod','#98FB98':'Pale Green','#AFEEEE':'Pale Turquoise','#D87093':'Pale Violet Red','#FFEFD5':'Papaya Whip','#FFDAB9':'Peach Puff',
- '#CD853F':'Peru','#FFC0CB':'Pink','#DDA0DD':'Plum','#B0E0E6':'Powder Blue','#800080':'Purple','#FF0000':'Red','#BC8F8F':'Rosy Brown','#4169E1':'Royal Blue',
- '#8B4513':'Saddle Brown','#FA8072':'Salmon','#F4A460':'Sandy Brown','#2E8B57':'Sea Green','#FFF5EE':'Sea Shell','#A0522D':'Sienna','#C0C0C0':'Silver',
- '#87CEEB':'Sky Blue','#6A5ACD':'Slate Blue','#708090':'Slate Gray','#708090':'Slate Grey','#FFFAFA':'Snow','#00FF7F':'Spring Green',
- '#4682B4':'Steel Blue','#D2B48C':'Tan','#008080':'Teal','#D8BFD8':'Thistle','#FF6347':'Tomato','#40E0D0':'Turquoise','#EE82EE':'Violet',
- '#F5DEB3':'Wheat','#FFFFFF':'White','#F5F5F5':'White Smoke','#FFFF00':'Yellow','#9ACD32':'Yellow Green'
-};
-
-var namedLookup = {};
-
-function init() {
- var inputColor = convertRGBToHex(tinyMCEPopup.getWindowArg('input_color')), key, value;
-
- tinyMCEPopup.resizeToInnerSize();
-
- generatePicker();
- generateWebColors();
- generateNamedColors();
-
- if (inputColor) {
- changeFinalColor(inputColor);
-
- col = convertHexToRGB(inputColor);
-
- if (col)
- updateLight(col.r, col.g, col.b);
- }
-
- for (key in named) {
- value = named[key];
- namedLookup[value.replace(/\s+/, '').toLowerCase()] = key.replace(/#/, '').toLowerCase();
- }
-}
-
-function toHexColor(color) {
- var matches, red, green, blue, toInt = parseInt;
-
- function hex(value) {
- value = parseInt(value).toString(16);
-
- return value.length > 1 ? value : '0' + value; // Padd with leading zero
- };
-
- color = tinymce.trim(color);
- color = color.replace(/^[#]/, '').toLowerCase(); // remove leading '#'
- color = namedLookup[color] || color;
-
- matches = /^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1]);
- green = toInt(matches[2]);
- blue = toInt(matches[3]);
- } else {
- matches = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1], 16);
- green = toInt(matches[2], 16);
- blue = toInt(matches[3], 16);
- } else {
- matches = /^([0-9a-f])([0-9a-f])([0-9a-f])$/.exec(color);
-
- if (matches) {
- red = toInt(matches[1] + matches[1], 16);
- green = toInt(matches[2] + matches[2], 16);
- blue = toInt(matches[3] + matches[3], 16);
- } else {
- return '';
- }
- }
- }
-
- return '#' + hex(red) + hex(green) + hex(blue);
-}
-
-function insertAction() {
- var color = document.getElementById("color").value, f = tinyMCEPopup.getWindowArg('func');
-
- var hexColor = toHexColor(color);
-
- if (hexColor === '') {
- var text = tinyMCEPopup.editor.getLang('advanced_dlg.invalid_color_value');
- tinyMCEPopup.alert(text + ': ' + color);
- }
- else {
- tinyMCEPopup.restoreSelection();
-
- if (f)
- f(hexColor);
-
- tinyMCEPopup.close();
- }
-}
-
-function showColor(color, name) {
- if (name)
- document.getElementById("colorname").innerHTML = name;
-
- document.getElementById("preview").style.backgroundColor = color;
- document.getElementById("color").value = color.toUpperCase();
-}
-
-function convertRGBToHex(col) {
- var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
-
- if (!col)
- return col;
-
- var rgb = col.replace(re, "$1,$2,$3").split(',');
- if (rgb.length == 3) {
- r = parseInt(rgb[0]).toString(16);
- g = parseInt(rgb[1]).toString(16);
- b = parseInt(rgb[2]).toString(16);
-
- r = r.length == 1 ? '0' + r : r;
- g = g.length == 1 ? '0' + g : g;
- b = b.length == 1 ? '0' + b : b;
-
- return "#" + r + g + b;
- }
-
- return col;
-}
-
-function convertHexToRGB(col) {
- if (col.indexOf('#') != -1) {
- col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
-
- r = parseInt(col.substring(0, 2), 16);
- g = parseInt(col.substring(2, 4), 16);
- b = parseInt(col.substring(4, 6), 16);
-
- return {r : r, g : g, b : b};
- }
-
- return null;
-}
-
-function generatePicker() {
- var el = document.getElementById('light'), h = '', i;
-
- for (i = 0; i < detail; i++){
- h += '';
- }
-
- el.innerHTML = h;
-}
-
-function generateWebColors() {
- var el = document.getElementById('webcolors'), h = '', i;
-
- if (el.className == 'generated')
- return;
-
- // TODO: VoiceOver doesn't seem to support legend as a label referenced by labelledby.
- h += ''
- + '';
-
- for (i=0; i'
- + '';
- if ((i+1) % 18 == 0)
- h += ' ';
- }
-
- h += '
';
-
- el.innerHTML = h;
- el.className = 'generated';
-
- paintCanvas(el);
- enableKeyboardNavigation(el.firstChild);
-}
-
-function paintCanvas(el) {
- tinyMCEPopup.getWin().tinymce.each(tinyMCEPopup.dom.select('canvas.mceColorSwatch', el), function(canvas) {
- var context;
- if (canvas.getContext && (context = canvas.getContext("2d"))) {
- context.fillStyle = canvas.getAttribute('data-color');
- context.fillRect(0, 0, 10, 10);
- }
- });
-}
-function generateNamedColors() {
- var el = document.getElementById('namedcolors'), h = '', n, v, i = 0;
-
- if (el.className == 'generated')
- return;
-
- for (n in named) {
- v = named[n];
- h += '';
- if (tinyMCEPopup.editor.forcedHighContrastMode) {
- h += '';
- }
- h += '';
- h += '';
- i++;
- }
-
- el.innerHTML = h;
- el.className = 'generated';
-
- paintCanvas(el);
- enableKeyboardNavigation(el);
-}
-
-function enableKeyboardNavigation(el) {
- tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
- root: el,
- items: tinyMCEPopup.dom.select('a', el)
- }, tinyMCEPopup.dom);
-}
-
-function dechex(n) {
- return strhex.charAt(Math.floor(n / 16)) + strhex.charAt(n % 16);
-}
-
-function computeColor(e) {
- var x, y, partWidth, partDetail, imHeight, r, g, b, coef, i, finalCoef, finalR, finalG, finalB, pos = tinyMCEPopup.dom.getPos(e.target);
-
- x = e.offsetX ? e.offsetX : (e.target ? e.clientX - pos.x : 0);
- y = e.offsetY ? e.offsetY : (e.target ? e.clientY - pos.y : 0);
-
- partWidth = document.getElementById('colors').width / 6;
- partDetail = detail / 2;
- imHeight = document.getElementById('colors').height;
-
- r = (x >= 0)*(x < partWidth)*255 + (x >= partWidth)*(x < 2*partWidth)*(2*255 - x * 255 / partWidth) + (x >= 4*partWidth)*(x < 5*partWidth)*(-4*255 + x * 255 / partWidth) + (x >= 5*partWidth)*(x < 6*partWidth)*255;
- g = (x >= 0)*(x < partWidth)*(x * 255 / partWidth) + (x >= partWidth)*(x < 3*partWidth)*255 + (x >= 3*partWidth)*(x < 4*partWidth)*(4*255 - x * 255 / partWidth);
- b = (x >= 2*partWidth)*(x < 3*partWidth)*(-2*255 + x * 255 / partWidth) + (x >= 3*partWidth)*(x < 5*partWidth)*255 + (x >= 5*partWidth)*(x < 6*partWidth)*(6*255 - x * 255 / partWidth);
-
- coef = (imHeight - y) / imHeight;
- r = 128 + (r - 128) * coef;
- g = 128 + (g - 128) * coef;
- b = 128 + (b - 128) * coef;
-
- changeFinalColor('#' + dechex(r) + dechex(g) + dechex(b));
- updateLight(r, g, b);
-}
-
-function updateLight(r, g, b) {
- var i, partDetail = detail / 2, finalCoef, finalR, finalG, finalB, color;
-
- for (i=0; i=0) && (i');
- },
-
- init : function() {
- var f = document.forms[0], ed = tinyMCEPopup.editor;
-
- // Setup browse button
- document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
- if (isVisible('srcbrowser'))
- document.getElementById('src').style.width = '180px';
-
- e = ed.selection.getNode();
-
- this.fillFileList('image_list', tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList'));
-
- if (e.nodeName == 'IMG') {
- f.src.value = ed.dom.getAttrib(e, 'src');
- f.alt.value = ed.dom.getAttrib(e, 'alt');
- f.border.value = this.getAttrib(e, 'border');
- f.vspace.value = this.getAttrib(e, 'vspace');
- f.hspace.value = this.getAttrib(e, 'hspace');
- f.width.value = ed.dom.getAttrib(e, 'width');
- f.height.value = ed.dom.getAttrib(e, 'height');
- f.insert.value = ed.getLang('update');
- this.styleVal = ed.dom.getAttrib(e, 'style');
- selectByValue(f, 'image_list', f.src.value);
- selectByValue(f, 'align', this.getAttrib(e, 'align'));
- this.updateStyle();
- }
- },
-
- fillFileList : function(id, l) {
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
-
- l = typeof(l) === 'function' ? l() : window[l];
-
- if (l && l.length > 0) {
- lst.options[lst.options.length] = new Option('', '');
-
- tinymce.each(l, function(o) {
- lst.options[lst.options.length] = new Option(o[0], o[1]);
- });
- } else
- dom.remove(dom.getParent(id, 'tr'));
- },
-
- update : function() {
- var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, args = {}, el;
-
- tinyMCEPopup.restoreSelection();
-
- if (f.src.value === '') {
- if (ed.selection.getNode().nodeName == 'IMG') {
- ed.dom.remove(ed.selection.getNode());
- ed.execCommand('mceRepaint');
- }
-
- tinyMCEPopup.close();
- return;
- }
-
- if (!ed.settings.inline_styles) {
- args = tinymce.extend(args, {
- vspace : nl.vspace.value,
- hspace : nl.hspace.value,
- border : nl.border.value,
- align : getSelectValue(f, 'align')
- });
- } else
- args.style = this.styleVal;
-
- tinymce.extend(args, {
- src : f.src.value.replace(/ /g, '%20'),
- alt : f.alt.value,
- width : f.width.value,
- height : f.height.value
- });
-
- el = ed.selection.getNode();
-
- if (el && el.nodeName == 'IMG') {
- ed.dom.setAttribs(el, args);
- tinyMCEPopup.editor.execCommand('mceRepaint');
- tinyMCEPopup.editor.focus();
- } else {
- tinymce.each(args, function(value, name) {
- if (value === "") {
- delete args[name];
- }
- });
-
- ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
- ed.undoManager.add();
- }
-
- tinyMCEPopup.close();
- },
-
- updateStyle : function() {
- var dom = tinyMCEPopup.dom, st = {}, v, f = document.forms[0];
-
- if (tinyMCEPopup.editor.settings.inline_styles) {
- tinymce.each(tinyMCEPopup.dom.parseStyle(this.styleVal), function(value, key) {
- st[key] = value;
- });
-
- // Handle align
- v = getSelectValue(f, 'align');
- if (v) {
- if (v == 'left' || v == 'right') {
- st['float'] = v;
- delete st['vertical-align'];
- } else {
- st['vertical-align'] = v;
- delete st['float'];
- }
- } else {
- delete st['float'];
- delete st['vertical-align'];
- }
-
- // Handle border
- v = f.border.value;
- if (v || v == '0') {
- if (v == '0')
- st['border'] = '0';
- else
- st['border'] = v + 'px solid black';
- } else
- delete st['border'];
-
- // Handle hspace
- v = f.hspace.value;
- if (v) {
- delete st['margin'];
- st['margin-left'] = v + 'px';
- st['margin-right'] = v + 'px';
- } else {
- delete st['margin-left'];
- delete st['margin-right'];
- }
-
- // Handle vspace
- v = f.vspace.value;
- if (v) {
- delete st['margin'];
- st['margin-top'] = v + 'px';
- st['margin-bottom'] = v + 'px';
- } else {
- delete st['margin-top'];
- delete st['margin-bottom'];
- }
-
- // Merge
- st = tinyMCEPopup.dom.parseStyle(dom.serializeStyle(st), 'img');
- this.styleVal = dom.serializeStyle(st, 'img');
- }
- },
-
- getAttrib : function(e, at) {
- var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
-
- if (ed.settings.inline_styles) {
- switch (at) {
- case 'align':
- if (v = dom.getStyle(e, 'float'))
- return v;
-
- if (v = dom.getStyle(e, 'vertical-align'))
- return v;
-
- break;
-
- case 'hspace':
- v = dom.getStyle(e, 'margin-left')
- v2 = dom.getStyle(e, 'margin-right');
- if (v && v == v2)
- return parseInt(v.replace(/[^0-9]/g, ''));
-
- break;
-
- case 'vspace':
- v = dom.getStyle(e, 'margin-top')
- v2 = dom.getStyle(e, 'margin-bottom');
- if (v && v == v2)
- return parseInt(v.replace(/[^0-9]/g, ''));
-
- break;
-
- case 'border':
- v = 0;
-
- tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
- sv = dom.getStyle(e, 'border-' + sv + '-width');
-
- // False or not the same as prev
- if (!sv || (sv != v && v !== 0)) {
- v = 0;
- return false;
- }
-
- if (sv)
- v = sv;
- });
-
- if (v)
- return parseInt(v.replace(/[^0-9]/g, ''));
-
- break;
- }
- }
-
- if (v = dom.getAttrib(e, at))
- return v;
-
- return '';
- },
-
- resetImageData : function() {
- var f = document.forms[0];
-
- f.width.value = f.height.value = "";
- },
-
- updateImageData : function() {
- var f = document.forms[0], t = ImageDialog;
-
- if (f.width.value == "")
- f.width.value = t.preloadImg.width;
-
- if (f.height.value == "")
- f.height.value = t.preloadImg.height;
- },
-
- getImageData : function() {
- var f = document.forms[0];
-
- this.preloadImg = new Image();
- this.preloadImg.onload = this.updateImageData;
- this.preloadImg.onerror = this.resetImageData;
- this.preloadImg.src = tinyMCEPopup.editor.documentBaseURI.toAbsolute(f.src.value);
- }
-};
-
-ImageDialog.preInit();
-tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
diff --git a/src/wp-includes/js/tinymce/themes/advanced/js/link.js b/src/wp-includes/js/tinymce/themes/advanced/js/link.js
deleted file mode 100644
index b08b2ba9c2..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/js/link.js
+++ /dev/null
@@ -1,159 +0,0 @@
-tinyMCEPopup.requireLangPack();
-
-var LinkDialog = {
- preInit : function() {
- var url;
-
- if (url = tinyMCEPopup.getParam("external_link_list_url"))
- document.write('');
- },
-
- init : function() {
- var f = document.forms[0], ed = tinyMCEPopup.editor;
-
- // Setup browse button
- document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser', 'href', 'file', 'theme_advanced_link');
- if (isVisible('hrefbrowser'))
- document.getElementById('href').style.width = '180px';
-
- this.fillClassList('class_list');
- this.fillFileList('link_list', 'tinyMCELinkList');
- this.fillTargetList('target_list');
-
- if (e = ed.dom.getParent(ed.selection.getNode(), 'A')) {
- f.href.value = ed.dom.getAttrib(e, 'href');
- f.linktitle.value = ed.dom.getAttrib(e, 'title');
- f.insert.value = ed.getLang('update');
- selectByValue(f, 'link_list', f.href.value);
- selectByValue(f, 'target_list', ed.dom.getAttrib(e, 'target'));
- selectByValue(f, 'class_list', ed.dom.getAttrib(e, 'class'));
- }
- },
-
- update : function() {
- var f = document.forms[0], ed = tinyMCEPopup.editor, e, b, href = f.href.value.replace(/ /g, '%20');
-
- tinyMCEPopup.restoreSelection();
- e = ed.dom.getParent(ed.selection.getNode(), 'A');
-
- // Remove element if there is no href
- if (!f.href.value) {
- if (e) {
- b = ed.selection.getBookmark();
- ed.dom.remove(e, 1);
- ed.selection.moveToBookmark(b);
- tinyMCEPopup.execCommand("mceEndUndoLevel");
- tinyMCEPopup.close();
- return;
- }
- }
-
- // Create new anchor elements
- if (e == null) {
- ed.getDoc().execCommand("unlink", false, null);
- tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
-
- tinymce.each(ed.dom.select("a"), function(n) {
- if (ed.dom.getAttrib(n, 'href') == '#mce_temp_url#') {
- e = n;
-
- ed.dom.setAttribs(e, {
- href : href,
- title : f.linktitle.value,
- target : f.target_list ? getSelectValue(f, "target_list") : null,
- 'class' : f.class_list ? getSelectValue(f, "class_list") : null
- });
- }
- });
- } else {
- ed.dom.setAttribs(e, {
- href : href,
- title : f.linktitle.value
- });
-
- if (f.target_list) {
- ed.dom.setAttrib(e, 'target', getSelectValue(f, "target_list"));
- }
-
- if (f.class_list) {
- ed.dom.setAttrib(e, 'class', getSelectValue(f, "class_list"));
- }
- }
-
- // Don't move caret if selection was image
- if (e.childNodes.length != 1 || e.firstChild.nodeName != 'IMG') {
- ed.focus();
- ed.selection.select(e);
- ed.selection.collapse(0);
- tinyMCEPopup.storeSelection();
- }
-
- tinyMCEPopup.execCommand("mceEndUndoLevel");
- tinyMCEPopup.close();
- },
-
- checkPrefix : function(n) {
- if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_email')))
- n.value = 'mailto:' + n.value;
-
- if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advanced_dlg.link_is_external')))
- n.value = 'http://' + n.value;
- },
-
- fillFileList : function(id, l) {
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
-
- l = window[l];
-
- if (l && l.length > 0) {
- lst.options[lst.options.length] = new Option('', '');
-
- tinymce.each(l, function(o) {
- lst.options[lst.options.length] = new Option(o[0], o[1]);
- });
- } else
- dom.remove(dom.getParent(id, 'tr'));
- },
-
- fillClassList : function(id) {
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
-
- if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
- cl = [];
-
- tinymce.each(v.split(';'), function(v) {
- var p = v.split('=');
-
- cl.push({'title' : p[0], 'class' : p[1]});
- });
- } else
- cl = tinyMCEPopup.editor.dom.getClasses();
-
- if (cl.length > 0) {
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
-
- tinymce.each(cl, function(o) {
- lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
- });
- } else
- dom.remove(dom.getParent(id, 'tr'));
- },
-
- fillTargetList : function(id) {
- var dom = tinyMCEPopup.dom, lst = dom.get(id), v;
-
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_same'), '_self');
- lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('advanced_dlg.link_target_blank'), '_blank');
-
- if (v = tinyMCEPopup.getParam('theme_advanced_link_targets')) {
- tinymce.each(v.split(','), function(v) {
- v = v.split('=');
- lst.options[lst.options.length] = new Option(v[0], v[1]);
- });
- }
- }
-};
-
-LinkDialog.preInit();
-tinyMCEPopup.onInit.add(LinkDialog.init, LinkDialog);
diff --git a/src/wp-includes/js/tinymce/themes/advanced/js/source_editor.js b/src/wp-includes/js/tinymce/themes/advanced/js/source_editor.js
deleted file mode 100644
index d4179371a0..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/js/source_editor.js
+++ /dev/null
@@ -1,78 +0,0 @@
-tinyMCEPopup.requireLangPack();
-tinyMCEPopup.onInit.add(onLoadInit);
-
-function saveContent() {
- tinyMCEPopup.editor.setContent(document.getElementById('htmlSource').value, {source_view : true});
- tinyMCEPopup.close();
-}
-
-function onLoadInit() {
- tinyMCEPopup.resizeToInnerSize();
-
- // Remove Gecko spellchecking
- if (tinymce.isGecko)
- document.body.spellcheck = tinyMCEPopup.editor.getParam("gecko_spellcheck");
-
- document.getElementById('htmlSource').value = tinyMCEPopup.editor.getContent({source_view : true});
-
- if (tinyMCEPopup.editor.getParam("theme_advanced_source_editor_wrap", true)) {
- turnWrapOn();
- document.getElementById('wraped').checked = true;
- }
-
- resizeInputs();
-}
-
-function setWrap(val) {
- var v, n, s = document.getElementById('htmlSource');
-
- s.wrap = val;
-
- if (!tinymce.isIE) {
- v = s.value;
- n = s.cloneNode(false);
- n.setAttribute("wrap", val);
- s.parentNode.replaceChild(n, s);
- n.value = v;
- }
-}
-
-function setWhiteSpaceCss(value) {
- var el = document.getElementById('htmlSource');
- tinymce.DOM.setStyle(el, 'white-space', value);
-}
-
-function turnWrapOff() {
- if (tinymce.isWebKit) {
- setWhiteSpaceCss('pre');
- } else {
- setWrap('off');
- }
-}
-
-function turnWrapOn() {
- if (tinymce.isWebKit) {
- setWhiteSpaceCss('pre-wrap');
- } else {
- setWrap('soft');
- }
-}
-
-function toggleWordWrap(elm) {
- if (elm.checked) {
- turnWrapOn();
- } else {
- turnWrapOff();
- }
-}
-
-function resizeInputs() {
- var vp = tinyMCEPopup.dom.getViewPort(window), el;
-
- el = document.getElementById('htmlSource');
-
- if (el) {
- el.style.width = (vp.w - 20) + 'px';
- el.style.height = (vp.h - 65) + 'px';
- }
-}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/link.htm b/src/wp-includes/js/tinymce/themes/advanced/link.htm
deleted file mode 100644
index 0180002be1..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/link.htm
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
- {#advanced_dlg.link_title}
-
-
-
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/themes/advanced/shortcuts.htm b/src/wp-includes/js/tinymce/themes/advanced/shortcuts.htm
deleted file mode 100644
index 781801e058..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/shortcuts.htm
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
- {#advanced_dlg.accessibility_help}
-
-
-
-
- {#advanced_dlg.accessibility_usage_title}
- Toolbars
- Press ALT-F10 to move focus to the toolbars. Navigate through the buttons using the arrow keys.
- Press enter to activate a button and return focus to the editor.
- Press escape to return focus to the editor without performing any actions.
-
- Status Bar
- To access the editor status bar, press ALT-F11. Use the left and right arrow keys to navigate between elements in the path.
- Press enter or space to select an element. Press escape to return focus to the editor without changing the selection.
-
- Context Menu
- Press shift-F10 to activate the context menu. Use the up and down arrow keys to move between menu items. To open sub-menus press the right arrow key.
- To close submenus press the left arrow key. Press escape to close the context menu.
-
- Keyboard Shortcuts
-
-
-
- Keystroke
- Function
-
-
-
-
- Control-B Bold
-
-
- Control-I Italic
-
-
- Control-Z Undo
-
-
- Control-Y Redo
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/content.css b/src/wp-includes/js/tinymce/themes/advanced/skins/default/content.css
deleted file mode 100644
index 4d63ca9810..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/default/content.css
+++ /dev/null
@@ -1,50 +0,0 @@
-body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
-body {background:#FFF;}
-body.mceForceColors {background:#FFF; color:#000;}
-body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
-h1 {font-size: 2em}
-h2 {font-size: 1.5em}
-h3 {font-size: 1.17em}
-h4 {font-size: 1em}
-h5 {font-size: .83em}
-h6 {font-size: .75em}
-.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
-a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(img/items.gif) no-repeat center center}
-span.mceItemNbsp {background: #DDD}
-td.mceSelected, th.mceSelected {background-color:#3399ff !important}
-img {border:0;}
-table, img, hr, .mceItemAnchor {cursor:default}
-table td, table th {cursor:text}
-ins {border-bottom:1px solid green; text-decoration: none; color:green}
-del {color:red; text-decoration:line-through}
-cite {border-bottom:1px dashed blue}
-acronym {border-bottom:1px dotted #CCC; cursor:help}
-abbr {border-bottom:1px dashed #CCC; cursor:help}
-
-/* IE */
-* html body {
-scrollbar-3dlight-color:#F0F0EE;
-scrollbar-arrow-color:#676662;
-scrollbar-base-color:#F0F0EE;
-scrollbar-darkshadow-color:#DDD;
-scrollbar-face-color:#E0E0DD;
-scrollbar-highlight-color:#F0F0EE;
-scrollbar-shadow-color:#F0F0EE;
-scrollbar-track-color:#F5F5F5;
-}
-
-img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
-font[face=mceinline] {font-family:inherit !important}
-*[contentEditable]:focus {outline:0}
-
-.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
-.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
-.mceItemFlash {background-image:url(../../img/flash.gif)}
-.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
-.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
-.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
-.mceItemVideo {background-image:url(../../img/video.gif)}
-.mceItemAudio {background-image:url(../../img/video.gif)}
-.mceItemEmbeddedAudio {background-image:url(../../img/video.gif)}
-.mceItemIframe {background-image:url(../../img/iframe.gif)}
-.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css b/src/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css
deleted file mode 100644
index 8950ba3851..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Generic */
-body {
-font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
-scrollbar-3dlight-color:#F0F0EE;
-scrollbar-arrow-color:#676662;
-scrollbar-base-color:#F0F0EE;
-scrollbar-darkshadow-color:#DDDDDD;
-scrollbar-face-color:#E0E0DD;
-scrollbar-highlight-color:#F0F0EE;
-scrollbar-shadow-color:#F0F0EE;
-scrollbar-track-color:#F5F5F5;
-background:#F0F0EE;
-padding:0;
-margin:8px 8px 0 8px;
-}
-
-html {background:#F0F0EE;}
-td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-textarea {resize:none;outline:none;}
-a:link, a:visited {color:black;}
-a:hover {color:#2B6FB6;}
-.nowrap {white-space: nowrap}
-
-/* Forms */
-fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
-legend {color:#2B6FB6; font-weight:bold;}
-label.msg {display:none;}
-label.invalid {color:#EE0000; display:inline;}
-input.invalid {border:1px solid #EE0000;}
-input {background:#FFF; border:1px solid #CCC;}
-input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-input, select, textarea {border:1px solid #808080;}
-input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
-input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
-.input_noborder {border:0;}
-
-/* Buttons */
-#insert, #cancel, input.button, .updateButton {
-border:0; margin:0; padding:0;
-font-weight:bold;
-width:94px; height:26px;
-background:url(img/buttons.png) 0 -26px;
-cursor:pointer;
-padding-bottom:2px;
-float:left;
-}
-
-#insert {background:url(img/buttons.png) 0 -52px}
-#cancel {background:url(img/buttons.png) 0 0; float:right}
-
-/* Browse */
-a.pickcolor, a.browse {text-decoration:none}
-a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
-.mceOldBoxModel a.browse span {width:22px; height:20px;}
-a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
-a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
-a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
-.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
-a.pickcolor:hover span {background-color:#B2BBD0;}
-a.pickcolor:hover span.disabled {}
-
-/* Charmap */
-table.charmap {border:1px solid #AAA; text-align:center}
-td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
-#charmap a {display:block; color:#000; text-decoration:none; border:0}
-#charmap a:hover {background:#CCC;color:#2B6FB6}
-#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
-#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
-
-/* Source */
-.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
-.mceActionPanel {margin-top:5px;}
-
-/* Tabs classes */
-.tabs {width:100%; height:18px; line-height:normal; background:url(img/tabs.gif) repeat-x 0 -72px;}
-.tabs ul {margin:0; padding:0; list-style:none;}
-.tabs li {float:left; background:url(img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
-.tabs li.current {background:url(img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
-.tabs span {float:left; display:block; background:url(img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
-.tabs .current span {background:url(img/tabs.gif) no-repeat right -54px;}
-.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
-.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
-
-/* Panels */
-.panel_wrapper div.panel {display:none;}
-.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
-.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
-
-/* Columns */
-.column {float:left;}
-.properties {width:100%;}
-.properties .column1 {}
-.properties .column2 {text-align:left;}
-
-/* Titles */
-h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
-h3 {font-size:14px;}
-.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
-
-/* Dialog specific */
-#link .panel_wrapper, #link div.current {height:125px;}
-#image .panel_wrapper, #image div.current {height:200px;}
-#plugintable thead {font-weight:bold; background:#DDD;}
-#plugintable, #about #plugintable td {border:1px solid #919B9C;}
-#plugintable {width:96%; margin-top:10px;}
-#pluginscontainer {height:290px; overflow:auto;}
-#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
-#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
-#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
-#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
-#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
-#colorpicker #light div {overflow:hidden;}
-#colorpicker .panel_wrapper div.current {height:175px;}
-#colorpicker #namedcolors {width:150px;}
-#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
-#colorpicker #colornamecontainer {margin-top:5px;}
-#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png b/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png
deleted file mode 100644
index 1e53560e0a..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif b/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif
deleted file mode 100644
index d2f93671ca..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif b/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif
deleted file mode 100644
index 85e31dfb2d..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif b/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif
deleted file mode 100644
index adfdddccd7..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif b/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif
deleted file mode 100644
index 5bb90fd6a4..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif b/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif
deleted file mode 100644
index 06812cb410..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css b/src/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css
deleted file mode 100644
index 2e8c658891..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css
+++ /dev/null
@@ -1,219 +0,0 @@
-/* Reset */
-.defaultSkin table, .defaultSkin tbody, .defaultSkin a, .defaultSkin img, .defaultSkin tr, .defaultSkin div, .defaultSkin td, .defaultSkin iframe, .defaultSkin span, .defaultSkin *, .defaultSkin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
-.defaultSkin a:hover, .defaultSkin a:link, .defaultSkin a:visited, .defaultSkin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
-.defaultSkin table td {vertical-align:middle}
-
-/* Containers */
-.defaultSkin table {direction:ltr;background:transparent}
-.defaultSkin iframe {display:block;}
-.defaultSkin .mceToolbar {height:26px}
-.defaultSkin .mceLeft {text-align:left}
-.defaultSkin .mceRight {text-align:right}
-
-/* External */
-.defaultSkin .mceExternalToolbar {position:absolute; border:1px solid #CCC; border-bottom:0; display:none;}
-.defaultSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
-.defaultSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
-
-/* Layout */
-.defaultSkin table.mceLayout {border:0; border-left:1px solid #CCC; border-right:1px solid #CCC}
-.defaultSkin table.mceLayout tr.mceFirst td {border-top:1px solid #CCC}
-.defaultSkin table.mceLayout tr.mceLast td {border-bottom:1px solid #CCC}
-.defaultSkin table.mceToolbar, .defaultSkin tr.mceFirst .mceToolbar tr td, .defaultSkin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0;}
-.defaultSkin td.mceToolbar {background:#F0F0EE; padding-top:1px; vertical-align:top}
-.defaultSkin .mceIframeContainer {border-top:1px solid #CCC; border-bottom:1px solid #CCC}
-.defaultSkin .mceStatusbar {background:#F0F0EE; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; display:block; height:20px}
-.defaultSkin .mceStatusbar div {float:left; margin:2px}
-.defaultSkin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
-.defaultSkin .mceStatusbar a:hover {text-decoration:underline}
-.defaultSkin table.mceToolbar {margin-left:3px}
-.defaultSkin span.mceIcon, .defaultSkin img.mceIcon {display:block; width:20px; height:20px}
-.defaultSkin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
-.defaultSkin td.mceCenter {text-align:center;}
-.defaultSkin td.mceCenter table {margin:0 auto; text-align:left;}
-.defaultSkin td.mceRight table {margin:0 0 0 auto;}
-
-/* Button */
-.defaultSkin .mceButton {display:block; border:1px solid #F0F0EE; width:20px; height:20px; margin-right:1px}
-.defaultSkin a.mceButtonEnabled:hover {border:1px solid #0A246A; background-color:#B2BBD0}
-.defaultSkin a.mceButtonActive, .defaultSkin a.mceButtonSelected {border:1px solid #0A246A; background-color:#C2CBE0}
-.defaultSkin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-.defaultSkin .mceButtonLabeled {width:auto}
-.defaultSkin .mceButtonLabeled span.mceIcon {float:left}
-.defaultSkin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
-.defaultSkin .mceButtonDisabled .mceButtonLabel {color:#888}
-
-/* Separator */
-.defaultSkin .mceSeparator {display:block; background:url(../../img/icons.gif) -180px 0; width:2px; height:20px; margin:2px 2px 0 4px}
-
-/* ListBox */
-.defaultSkin .mceListBox, .defaultSkin .mceListBox a {display:block}
-.defaultSkin .mceListBox .mceText {padding-left:4px; width:70px; text-align:left; border:1px solid #CCC; border-right:0; background:#FFF; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
-.defaultSkin .mceListBox .mceOpen {width:9px; height:20px; background:url(../../img/icons.gif) -741px 0; margin-right:2px; border:1px solid #CCC;}
-.defaultSkin table.mceListBoxEnabled:hover .mceText, .defaultSkin .mceListBoxHover .mceText, .defaultSkin .mceListBoxSelected .mceText {border:1px solid #A2ABC0; border-right:0; background:#FFF}
-.defaultSkin table.mceListBoxEnabled:hover .mceOpen, .defaultSkin .mceListBoxHover .mceOpen, .defaultSkin .mceListBoxSelected .mceOpen {background-color:#FFF; border:1px solid #A2ABC0}
-.defaultSkin .mceListBoxDisabled a.mceText {color:gray; background-color:transparent;}
-.defaultSkin .mceListBoxMenu {overflow:auto; overflow-x:hidden}
-.defaultSkin .mceOldBoxModel .mceListBox .mceText {height:22px}
-.defaultSkin .mceOldBoxModel .mceListBox .mceOpen {width:11px; height:22px;}
-.defaultSkin select.mceNativeListBox {font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:7pt; background:#F0F0EE; border:1px solid gray; margin-right:2px;}
-
-/* SplitButton */
-.defaultSkin .mceSplitButton {width:32px; height:20px; direction:ltr}
-.defaultSkin .mceSplitButton a, .defaultSkin .mceSplitButton span {height:20px; display:block}
-.defaultSkin .mceSplitButton a.mceAction {width:20px; border:1px solid #F0F0EE; border-right:0;}
-.defaultSkin .mceSplitButton span.mceAction {width:20px; background-image:url(../../img/icons.gif);}
-.defaultSkin .mceSplitButton a.mceOpen {width:9px; background:url(../../img/icons.gif) -741px 0; border:1px solid #F0F0EE;}
-.defaultSkin .mceSplitButton span.mceOpen {display:none}
-.defaultSkin table.mceSplitButtonEnabled:hover a.mceAction, .defaultSkin .mceSplitButtonHover a.mceAction, .defaultSkin .mceSplitButtonSelected a.mceAction {border:1px solid #0A246A; border-right:0; background-color:#B2BBD0}
-.defaultSkin table.mceSplitButtonEnabled:hover a.mceOpen, .defaultSkin .mceSplitButtonHover a.mceOpen, .defaultSkin .mceSplitButtonSelected a.mceOpen {background-color:#B2BBD0; border:1px solid #0A246A;}
-.defaultSkin .mceSplitButtonDisabled .mceAction, .defaultSkin .mceSplitButtonDisabled a.mceOpen {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-.defaultSkin .mceSplitButtonActive a.mceAction {border:1px solid #0A246A; background-color:#C2CBE0}
-.defaultSkin .mceSplitButtonActive a.mceOpen {border-left:0;}
-
-/* ColorSplitButton */
-.defaultSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
-.defaultSkin .mceColorSplitMenu td {padding:2px}
-.defaultSkin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
-.defaultSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
-.defaultSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
-.defaultSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
-.defaultSkin a.mceMoreColors:hover {border:1px solid #0A246A}
-.defaultSkin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a}
-.defaultSkin .mce_forecolor span.mceAction, .defaultSkin .mce_backcolor span.mceAction {overflow:hidden; height:16px}
-
-/* Menu */
-.defaultSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #D4D0C8; direction:ltr}
-.defaultSkin .mceNoIcons span.mceIcon {width:0;}
-.defaultSkin .mceNoIcons a .mceText {padding-left:10px}
-.defaultSkin .mceMenu table {background:#FFF}
-.defaultSkin .mceMenu a, .defaultSkin .mceMenu span, .defaultSkin .mceMenu {display:block}
-.defaultSkin .mceMenu td {height:20px}
-.defaultSkin .mceMenu a {position:relative;padding:3px 0 4px 0}
-.defaultSkin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
-.defaultSkin .mceMenu span.mceText, .defaultSkin .mceMenu .mcePreview {font-size:11px}
-.defaultSkin .mceMenu pre.mceText {font-family:Monospace}
-.defaultSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
-.defaultSkin .mceMenu .mceMenuItemEnabled a:hover, .defaultSkin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
-.defaultSkin td.mceMenuItemSeparator {background:#DDD; height:1px}
-.defaultSkin .mceMenuItemTitle a {border:0; background:#EEE; border-bottom:1px solid #DDD}
-.defaultSkin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
-.defaultSkin .mceMenuItemDisabled .mceText {color:#888}
-.defaultSkin .mceMenuItemSelected .mceIcon {background:url(img/menu_check.gif)}
-.defaultSkin .mceNoIcons .mceMenuItemSelected a {background:url(img/menu_arrow.gif) no-repeat -6px center}
-.defaultSkin .mceMenu span.mceMenuLine {display:none}
-.defaultSkin .mceMenuItemSub a {background:url(img/menu_arrow.gif) no-repeat top right;}
-.defaultSkin .mceMenuItem td, .defaultSkin .mceMenuItem th {line-height: normal}
-
-/* Progress,Resize */
-.defaultSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50); background:#FFF}
-.defaultSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
-
-/* Rtl */
-.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
-.mceRtl .mceMenuItem .mceText {text-align: right}
-
-/* Formats */
-.defaultSkin .mce_formatPreview a {font-size:10px}
-.defaultSkin .mce_p span.mceText {}
-.defaultSkin .mce_address span.mceText {font-style:italic}
-.defaultSkin .mce_pre span.mceText {font-family:monospace}
-.defaultSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
-.defaultSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
-.defaultSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
-.defaultSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
-.defaultSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
-.defaultSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
-
-/* Theme */
-.defaultSkin span.mce_bold {background-position:0 0}
-.defaultSkin span.mce_italic {background-position:-60px 0}
-.defaultSkin span.mce_underline {background-position:-140px 0}
-.defaultSkin span.mce_strikethrough {background-position:-120px 0}
-.defaultSkin span.mce_undo {background-position:-160px 0}
-.defaultSkin span.mce_redo {background-position:-100px 0}
-.defaultSkin span.mce_cleanup {background-position:-40px 0}
-.defaultSkin span.mce_bullist {background-position:-20px 0}
-.defaultSkin span.mce_numlist {background-position:-80px 0}
-.defaultSkin span.mce_justifyleft {background-position:-460px 0}
-.defaultSkin span.mce_justifyright {background-position:-480px 0}
-.defaultSkin span.mce_justifycenter {background-position:-420px 0}
-.defaultSkin span.mce_justifyfull {background-position:-440px 0}
-.defaultSkin span.mce_anchor {background-position:-200px 0}
-.defaultSkin span.mce_indent {background-position:-400px 0}
-.defaultSkin span.mce_outdent {background-position:-540px 0}
-.defaultSkin span.mce_link {background-position:-500px 0}
-.defaultSkin span.mce_unlink {background-position:-640px 0}
-.defaultSkin span.mce_sub {background-position:-600px 0}
-.defaultSkin span.mce_sup {background-position:-620px 0}
-.defaultSkin span.mce_removeformat {background-position:-580px 0}
-.defaultSkin span.mce_newdocument {background-position:-520px 0}
-.defaultSkin span.mce_image {background-position:-380px 0}
-.defaultSkin span.mce_help {background-position:-340px 0}
-.defaultSkin span.mce_code {background-position:-260px 0}
-.defaultSkin span.mce_hr {background-position:-360px 0}
-.defaultSkin span.mce_visualaid {background-position:-660px 0}
-.defaultSkin span.mce_charmap {background-position:-240px 0}
-.defaultSkin span.mce_paste {background-position:-560px 0}
-.defaultSkin span.mce_copy {background-position:-700px 0}
-.defaultSkin span.mce_cut {background-position:-680px 0}
-.defaultSkin span.mce_blockquote {background-position:-220px 0}
-.defaultSkin .mce_forecolor span.mceAction {background-position:-720px 0}
-.defaultSkin .mce_backcolor span.mceAction {background-position:-760px 0}
-.defaultSkin span.mce_forecolorpicker {background-position:-720px 0}
-.defaultSkin span.mce_backcolorpicker {background-position:-760px 0}
-
-/* Plugins */
-.defaultSkin span.mce_advhr {background-position:-0px -20px}
-.defaultSkin span.mce_ltr {background-position:-20px -20px}
-.defaultSkin span.mce_rtl {background-position:-40px -20px}
-.defaultSkin span.mce_emotions {background-position:-60px -20px}
-.defaultSkin span.mce_fullpage {background-position:-80px -20px}
-.defaultSkin span.mce_fullscreen {background-position:-100px -20px}
-.defaultSkin span.mce_iespell {background-position:-120px -20px}
-.defaultSkin span.mce_insertdate {background-position:-140px -20px}
-.defaultSkin span.mce_inserttime {background-position:-160px -20px}
-.defaultSkin span.mce_absolute {background-position:-180px -20px}
-.defaultSkin span.mce_backward {background-position:-200px -20px}
-.defaultSkin span.mce_forward {background-position:-220px -20px}
-.defaultSkin span.mce_insert_layer {background-position:-240px -20px}
-.defaultSkin span.mce_insertlayer {background-position:-260px -20px}
-.defaultSkin span.mce_movebackward {background-position:-280px -20px}
-.defaultSkin span.mce_moveforward {background-position:-300px -20px}
-.defaultSkin span.mce_media {background-position:-320px -20px}
-.defaultSkin span.mce_nonbreaking {background-position:-340px -20px}
-.defaultSkin span.mce_pastetext {background-position:-360px -20px}
-.defaultSkin span.mce_pasteword {background-position:-380px -20px}
-.defaultSkin span.mce_selectall {background-position:-400px -20px}
-.defaultSkin span.mce_preview {background-position:-420px -20px}
-.defaultSkin span.mce_print {background-position:-440px -20px}
-.defaultSkin span.mce_cancel {background-position:-460px -20px}
-.defaultSkin span.mce_save {background-position:-480px -20px}
-.defaultSkin span.mce_replace {background-position:-500px -20px}
-.defaultSkin span.mce_search {background-position:-520px -20px}
-.defaultSkin span.mce_styleprops {background-position:-560px -20px}
-.defaultSkin span.mce_table {background-position:-580px -20px}
-.defaultSkin span.mce_cell_props {background-position:-600px -20px}
-.defaultSkin span.mce_delete_table {background-position:-620px -20px}
-.defaultSkin span.mce_delete_col {background-position:-640px -20px}
-.defaultSkin span.mce_delete_row {background-position:-660px -20px}
-.defaultSkin span.mce_col_after {background-position:-680px -20px}
-.defaultSkin span.mce_col_before {background-position:-700px -20px}
-.defaultSkin span.mce_row_after {background-position:-720px -20px}
-.defaultSkin span.mce_row_before {background-position:-740px -20px}
-.defaultSkin span.mce_merge_cells {background-position:-760px -20px}
-.defaultSkin span.mce_table_props {background-position:-980px -20px}
-.defaultSkin span.mce_row_props {background-position:-780px -20px}
-.defaultSkin span.mce_split_cells {background-position:-800px -20px}
-.defaultSkin span.mce_template {background-position:-820px -20px}
-.defaultSkin span.mce_visualchars {background-position:-840px -20px}
-.defaultSkin span.mce_abbr {background-position:-860px -20px}
-.defaultSkin span.mce_acronym {background-position:-880px -20px}
-.defaultSkin span.mce_attribs {background-position:-900px -20px}
-.defaultSkin span.mce_cite {background-position:-920px -20px}
-.defaultSkin span.mce_del {background-position:-940px -20px}
-.defaultSkin span.mce_ins {background-position:-960px -20px}
-.defaultSkin span.mce_pagebreak {background-position:0 -40px}
-.defaultSkin span.mce_restoredraft {background-position:-20px -40px}
-.defaultSkin span.mce_spellchecker {background-position:-540px -20px}
-.defaultSkin span.mce_visualblocks {background-position: -40px -40px}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css b/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css
deleted file mode 100644
index ee3d369d02..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/content.css
+++ /dev/null
@@ -1,24 +0,0 @@
-body, td, pre { margin:8px;}
-body.mceForceColors {background:#FFF; color:#000;}
-h1 {font-size: 2em}
-h2 {font-size: 1.5em}
-h3 {font-size: 1.17em}
-h4 {font-size: 1em}
-h5 {font-size: .83em}
-h6 {font-size: .75em}
-.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
-a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
-span.mceItemNbsp {background: #DDD}
-td.mceSelected, th.mceSelected {background-color:#3399ff !important}
-img {border:0;}
-table, img, hr, .mceItemAnchor {cursor:default}
-table td, table th {cursor:text}
-ins {border-bottom:1px solid green; text-decoration: none; color:green}
-del {color:red; text-decoration:line-through}
-cite {border-bottom:1px dashed blue}
-acronym {border-bottom:1px dotted #CCC; cursor:help}
-abbr {border-bottom:1px dashed #CCC; cursor:help}
-
-img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
-font[face=mceinline] {font-family:inherit !important}
-*[contentEditable]:focus {outline:0}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/dialog.css b/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/dialog.css
deleted file mode 100644
index fa3c31a05d..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/dialog.css
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Generic */
-body {
-font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
-background:#F0F0EE;
-color: black;
-padding:0;
-margin:8px 8px 0 8px;
-}
-
-html {background:#F0F0EE; color:#000;}
-td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-textarea {resize:none;outline:none;}
-a:link, a:visited {color:black;background-color:transparent;}
-a:hover {color:#2B6FB6;background-color:transparent;}
-.nowrap {white-space: nowrap}
-
-/* Forms */
-fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
-legend {color:#2B6FB6; font-weight:bold;}
-label.msg {display:none;}
-label.invalid {color:#EE0000; display:inline;background-color:transparent;}
-input.invalid {border:1px solid #EE0000;background-color:transparent;}
-input {background:#FFF; border:1px solid #CCC;color:black;}
-input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-input, select, textarea {border:1px solid #808080;}
-input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
-input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
-.input_noborder {border:0;}
-
-/* Buttons */
-#insert, #cancel, input.button, .updateButton {
-font-weight:bold;
-width:94px; height:23px;
-cursor:pointer;
-padding-bottom:2px;
-float:left;
-}
-
-#cancel {float:right}
-
-/* Browse */
-a.pickcolor, a.browse {text-decoration:none}
-a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
-.mceOldBoxModel a.browse span {width:22px; height:20px;}
-a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
-a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
-a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
-.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
-a.pickcolor:hover span {background-color:#B2BBD0;}
-a.pickcolor:hover span.disabled {}
-
-/* Charmap */
-table.charmap {border:1px solid #AAA; text-align:center}
-td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
-#charmap a {display:block; color:#000; text-decoration:none; border:0}
-#charmap a:hover {background:#CCC;color:#2B6FB6}
-#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
-#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
-
-/* Source */
-.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
-.mceActionPanel {margin-top:5px;}
-
-/* Tabs classes */
-.tabs {width:100%; height:18px; line-height:normal;}
-.tabs ul {margin:0; padding:0; list-style:none;}
-.tabs li {float:left; border: 1px solid black; border-bottom:0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block; cursor:pointer;}
-.tabs li.current {font-weight: bold; margin-right:2px;}
-.tabs span {float:left; display:block; padding:0px 10px 0 0;}
-.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
-.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
-
-/* Panels */
-.panel_wrapper div.panel {display:none;}
-.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
-.panel_wrapper {border:1px solid #919B9C; padding:10px; padding-top:5px; clear:both; background:white;}
-
-/* Columns */
-.column {float:left;}
-.properties {width:100%;}
-.properties .column1 {}
-.properties .column2 {text-align:left;}
-
-/* Titles */
-h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
-h3 {font-size:14px;}
-.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
-
-/* Dialog specific */
-#link .panel_wrapper, #link div.current {height:125px;}
-#image .panel_wrapper, #image div.current {height:200px;}
-#plugintable thead {font-weight:bold; background:#DDD;}
-#plugintable, #about #plugintable td {border:1px solid #919B9C;}
-#plugintable {width:96%; margin-top:10px;}
-#pluginscontainer {height:290px; overflow:auto;}
-#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
-#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
-#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
-#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
-#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
-#colorpicker #light div {overflow:hidden;}
-#colorpicker .panel_wrapper div.current {height:175px;}
-#colorpicker #namedcolors {width:150px;}
-#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
-#colorpicker #colornamecontainer {margin-top:5px;}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/ui.css b/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/ui.css
deleted file mode 100644
index 86829c59c1..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/highcontrast/ui.css
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Reset */
-.highcontrastSkin table, .highcontrastSkin tbody, .highcontrastSkin a, .highcontrastSkin img, .highcontrastSkin tr, .highcontrastSkin div, .highcontrastSkin td, .highcontrastSkin iframe, .highcontrastSkin span, .highcontrastSkin *, .highcontrastSkin .mceText {border:0; margin:0; padding:0; vertical-align:baseline; border-collapse:separate;}
-.highcontrastSkin a:hover, .highcontrastSkin a:link, .highcontrastSkin a:visited, .highcontrastSkin a:active {text-decoration:none; font-weight:normal; cursor:default;}
-.highcontrastSkin table td {vertical-align:middle}
-
-.highcontrastSkin .mceIconOnly {display: block !important;}
-
-/* External */
-.highcontrastSkin .mceExternalToolbar {position:absolute; border:1px solid; border-bottom:0; display:none; background-color: white;}
-.highcontrastSkin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
-.highcontrastSkin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px;}
-
-/* Layout */
-.highcontrastSkin table.mceLayout {border: 1px solid;}
-.highcontrastSkin .mceIframeContainer {border-top:1px solid; border-bottom:1px solid}
-.highcontrastSkin .mceStatusbar a:hover {text-decoration:underline}
-.highcontrastSkin .mceStatusbar {display:block; line-height:1.5em; overflow:visible;}
-.highcontrastSkin .mceStatusbar div {float:left}
-.highcontrastSkin .mceStatusbar a.mceResize {display:block; float:right; width:20px; height:20px; cursor:se-resize; outline:0}
-
-.highcontrastSkin .mceToolbar td { display: inline-block; float: left;}
-.highcontrastSkin .mceToolbar tr { display: block;}
-.highcontrastSkin .mceToolbar table { display: block; }
-
-/* Button */
-
-.highcontrastSkin .mceButton { display:block; margin: 2px; padding: 5px 10px;border: 1px solid; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px; -ms-border-radius: 3px; height: 2em;}
-.highcontrastSkin .mceButton .mceVoiceLabel { height: 100%; vertical-align: center; line-height: 2em}
-.highcontrastSkin .mceButtonDisabled .mceVoiceLabel { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
-.highcontrastSkin .mceButtonActive, .highcontrastSkin .mceButton:focus, .highcontrastSkin .mceButton:active { border: 5px solid; padding: 1px 6px;-webkit-focus-ring-color:none;outline:none;}
-
-/* Separator */
-.highcontrastSkin .mceSeparator {display:block; width:16px; height:26px;}
-
-/* ListBox */
-.highcontrastSkin .mceListBox { display: block; margin:2px;-webkit-focus-ring-color:none;outline:none;}
-.highcontrastSkin .mceListBox .mceText {padding: 5px 6px; line-height: 2em; width: 15ex; overflow: hidden;}
-.highcontrastSkin .mceListBoxDisabled .mceText { opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60);}
-.highcontrastSkin .mceListBox a.mceText { padding: 5px 10px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
-.highcontrastSkin .mceListBox a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-left: 0; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
-.highcontrastSkin .mceListBox:focus a.mceText, .highcontrastSkin .mceListBox:active a.mceText { border-width: 5px; padding: 1px 10px 1px 6px;}
-.highcontrastSkin .mceListBox:focus a.mceOpen, .highcontrastSkin .mceListBox:active a.mceOpen { border-width: 5px; padding: 1px 0px 1px 4px;}
-
-.highcontrastSkin .mceListBoxMenu {overflow-y:auto}
-
-/* SplitButton */
-.highcontrastSkin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-
-.highcontrastSkin .mceSplitButton { border-collapse: collapse; margin: 2px; height: 2em; line-height: 2em;-webkit-focus-ring-color:none;outline:none;}
-.highcontrastSkin .mceSplitButton td { display: table-cell; float: none; margin: 0; padding: 0; height: 2em;}
-.highcontrastSkin .mceSplitButton tr { display: table-row; }
-.highcontrastSkin table.mceSplitButton { display: table; }
-.highcontrastSkin .mceSplitButton a.mceAction { padding: 5px 10px; display: block; height: 2em; line-height: 2em; overflow: hidden; border: 1px solid; border-right: 0; border-radius: 3px 0px 0px 3px; -moz-border-radius: 3px 0px 0px 3px; -webkit-border-radius: 3px 0px 0px 3px; -ms-border-radius: 3px 0px 0px 3px;}
-.highcontrastSkin .mceSplitButton a.mceOpen { padding: 5px 4px; display: block; height: 2em; line-height: 2em; border: 1px solid; border-radius: 0px 3px 3px 0px; -moz-border-radius: 0px 3px 3px 0px; -webkit-border-radius: 0px 3px 3px 0px; -ms-border-radius: 0px 3px 3px 0px;}
-.highcontrastSkin .mceSplitButton .mceVoiceLabel { height: 2em; vertical-align: center; line-height: 2em; }
-.highcontrastSkin .mceSplitButton:focus a.mceAction, .highcontrastSkin .mceSplitButton:active a.mceAction { border-width: 5px; border-right-width: 1px; padding: 1px 10px 1px 6px;-webkit-focus-ring-color:none;outline:none;}
-.highcontrastSkin .mceSplitButton:focus a.mceOpen, .highcontrastSkin .mceSplitButton:active a.mceOpen { border-width: 5px; border-left-width: 1px; padding: 1px 0px 1px 4px;-webkit-focus-ring-color:none;outline:none;}
-
-/* Menu */
-.highcontrastSkin .mceNoIcons span.mceIcon {width:0;}
-.highcontrastSkin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid; direction:ltr}
-.highcontrastSkin .mceMenu table {background:white; color: black}
-.highcontrastSkin .mceNoIcons a .mceText {padding-left:10px}
-.highcontrastSkin .mceMenu a, .highcontrastSkin .mceMenu span, .highcontrastSkin .mceMenu {display:block;background:white; color: black}
-.highcontrastSkin .mceMenu td {height:2em}
-.highcontrastSkin .mceMenu a {position:relative;padding:3px 0 4px 0; display: block;}
-.highcontrastSkin .mceMenu .mceText {position:relative; display:block; cursor:default; margin:0; padding:0 25px 0 25px;}
-.highcontrastSkin .mceMenu pre.mceText {font-family:Monospace}
-.highcontrastSkin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:26px;}
-.highcontrastSkin td.mceMenuItemSeparator {border-top:1px solid; height:1px}
-.highcontrastSkin .mceMenuItemTitle a {border:0; border-bottom:1px solid}
-.highcontrastSkin .mceMenuItemTitle span.mceText {font-weight:bold; padding-left:4px}
-.highcontrastSkin .mceNoIcons .mceMenuItemSelected span.mceText:before {content: "\2713\A0";}
-.highcontrastSkin .mceMenu span.mceMenuLine {display:none}
-.highcontrastSkin .mceMenuItemSub a .mceText:after {content: "\A0\25B8"}
-.highcontrastSkin .mceMenuItem td, .highcontrastSkin .mceMenuItem th {line-height: normal}
-
-/* ColorSplitButton */
-.highcontrastSkin div.mceColorSplitMenu table {background:#FFF; border:1px solid; color: #000}
-.highcontrastSkin .mceColorSplitMenu td {padding:2px}
-.highcontrastSkin .mceColorSplitMenu a {display:block; width:16px; height:16px; overflow:hidden; color:#000; margin: 0; padding: 0;}
-.highcontrastSkin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
-.highcontrastSkin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
-.highcontrastSkin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid; background-color:#B6BDD2}
-.highcontrastSkin a.mceMoreColors:hover {border:1px solid #0A246A; color: #000;}
-.highcontrastSkin .mceColorPreview {display:none;}
-.highcontrastSkin .mce_forecolor span.mceAction, .highcontrastSkin .mce_backcolor span.mceAction {height:17px;overflow:hidden}
-
-/* Progress,Resize */
-.highcontrastSkin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
-.highcontrastSkin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
-
-/* Rtl */
-.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
-.mceRtl .mceMenuItem .mceText {text-align: right}
-
-/* Formats */
-.highcontrastSkin .mce_p span.mceText {}
-.highcontrastSkin .mce_address span.mceText {font-style:italic}
-.highcontrastSkin .mce_pre span.mceText {font-family:monospace}
-.highcontrastSkin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
-.highcontrastSkin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
-.highcontrastSkin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
-.highcontrastSkin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
-.highcontrastSkin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
-.highcontrastSkin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css b/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css
deleted file mode 100644
index 631fa0ec87..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css
+++ /dev/null
@@ -1,48 +0,0 @@
-body, td, pre {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
-body {background:#FFF;}
-body.mceForceColors {background:#FFF; color:#000;}
-h1 {font-size: 2em}
-h2 {font-size: 1.5em}
-h3 {font-size: 1.17em}
-h4 {font-size: 1em}
-h5 {font-size: .83em}
-h6 {font-size: .75em}
-.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
-a.mceItemAnchor {display:inline-block; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat 0 0;}
-span.mceItemNbsp {background: #DDD}
-td.mceSelected, th.mceSelected {background-color:#3399ff !important}
-img {border:0;}
-table, img, hr, .mceItemAnchor {cursor:default}
-table td, table th {cursor:text}
-ins {border-bottom:1px solid green; text-decoration: none; color:green}
-del {color:red; text-decoration:line-through}
-cite {border-bottom:1px dashed blue}
-acronym {border-bottom:1px dotted #CCC; cursor:help}
-abbr {border-bottom:1px dashed #CCC; cursor:help}
-
-/* IE */
-* html body {
-scrollbar-3dlight-color:#F0F0EE;
-scrollbar-arrow-color:#676662;
-scrollbar-base-color:#F0F0EE;
-scrollbar-darkshadow-color:#DDD;
-scrollbar-face-color:#E0E0DD;
-scrollbar-highlight-color:#F0F0EE;
-scrollbar-shadow-color:#F0F0EE;
-scrollbar-track-color:#F5F5F5;
-}
-
-img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
-font[face=mceinline] {font-family:inherit !important}
-*[contentEditable]:focus {outline:0}
-
-.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
-.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
-.mceItemFlash {background-image:url(../../img/flash.gif)}
-.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
-.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
-.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
-.mceItemVideo {background-image:url(../../img/video.gif)}
-.mceItemAudio {background-image:url(../../img/video.gif)}
-.mceItemIframe {background-image:url(../../img/iframe.gif)}
-.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css b/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css
deleted file mode 100644
index 84d2fe9722..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css
+++ /dev/null
@@ -1,118 +0,0 @@
-/* Generic */
-body {
-font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;
-scrollbar-3dlight-color:#F0F0EE;
-scrollbar-arrow-color:#676662;
-scrollbar-base-color:#F0F0EE;
-scrollbar-darkshadow-color:#DDDDDD;
-scrollbar-face-color:#E0E0DD;
-scrollbar-highlight-color:#F0F0EE;
-scrollbar-shadow-color:#F0F0EE;
-scrollbar-track-color:#F5F5F5;
-background:#F0F0EE;
-padding:0;
-margin:8px 8px 0 8px;
-}
-
-html {background:#F0F0EE;}
-td {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-textarea {resize:none;outline:none;}
-a:link, a:visited {color:black;}
-a:hover {color:#2B6FB6;}
-.nowrap {white-space: nowrap}
-
-/* Forms */
-fieldset {margin:0; padding:4px; border:1px solid #919B9C; font-family:Verdana, Arial; font-size:10px;}
-legend {color:#2B6FB6; font-weight:bold;}
-label.msg {display:none;}
-label.invalid {color:#EE0000; display:inline;}
-input.invalid {border:1px solid #EE0000;}
-input {background:#FFF; border:1px solid #CCC;}
-input, select, textarea {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px;}
-input, select, textarea {border:1px solid #808080;}
-input.radio {border:1px none #000000; background:transparent; vertical-align:middle;}
-input.checkbox {border:1px none #000000; background:transparent; vertical-align:middle;}
-.input_noborder {border:0;}
-
-/* Buttons */
-#insert, #cancel, input.button, .updateButton {
-border:0; margin:0; padding:0;
-font-weight:bold;
-width:94px; height:26px;
-background:url(../default/img/buttons.png) 0 -26px;
-cursor:pointer;
-padding-bottom:2px;
-float:left;
-}
-
-#insert {background:url(../default/img/buttons.png) 0 -52px}
-#cancel {background:url(../default/img/buttons.png) 0 0; float:right}
-
-/* Browse */
-a.pickcolor, a.browse {text-decoration:none}
-a.browse span {display:block; width:20px; height:18px; background:url(../../img/icons.gif) -860px 0; border:1px solid #FFF; margin-left:1px;}
-.mceOldBoxModel a.browse span {width:22px; height:20px;}
-a.browse:hover span {border:1px solid #0A246A; background-color:#B2BBD0;}
-a.browse span.disabled {border:1px solid white; opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-a.browse:hover span.disabled {border:1px solid white; background-color:transparent;}
-a.pickcolor span {display:block; width:20px; height:16px; background:url(../../img/icons.gif) -840px 0; margin-left:2px;}
-.mceOldBoxModel a.pickcolor span {width:21px; height:17px;}
-a.pickcolor:hover span {background-color:#B2BBD0;}
-a.pickcolor:hover span.disabled {}
-
-/* Charmap */
-table.charmap {border:1px solid #AAA; text-align:center}
-td.charmap, #charmap a {width:18px; height:18px; color:#000; border:1px solid #AAA; text-align:center; font-size:12px; vertical-align:middle; line-height: 18px;}
-#charmap a {display:block; color:#000; text-decoration:none; border:0}
-#charmap a:hover {background:#CCC;color:#2B6FB6}
-#charmap #codeN {font-size:10px; font-family:Arial,Helvetica,sans-serif; text-align:center}
-#charmap #codeV {font-size:40px; height:80px; border:1px solid #AAA; text-align:center}
-
-/* Source */
-.wordWrapCode {vertical-align:middle; border:1px none #000000; background:transparent;}
-.mceActionPanel {margin-top:5px;}
-
-/* Tabs classes */
-.tabs {width:100%; height:18px; line-height:normal; background:url(../default/img/tabs.gif) repeat-x 0 -72px;}
-.tabs ul {margin:0; padding:0; list-style:none;}
-.tabs li {float:left; background:url(../default/img/tabs.gif) no-repeat 0 0; margin:0 2px 0 0; padding:0 0 0 10px; line-height:17px; height:18px; display:block;}
-.tabs li.current {background:url(../default/img/tabs.gif) no-repeat 0 -18px; margin-right:2px;}
-.tabs span {float:left; display:block; background:url(../default/img/tabs.gif) no-repeat right -36px; padding:0px 10px 0 0;}
-.tabs .current span {background:url(../default/img/tabs.gif) no-repeat right -54px;}
-.tabs a {text-decoration:none; font-family:Verdana, Arial; font-size:10px;}
-.tabs a:link, .tabs a:visited, .tabs a:hover {color:black;}
-
-/* Panels */
-.panel_wrapper div.panel {display:none;}
-.panel_wrapper div.current {display:block; width:100%; height:300px; overflow:visible;}
-.panel_wrapper {border:1px solid #919B9C; border-top:0px; padding:10px; padding-top:5px; clear:both; background:white;}
-
-/* Columns */
-.column {float:left;}
-.properties {width:100%;}
-.properties .column1 {}
-.properties .column2 {text-align:left;}
-
-/* Titles */
-h1, h2, h3, h4 {color:#2B6FB6; margin:0; padding:0; padding-top:5px;}
-h3 {font-size:14px;}
-.title {font-size:12px; font-weight:bold; color:#2B6FB6;}
-
-/* Dialog specific */
-#link .panel_wrapper, #link div.current {height:125px;}
-#image .panel_wrapper, #image div.current {height:200px;}
-#plugintable thead {font-weight:bold; background:#DDD;}
-#plugintable, #about #plugintable td {border:1px solid #919B9C;}
-#plugintable {width:96%; margin-top:10px;}
-#pluginscontainer {height:290px; overflow:auto;}
-#colorpicker #preview {display:inline-block; padding-left:40px; height:14px; border:1px solid black; margin-left:5px; margin-right: 5px}
-#colorpicker #previewblock {position: relative; top: -3px; padding-left:5px; padding-top: 0px; display:inline}
-#colorpicker #preview_wrapper { text-align:center; padding-top:4px; white-space: nowrap}
-#colorpicker #colors {float:left; border:1px solid gray; cursor:crosshair;}
-#colorpicker #light {border:1px solid gray; margin-left:5px; float:left;width:15px; height:150px; cursor:crosshair;}
-#colorpicker #light div {overflow:hidden;}
-#colorpicker .panel_wrapper div.current {height:175px;}
-#colorpicker #namedcolors {width:150px;}
-#colorpicker #namedcolors a {display:block; float:left; width:10px; height:10px; margin:1px 1px 0 0; overflow:hidden;}
-#colorpicker #colornamecontainer {margin-top:5px;}
-#colorpicker #picker_panel fieldset {margin:auto;width:325px;}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png b/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png
deleted file mode 100644
index 13a5cb0309..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png b/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png
deleted file mode 100644
index 7fc57f2bc2..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png b/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png
deleted file mode 100644
index c0dcc6cac2..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css b/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css
deleted file mode 100644
index abd5d8deba..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css
+++ /dev/null
@@ -1,222 +0,0 @@
-/* Reset */
-.o2k7Skin table, .o2k7Skin tbody, .o2k7Skin a, .o2k7Skin img, .o2k7Skin tr, .o2k7Skin div, .o2k7Skin td, .o2k7Skin iframe, .o2k7Skin span, .o2k7Skin *, .o2k7Skin .mceText {border:0; margin:0; padding:0; background:transparent; white-space:nowrap; text-decoration:none; font-weight:normal; cursor:default; color:#000; vertical-align:baseline; width:auto; border-collapse:separate; text-align:left}
-.o2k7Skin a:hover, .o2k7Skin a:link, .o2k7Skin a:visited, .o2k7Skin a:active {text-decoration:none; font-weight:normal; cursor:default; color:#000}
-.o2k7Skin table td {vertical-align:middle}
-
-/* Containers */
-.o2k7Skin table {background:transparent}
-.o2k7Skin iframe {display:block;}
-.o2k7Skin .mceToolbar {height:26px}
-
-/* External */
-.o2k7Skin .mceExternalToolbar {position:absolute; border:1px solid #ABC6DD; border-bottom:0; display:none}
-.o2k7Skin .mceExternalToolbar td.mceToolbar {padding-right:13px;}
-.o2k7Skin .mceExternalClose {position:absolute; top:3px; right:3px; width:7px; height:7px; background:url(../../img/icons.gif) -820px 0}
-
-/* Layout */
-.o2k7Skin table.mceLayout {border:0; border-left:1px solid #ABC6DD; border-right:1px solid #ABC6DD}
-.o2k7Skin table.mceLayout tr.mceFirst td {border-top:1px solid #ABC6DD}
-.o2k7Skin table.mceLayout tr.mceLast td {border-bottom:1px solid #ABC6DD}
-.o2k7Skin table.mceToolbar, .o2k7Skin tr.mceFirst .mceToolbar tr td, .o2k7Skin tr.mceLast .mceToolbar tr td {border:0; margin:0; padding:0}
-.o2k7Skin .mceIframeContainer {border-top:1px solid #ABC6DD; border-bottom:1px solid #ABC6DD}
-.o2k7Skin td.mceToolbar{background:#E5EFFD}
-.o2k7Skin .mceStatusbar {background:#E5EFFD; display:block; font-family:'MS Sans Serif',sans-serif,Verdana,Arial; font-size:9pt; line-height:16px; overflow:visible; color:#000; height:20px}
-.o2k7Skin .mceStatusbar div {float:left; padding:2px}
-.o2k7Skin .mceStatusbar a.mceResize {display:block; float:right; background:url(../../img/icons.gif) -800px 0; width:20px; height:20px; cursor:se-resize; outline:0}
-.o2k7Skin .mceStatusbar a:hover {text-decoration:underline}
-.o2k7Skin table.mceToolbar {margin-left:3px}
-.o2k7Skin .mceToolbar .mceToolbarStart span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px; margin-left:3px;}
-.o2k7Skin .mceToolbar td.mceFirst span {margin:0}
-.o2k7Skin .mceToolbar .mceToolbarEnd span {display:block; background:url(img/button_bg.png) -22px 0; width:1px; height:22px}
-.o2k7Skin .mceToolbar .mceToolbarEndListBox span, .o2k7Skin .mceToolbar .mceToolbarStartListBox span {display:none}
-.o2k7Skin span.mceIcon, .o2k7Skin img.mceIcon {display:block; width:20px; height:20px}
-.o2k7Skin .mceIcon {background:url(../../img/icons.gif) no-repeat 20px 20px}
-.o2k7Skin td.mceCenter {text-align:center;}
-.o2k7Skin td.mceCenter table {margin:0 auto; text-align:left;}
-.o2k7Skin td.mceRight table {margin:0 0 0 auto;}
-
-/* Button */
-.o2k7Skin .mceButton {display:block; background:url(img/button_bg.png); width:22px; height:22px}
-.o2k7Skin a.mceButton span, .o2k7Skin a.mceButton img {margin-left:1px}
-.o2k7Skin .mceOldBoxModel a.mceButton span, .o2k7Skin .mceOldBoxModel a.mceButton img {margin:0 0 0 1px}
-.o2k7Skin a.mceButtonEnabled:hover {background-color:#B2BBD0; background-position:0 -22px}
-.o2k7Skin a.mceButtonActive, .o2k7Skin a.mceButtonSelected {background-position:0 -44px}
-.o2k7Skin .mceButtonDisabled .mceIcon {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-.o2k7Skin .mceButtonLabeled {width:auto}
-.o2k7Skin .mceButtonLabeled span.mceIcon {float:left}
-.o2k7Skin span.mceButtonLabel {display:block; font-size:10px; padding:4px 6px 0 22px; font-family:Tahoma,Verdana,Arial,Helvetica}
-.o2k7Skin .mceButtonDisabled .mceButtonLabel {color:#888}
-
-/* Separator */
-.o2k7Skin .mceSeparator {display:block; background:url(img/button_bg.png) -22px 0; width:5px; height:22px}
-
-/* ListBox */
-.o2k7Skin .mceListBox {padding-left: 3px}
-.o2k7Skin .mceListBox, .o2k7Skin .mceListBox a {display:block}
-.o2k7Skin .mceListBox .mceText {padding-left:4px; text-align:left; width:70px; border:1px solid #b3c7e1; border-right:0; background:#eaf2fb; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; height:20px; line-height:20px; overflow:hidden}
-.o2k7Skin .mceListBox .mceOpen {width:14px; height:22px; background:url(img/button_bg.png) -66px 0}
-.o2k7Skin table.mceListBoxEnabled:hover .mceText, .o2k7Skin .mceListBoxHover .mceText, .o2k7Skin .mceListBoxSelected .mceText {background:#FFF}
-.o2k7Skin table.mceListBoxEnabled:hover .mceOpen, .o2k7Skin .mceListBoxHover .mceOpen, .o2k7Skin .mceListBoxSelected .mceOpen {background-position:-66px -22px}
-.o2k7Skin .mceListBoxDisabled .mceText {color:gray}
-.o2k7Skin .mceListBoxMenu {overflow:auto; overflow-x:hidden; margin-left:3px}
-.o2k7Skin .mceOldBoxModel .mceListBox .mceText {height:22px}
-.o2k7Skin select.mceListBox {font-family:Tahoma,Verdana,Arial,Helvetica; font-size:12px; border:1px solid #b3c7e1; background:#FFF;}
-
-/* SplitButton */
-.o2k7Skin .mceSplitButton, .o2k7Skin .mceSplitButton a, .o2k7Skin .mceSplitButton span {display:block; height:22px; direction:ltr}
-.o2k7Skin .mceSplitButton {background:url(img/button_bg.png)}
-.o2k7Skin .mceSplitButton a.mceAction {width:22px}
-.o2k7Skin .mceSplitButton span.mceAction {width:22px; background-image:url(../../img/icons.gif)}
-.o2k7Skin .mceSplitButton a.mceOpen {width:10px; background:url(img/button_bg.png) -44px 0}
-.o2k7Skin .mceSplitButton span.mceOpen {display:none}
-.o2k7Skin table.mceSplitButtonEnabled:hover a.mceAction, .o2k7Skin .mceSplitButtonHover a.mceAction, .o2k7Skin .mceSplitButtonSelected {background:url(img/button_bg.png) 0 -22px}
-.o2k7Skin table.mceSplitButtonEnabled:hover a.mceOpen, .o2k7Skin .mceSplitButtonHover a.mceOpen, .o2k7Skin .mceSplitButtonSelected a.mceOpen {background-position:-44px -44px}
-.o2k7Skin .mceSplitButtonDisabled .mceAction {opacity:0.3; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=30)}
-.o2k7Skin .mceSplitButtonActive {background-position:0 -44px}
-
-/* ColorSplitButton */
-.o2k7Skin div.mceColorSplitMenu table {background:#FFF; border:1px solid gray}
-.o2k7Skin .mceColorSplitMenu td {padding:2px}
-.o2k7Skin .mceColorSplitMenu a {display:block; width:9px; height:9px; overflow:hidden; border:1px solid #808080}
-.o2k7Skin .mceColorSplitMenu td.mceMoreColors {padding:1px 3px 1px 1px}
-.o2k7Skin .mceColorSplitMenu a.mceMoreColors {width:100%; height:auto; text-align:center; font-family:Tahoma,Verdana,Arial,Helvetica; font-size:11px; line-height:20px; border:1px solid #FFF}
-.o2k7Skin .mceColorSplitMenu a.mceMoreColors:hover {border:1px solid #0A246A; background-color:#B6BDD2}
-.o2k7Skin a.mceMoreColors:hover {border:1px solid #0A246A}
-.o2k7Skin .mceColorPreview {margin-left:2px; width:16px; height:4px; overflow:hidden; background:#9a9b9a;overflow:hidden}
-.o2k7Skin .mce_forecolor span.mceAction, .o2k7Skin .mce_backcolor span.mceAction {height:15px;overflow:hidden}
-
-/* Menu */
-.o2k7Skin .mceMenu {position:absolute; left:0; top:0; z-index:1000; border:1px solid #ABC6DD; direction:ltr}
-.o2k7Skin .mceNoIcons span.mceIcon {width:0;}
-.o2k7Skin .mceNoIcons a .mceText {padding-left:10px}
-.o2k7Skin .mceMenu table {background:#FFF}
-.o2k7Skin .mceMenu a, .o2k7Skin .mceMenu span, .o2k7Skin .mceMenu {display:block}
-.o2k7Skin .mceMenu td {height:20px}
-.o2k7Skin .mceMenu a {position:relative;padding:3px 0 4px 0}
-.o2k7Skin .mceMenu .mceText {position:relative; display:block; font-family:Tahoma,Verdana,Arial,Helvetica; color:#000; cursor:default; margin:0; padding:0 25px 0 25px; display:block}
-.o2k7Skin .mceMenu span.mceText, .o2k7Skin .mceMenu .mcePreview {font-size:11px}
-.o2k7Skin .mceMenu pre.mceText {font-family:Monospace}
-.o2k7Skin .mceMenu .mceIcon {position:absolute; top:0; left:0; width:22px;}
-.o2k7Skin .mceMenu .mceMenuItemEnabled a:hover, .o2k7Skin .mceMenu .mceMenuItemActive {background-color:#dbecf3}
-.o2k7Skin td.mceMenuItemSeparator {background:#DDD; height:1px}
-.o2k7Skin .mceMenuItemTitle a {border:0; background:#E5EFFD; border-bottom:1px solid #ABC6DD}
-.o2k7Skin .mceMenuItemTitle span.mceText {color:#000; font-weight:bold; padding-left:4px}
-.o2k7Skin .mceMenuItemDisabled .mceText {color:#888}
-.o2k7Skin .mceMenuItemSelected .mceIcon {background:url(../default/img/menu_check.gif)}
-.o2k7Skin .mceNoIcons .mceMenuItemSelected a {background:url(../default/img/menu_arrow.gif) no-repeat -6px center}
-.o2k7Skin .mceMenu span.mceMenuLine {display:none}
-.o2k7Skin .mceMenuItemSub a {background:url(../default/img/menu_arrow.gif) no-repeat top right;}
-.o2k7Skin .mceMenuItem td, .o2k7Skin .mceMenuItem th {line-height: normal}
-
-/* Progress,Resize */
-.o2k7Skin .mceBlocker {position:absolute; left:0; top:0; z-index:1000; opacity:0.5; -ms-filter:'alpha(opacity=30)'; filter:alpha(opacity=50); background:#FFF}
-.o2k7Skin .mceProgress {position:absolute; left:0; top:0; z-index:1001; background:url(../default/img/progress.gif) no-repeat; width:32px; height:32px; margin:-16px 0 0 -16px}
-
-/* Rtl */
-.mceRtl .mceListBox .mceText {text-align: right; padding: 0 4px 0 0}
-.mceRtl .mceMenuItem .mceText {text-align: right}
-
-/* Formats */
-.o2k7Skin .mce_formatPreview a {font-size:10px}
-.o2k7Skin .mce_p span.mceText {}
-.o2k7Skin .mce_address span.mceText {font-style:italic}
-.o2k7Skin .mce_pre span.mceText {font-family:monospace}
-.o2k7Skin .mce_h1 span.mceText {font-weight:bolder; font-size: 2em}
-.o2k7Skin .mce_h2 span.mceText {font-weight:bolder; font-size: 1.5em}
-.o2k7Skin .mce_h3 span.mceText {font-weight:bolder; font-size: 1.17em}
-.o2k7Skin .mce_h4 span.mceText {font-weight:bolder; font-size: 1em}
-.o2k7Skin .mce_h5 span.mceText {font-weight:bolder; font-size: .83em}
-.o2k7Skin .mce_h6 span.mceText {font-weight:bolder; font-size: .75em}
-
-/* Theme */
-.o2k7Skin span.mce_bold {background-position:0 0}
-.o2k7Skin span.mce_italic {background-position:-60px 0}
-.o2k7Skin span.mce_underline {background-position:-140px 0}
-.o2k7Skin span.mce_strikethrough {background-position:-120px 0}
-.o2k7Skin span.mce_undo {background-position:-160px 0}
-.o2k7Skin span.mce_redo {background-position:-100px 0}
-.o2k7Skin span.mce_cleanup {background-position:-40px 0}
-.o2k7Skin span.mce_bullist {background-position:-20px 0}
-.o2k7Skin span.mce_numlist {background-position:-80px 0}
-.o2k7Skin span.mce_justifyleft {background-position:-460px 0}
-.o2k7Skin span.mce_justifyright {background-position:-480px 0}
-.o2k7Skin span.mce_justifycenter {background-position:-420px 0}
-.o2k7Skin span.mce_justifyfull {background-position:-440px 0}
-.o2k7Skin span.mce_anchor {background-position:-200px 0}
-.o2k7Skin span.mce_indent {background-position:-400px 0}
-.o2k7Skin span.mce_outdent {background-position:-540px 0}
-.o2k7Skin span.mce_link {background-position:-500px 0}
-.o2k7Skin span.mce_unlink {background-position:-640px 0}
-.o2k7Skin span.mce_sub {background-position:-600px 0}
-.o2k7Skin span.mce_sup {background-position:-620px 0}
-.o2k7Skin span.mce_removeformat {background-position:-580px 0}
-.o2k7Skin span.mce_newdocument {background-position:-520px 0}
-.o2k7Skin span.mce_image {background-position:-380px 0}
-.o2k7Skin span.mce_help {background-position:-340px 0}
-.o2k7Skin span.mce_code {background-position:-260px 0}
-.o2k7Skin span.mce_hr {background-position:-360px 0}
-.o2k7Skin span.mce_visualaid {background-position:-660px 0}
-.o2k7Skin span.mce_charmap {background-position:-240px 0}
-.o2k7Skin span.mce_paste {background-position:-560px 0}
-.o2k7Skin span.mce_copy {background-position:-700px 0}
-.o2k7Skin span.mce_cut {background-position:-680px 0}
-.o2k7Skin span.mce_blockquote {background-position:-220px 0}
-.o2k7Skin .mce_forecolor span.mceAction {background-position:-720px 0}
-.o2k7Skin .mce_backcolor span.mceAction {background-position:-760px 0}
-.o2k7Skin span.mce_forecolorpicker {background-position:-720px 0}
-.o2k7Skin span.mce_backcolorpicker {background-position:-760px 0}
-
-/* Plugins */
-.o2k7Skin span.mce_advhr {background-position:-0px -20px}
-.o2k7Skin span.mce_ltr {background-position:-20px -20px}
-.o2k7Skin span.mce_rtl {background-position:-40px -20px}
-.o2k7Skin span.mce_emotions {background-position:-60px -20px}
-.o2k7Skin span.mce_fullpage {background-position:-80px -20px}
-.o2k7Skin span.mce_fullscreen {background-position:-100px -20px}
-.o2k7Skin span.mce_iespell {background-position:-120px -20px}
-.o2k7Skin span.mce_insertdate {background-position:-140px -20px}
-.o2k7Skin span.mce_inserttime {background-position:-160px -20px}
-.o2k7Skin span.mce_absolute {background-position:-180px -20px}
-.o2k7Skin span.mce_backward {background-position:-200px -20px}
-.o2k7Skin span.mce_forward {background-position:-220px -20px}
-.o2k7Skin span.mce_insert_layer {background-position:-240px -20px}
-.o2k7Skin span.mce_insertlayer {background-position:-260px -20px}
-.o2k7Skin span.mce_movebackward {background-position:-280px -20px}
-.o2k7Skin span.mce_moveforward {background-position:-300px -20px}
-.o2k7Skin span.mce_media {background-position:-320px -20px}
-.o2k7Skin span.mce_nonbreaking {background-position:-340px -20px}
-.o2k7Skin span.mce_pastetext {background-position:-360px -20px}
-.o2k7Skin span.mce_pasteword {background-position:-380px -20px}
-.o2k7Skin span.mce_selectall {background-position:-400px -20px}
-.o2k7Skin span.mce_preview {background-position:-420px -20px}
-.o2k7Skin span.mce_print {background-position:-440px -20px}
-.o2k7Skin span.mce_cancel {background-position:-460px -20px}
-.o2k7Skin span.mce_save {background-position:-480px -20px}
-.o2k7Skin span.mce_replace {background-position:-500px -20px}
-.o2k7Skin span.mce_search {background-position:-520px -20px}
-.o2k7Skin span.mce_styleprops {background-position:-560px -20px}
-.o2k7Skin span.mce_table {background-position:-580px -20px}
-.o2k7Skin span.mce_cell_props {background-position:-600px -20px}
-.o2k7Skin span.mce_delete_table {background-position:-620px -20px}
-.o2k7Skin span.mce_delete_col {background-position:-640px -20px}
-.o2k7Skin span.mce_delete_row {background-position:-660px -20px}
-.o2k7Skin span.mce_col_after {background-position:-680px -20px}
-.o2k7Skin span.mce_col_before {background-position:-700px -20px}
-.o2k7Skin span.mce_row_after {background-position:-720px -20px}
-.o2k7Skin span.mce_row_before {background-position:-740px -20px}
-.o2k7Skin span.mce_merge_cells {background-position:-760px -20px}
-.o2k7Skin span.mce_table_props {background-position:-980px -20px}
-.o2k7Skin span.mce_row_props {background-position:-780px -20px}
-.o2k7Skin span.mce_split_cells {background-position:-800px -20px}
-.o2k7Skin span.mce_template {background-position:-820px -20px}
-.o2k7Skin span.mce_visualchars {background-position:-840px -20px}
-.o2k7Skin span.mce_abbr {background-position:-860px -20px}
-.o2k7Skin span.mce_acronym {background-position:-880px -20px}
-.o2k7Skin span.mce_attribs {background-position:-900px -20px}
-.o2k7Skin span.mce_cite {background-position:-920px -20px}
-.o2k7Skin span.mce_del {background-position:-940px -20px}
-.o2k7Skin span.mce_ins {background-position:-960px -20px}
-.o2k7Skin span.mce_pagebreak {background-position:0 -40px}
-.o2k7Skin span.mce_restoredraft {background-position:-20px -40px}
-.o2k7Skin span.mce_spellchecker {background-position:-540px -20px}
-.o2k7Skin span.mce_visualblocks {background-position: -40px -40px}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css b/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css
deleted file mode 100644
index 85812cde3f..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_black.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Black */
-.o2k7SkinBlack .mceToolbar .mceToolbarStart span, .o2k7SkinBlack .mceToolbar .mceToolbarEnd span, .o2k7SkinBlack .mceButton, .o2k7SkinBlack .mceSplitButton, .o2k7SkinBlack .mceSeparator, .o2k7SkinBlack .mceSplitButton a.mceOpen, .o2k7SkinBlack .mceListBox a.mceOpen {background-image:url(img/button_bg_black.png)}
-.o2k7SkinBlack td.mceToolbar, .o2k7SkinBlack td.mceStatusbar, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack .mceMenuItemTitle span.mceText, .o2k7SkinBlack .mceStatusbar div, .o2k7SkinBlack .mceStatusbar span, .o2k7SkinBlack .mceStatusbar a {background:#535353; color:#FFF}
-.o2k7SkinBlack table.mceListBoxEnabled .mceText, o2k7SkinBlack .mceListBox .mceText {background:#FFF; border:1px solid #CBCFD4; border-bottom-color:#989FA9; border-right:0}
-.o2k7SkinBlack table.mceListBoxEnabled:hover .mceText, .o2k7SkinBlack .mceListBoxHover .mceText, .o2k7SkinBlack .mceListBoxSelected .mceText {background:#FFF; border:1px solid #FFBD69; border-right:0}
-.o2k7SkinBlack .mceExternalToolbar, .o2k7SkinBlack .mceListBox .mceText, .o2k7SkinBlack div.mceMenu, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceFirst td, .o2k7SkinBlack table.mceLayout, .o2k7SkinBlack .mceMenuItemTitle a, .o2k7SkinBlack table.mceLayout tr.mceLast td, .o2k7SkinBlack .mceIframeContainer {border-color: #535353;}
-.o2k7SkinBlack table.mceSplitButtonEnabled:hover a.mceAction, .o2k7SkinBlack .mceSplitButtonHover a.mceAction, .o2k7SkinBlack .mceSplitButtonSelected {background-image:url(img/button_bg_black.png)}
-.o2k7SkinBlack .mceMenu .mceMenuItemEnabled a:hover, .o2k7SkinBlack .mceMenu .mceMenuItemActive {background-color:#FFE7A1}
\ No newline at end of file
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css b/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css
deleted file mode 100644
index d64c361693..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui_silver.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Silver */
-.o2k7SkinSilver .mceToolbar .mceToolbarStart span, .o2k7SkinSilver .mceButton, .o2k7SkinSilver .mceSplitButton, .o2k7SkinSilver .mceSeparator, .o2k7SkinSilver .mceSplitButton a.mceOpen, .o2k7SkinSilver .mceListBox a.mceOpen {background-image:url(img/button_bg_silver.png)}
-.o2k7SkinSilver td.mceToolbar, .o2k7SkinSilver td.mceStatusbar, .o2k7SkinSilver .mceMenuItemTitle a {background:#eee}
-.o2k7SkinSilver .mceListBox .mceText {background:#FFF}
-.o2k7SkinSilver .mceExternalToolbar, .o2k7SkinSilver .mceListBox .mceText, .o2k7SkinSilver div.mceMenu, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceFirst td, .o2k7SkinSilver table.mceLayout, .o2k7SkinSilver .mceMenuItemTitle a, .o2k7SkinSilver table.mceLayout tr.mceLast td, .o2k7SkinSilver .mceIframeContainer {border-color: #bbb}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css b/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
deleted file mode 100644
index 26a847af60..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
+++ /dev/null
@@ -1,160 +0,0 @@
-body.mceForceColors {background:#FFF; color:#000;}
-body.mceBrowserDefaults {background:transparent; color:inherit; font-size:inherit; font-family:inherit;}
-td {color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; margin:8px;}
-h1 {font-size: 2em}
-h2 {font-size: 1.5em}
-h3 {font-size: 1.17em}
-h4 {font-size: 1em}
-h5 {font-size: .83em}
-h6 {font-size: .75em}
-.mceItemTable, .mceItemTable td, .mceItemTable th, .mceItemTable caption, .mceItemVisualAid {border: 1px dashed #BBB;}
-a.mceItemAnchor {display:inline-block; -webkit-user-select:all; -webkit-user-modify:read-only; -moz-user-select:all; -moz-user-modify:read-only; width:11px !important; height:11px !important; background:url(../default/img/items.gif) no-repeat center center}
-span.mceItemNbsp {background: #DDD}
-td.mceSelected, th.mceSelected {background-color:#3399ff !important}
-img {border:0;}
-table, img, hr, .mceItemAnchor {cursor:default}
-table td, table th {cursor:text}
-ins {border-bottom:1px solid green; text-decoration: none; color:green}
-del {color:red; text-decoration:line-through}
-cite {border-bottom:1px dashed blue}
-acronym {border-bottom:1px dotted #CCC; cursor:help}
-abbr {border-bottom:1px dashed #CCC; cursor:help}
-
-img:-moz-broken {-moz-force-broken-image-icon:1; width:24px; height:24px}
-font[face=mceinline] {font-family:inherit !important}
-*[contentEditable]:focus {outline:0}
-
-.mceItemMedia {border:1px dotted #cc0000; background-position:center; background-repeat:no-repeat; background-color:#ffffcc}
-.mceItemShockWave {background-image:url(../../img/shockwave.gif)}
-.mceItemFlash {background-image:url(../../img/flash.gif)}
-.mceItemQuickTime {background-image:url(../../img/quicktime.gif)}
-.mceItemWindowsMedia {background-image:url(../../img/windowsmedia.gif)}
-.mceItemRealMedia {background-image:url(../../img/realmedia.gif)}
-.mceItemVideo {background-image:url(../../img/video.gif)}
-.mceItemAudio {background-image:url(../../img/video.gif)}
-.mceItemIframe {background-image:url(../../img/iframe.gif)}
-.mcePageBreak {display:block;border:0;width:100%;height:12px;border-top:1px dotted #ccc;margin-top:15px;background:#fff url(../../img/pagebreak.gif) no-repeat center top;}
-
-/* WordPress styles */
-body {
- font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
- font-size: 14px;
- line-height: 1.5em;
- color: #333;
- background-color: #fff;
- margin: 0;
- padding: 10px;
-}
-
-p {
- margin-bottom: 1.3em;
-}
-
-.aligncenter,
-dl.aligncenter {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-.alignleft {
- float: left;
-}
-
-.alignright {
- float: right;
-}
-
-.wp-caption {
- border: 1px solid #ddd;
- text-align: center;
- background-color: #f3f3f3;
- padding-top: 4px;
- margin: 10px 0;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-.mceIEcenter {
- text-align: center;
-}
-
-.wp-caption img {
- margin: 0;
- padding: 0;
- border: 0 none;
- -webkit-user-drag: none;
-}
-
-.wp-caption-dd {
- font-size: 11px;
- line-height: 1.5;
- padding: 0 4px 5px;
- margin: 0;
-}
-
-pre {
- font: 12px/18px Consolas, Monaco, monospace;
-}
-
-td {
- color: #000;
- font-size: 11px;
- margin: 8px;
-}
-
-/* Styles for the WordPress plugins */
-img.mce-wp-nextpage,
-img.mce-wp-more {
- border: 0;
- border-top: 1px dotted #cccccc;
- display: block;
- height: 12px;
- width: 100%;
- margin: 1.2em auto 0;
-}
-
-img.mce-wp-more {
- background: transparent url("img/mce-more.png") no-repeat right top;
- background-size: 52px 11px;
-}
-
-img.mce-wp-nextpage {
- background: transparent url("img/mce-nextpage.png") no-repeat right top;
- background-size: 76px 11px;
-}
-
-
-img.wp-gallery {
- border: 1px dashed #888;
- background: #f2f8ff url("img/gallery.png") no-repeat scroll center center;
- background-size: 40px 40px;
- width: 100%;
- height: 250px;
-}
-
-img.wp-oembed {
- border: 1px dashed #888;
- background: #f7f5f2 url("img/embedded.png") no-repeat scroll center center;
- width: 300px;
- height: 250px;
-}
-
-
-@media print,
- (-o-min-device-pixel-ratio: 5/4),
- (-webkit-min-device-pixel-ratio: 1.25),
- (min-resolution: 120dpi) {
-
- img.mce-wp-more {
- background-image: url("img/mce-more-2x.png");
- }
-
- img.mce-wp-nextpage {
- background-image: url("img/mce-nextpage-2x.png");
- }
-
- img.wp-gallery {
- background-image: url("img/gallery-2x.png");
- }
-}
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-more-2x.png b/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-more-2x.png
deleted file mode 100644
index 9a7c95b277..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-more-2x.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-more.png b/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-more.png
deleted file mode 100644
index a25a93d7b5..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-more.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-nextpage-2x.png b/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-nextpage-2x.png
deleted file mode 100644
index d957d05245..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-nextpage-2x.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-nextpage.png b/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-nextpage.png
deleted file mode 100644
index 09e60ee8c8..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/mce-nextpage.png and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif b/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif
deleted file mode 100644
index 06812cb410..0000000000
Binary files a/src/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/img/tabs.gif and /dev/null differ
diff --git a/src/wp-includes/js/tinymce/themes/advanced/source_editor.htm b/src/wp-includes/js/tinymce/themes/advanced/source_editor.htm
deleted file mode 100644
index 5548c693e8..0000000000
--- a/src/wp-includes/js/tinymce/themes/advanced/source_editor.htm
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
- {#advanced_dlg.code_title}
-
-
-
-
-
-
-
diff --git a/src/wp-includes/js/tinymce/themes/modern/theme.js b/src/wp-includes/js/tinymce/themes/modern/theme.js
new file mode 100644
index 0000000000..9e96447fca
--- /dev/null
+++ b/src/wp-includes/js/tinymce/themes/modern/theme.js
@@ -0,0 +1,577 @@
+/**
+ * theme.js
+ *
+ * Copyright, Moxiecode Systems AB
+ * Released under LGPL License.
+ *
+ * License: http://www.tinymce.com/license
+ * Contributing: http://www.tinymce.com/contributing
+ */
+
+/*global tinymce:true */
+
+tinymce.ThemeManager.add('modern', function(editor) {
+ var self = this, settings = editor.settings, Factory = tinymce.ui.Factory, each = tinymce.each, DOM = tinymce.DOM;
+
+ // Default menus
+ var defaultMenus = {
+ file: {title: 'File', items: 'newdocument'},
+ edit: {title: 'Edit', items: 'undo redo | cut copy paste pastetext | selectall'},
+ insert: {title: 'Insert', items: '|'},
+ view: {title: 'View', items: 'visualaid |'},
+ format: {title: 'Format', items: 'bold italic underline strikethrough superscript subscript | formats | removeformat'},
+ table: {title: 'Table'},
+ tools: {title: 'Tools'}
+ };
+
+ var defaultToolbar = "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | " +
+ "bullist numlist outdent indent | link image";
+
+ /**
+ * Creates the toolbars from config and returns a toolbar array.
+ *
+ * @return {Array} Array with toolbars.
+ */
+ function createToolbars() {
+ var toolbars = [];
+
+ function addToolbar(items) {
+ var toolbarItems = [], buttonGroup;
+
+ if (!items) {
+ return;
+ }
+
+ each(items.split(/[ ,]/), function(item) {
+ var itemName;
+
+ function bindSelectorChanged() {
+ var selection = editor.selection;
+
+ if (itemName == "bullist") {
+ selection.selectorChanged('ul > li', function(state, args) {
+ var nodeName, i = args.parents.length;
+
+ while (i--) {
+ nodeName = args.parents[i].nodeName;
+ if (nodeName == "OL" || nodeName == "UL") {
+ break;
+ }
+ }
+
+ item.active(state && nodeName == "UL");
+ });
+ }
+
+ if (itemName == "numlist") {
+ selection.selectorChanged('ol > li', function(state, args) {
+ var nodeName, i = args.parents.length;
+
+ while (i--) {
+ nodeName = args.parents[i].nodeName;
+ if (nodeName == "OL" || nodeName == "UL") {
+ break;
+ }
+ }
+
+ item.active(state && nodeName == "OL");
+ });
+ }
+
+ if (item.settings.stateSelector) {
+ selection.selectorChanged(item.settings.stateSelector, function(state) {
+ item.active(state);
+ }, true);
+ }
+
+ if (item.settings.disabledStateSelector) {
+ selection.selectorChanged(item.settings.disabledStateSelector, function(state) {
+ item.disabled(state);
+ });
+ }
+ }
+
+ if (item == "|") {
+ buttonGroup = null;
+ } else {
+ if (Factory.has(item)) {
+ item = {type: item};
+
+ if (settings.toolbar_items_size) {
+ item.size = settings.toolbar_items_size;
+ }
+
+ toolbarItems.push(item);
+ buttonGroup = null;
+ } else {
+ if (!buttonGroup) {
+ buttonGroup = {type: 'buttongroup', items: []};
+ toolbarItems.push(buttonGroup);
+ }
+
+ if (editor.buttons[item]) {
+ // TODO: Move control creation to some UI class
+ itemName = item;
+ item = editor.buttons[itemName];
+
+ if (typeof(item) == "function") {
+ item = item();
+ }
+
+ item.type = item.type || 'button';
+
+ if (settings.toolbar_items_size) {
+ item.size = settings.toolbar_items_size;
+ }
+
+ item = Factory.create(item);
+ buttonGroup.items.push(item);
+
+ if (editor.initialized) {
+ bindSelectorChanged();
+ } else {
+ editor.on('init', bindSelectorChanged);
+ }
+ }
+ }
+ }
+ });
+
+ toolbars.push({type: 'toolbar', layout: 'flow', items: toolbarItems});
+
+ return true;
+ }
+
+ // Generate toolbar
+ for (var i = 1; i < 10; i++) {
+ if (!addToolbar(settings["toolbar" + i])) {
+ break;
+ }
+ }
+
+ // Generate toolbar or default toolbar
+ if (!toolbars.length) {
+ addToolbar(settings.toolbar || defaultToolbar);
+ }
+
+ return toolbars;
+ }
+
+ /**
+ * Creates the menu buttons based on config.
+ *
+ * @return {Array} Menu buttons array.
+ */
+ function createMenuButtons() {
+ var name, menuButtons = [];
+
+ function createMenuItem(name) {
+ var menuItem;
+
+ if (name == '|') {
+ return {text: '|'};
+ }
+
+ menuItem = editor.menuItems[name];
+
+ return menuItem;
+ }
+
+ function createMenu(context) {
+ var menuButton, menu, menuItems, isUserDefined, removedMenuItems;
+
+ removedMenuItems = tinymce.makeMap((settings.removed_menuitems || '').split(/[ ,]/));
+
+ // User defined menu
+ if (settings.menu) {
+ menu = settings.menu[context];
+ isUserDefined = true;
+ } else {
+ menu = defaultMenus[context];
+ }
+
+ if (menu) {
+ menuButton = {text: menu.title};
+ menuItems = [];
+
+ // Default/user defined items
+ each((menu.items || '').split(/[ ,]/), function(item) {
+ var menuItem = createMenuItem(item);
+
+ if (menuItem && !removedMenuItems[item]) {
+ menuItems.push(createMenuItem(item));
+ }
+ });
+
+ // Added though context
+ if (!isUserDefined) {
+ each(editor.menuItems, function(menuItem) {
+ if (menuItem.context == context) {
+ if (menuItem.separator == 'before') {
+ menuItems.push({text: '|'});
+ }
+
+ if (menuItem.prependToContext) {
+ menuItems.unshift(menuItem);
+ } else {
+ menuItems.push(menuItem);
+ }
+
+ if (menuItem.separator == 'after') {
+ menuItems.push({text: '|'});
+ }
+ }
+ });
+ }
+
+ for (var i = 0; i < menuItems.length; i++) {
+ if (menuItems[i].text == '|') {
+ if (i === 0 || i == menuItems.length - 1) {
+ menuItems.splice(i, 1);
+ }
+ }
+ }
+
+ menuButton.menu = menuItems;
+
+ if (!menuButton.menu.length) {
+ return null;
+ }
+ }
+
+ return menuButton;
+ }
+
+ var defaultMenuBar = [];
+ if (settings.menu) {
+ for (name in settings.menu) {
+ defaultMenuBar.push(name);
+ }
+ } else {
+ for (name in defaultMenus) {
+ defaultMenuBar.push(name);
+ }
+ }
+
+ var enabledMenuNames = typeof(settings.menubar) == "string" ? settings.menubar.split(/[ ,]/) : defaultMenuBar;
+ for (var i = 0; i < enabledMenuNames.length; i++) {
+ var menu = enabledMenuNames[i];
+ menu = createMenu(menu);
+
+ if (menu) {
+ menuButtons.push(menu);
+ }
+ }
+
+ return menuButtons;
+ }
+
+ /**
+ * Adds accessibility shortcut keys to panel.
+ *
+ * @param {tinymce.ui.Panel} panel Panel to add focus to.
+ */
+ function addAccessibilityKeys(panel) {
+ function focus(type) {
+ var item = panel.find(type)[0];
+
+ if (item) {
+ item.focus();
+ }
+ }
+
+ editor.shortcuts.add('Alt+F9', '', function() {
+ focus('menubar');
+ });
+
+ editor.shortcuts.add('Alt+F10', '', function() {
+ focus('toolbar');
+ });
+
+ editor.shortcuts.add('Alt+F11', '', function() {
+ focus('elementpath');
+ });
+
+ panel.on('cancel', function() {
+ editor.focus();
+ });
+ }
+
+ /**
+ * Resizes the editor to the specified width, height.
+ */
+ function resizeTo(width, height) {
+ var containerElm, iframeElm, containerSize, iframeSize;
+
+ function getSize(elm) {
+ return {
+ width: elm.clientWidth,
+ height: elm.clientHeight
+ };
+ }
+
+ containerElm = editor.getContainer();
+ iframeElm = editor.getContentAreaContainer().firstChild;
+ containerSize = getSize(containerElm);
+ iframeSize = getSize(iframeElm);
+
+ if (width !== null) {
+ width = Math.max(settings.min_width || 100, width);
+ width = Math.min(settings.max_width || 0xFFFF, width);
+
+ DOM.css(containerElm, 'width', width + (containerSize.width - iframeSize.width));
+ DOM.css(iframeElm, 'width', width);
+ }
+
+ height = Math.max(settings.min_height || 100, height);
+ height = Math.min(settings.max_height || 0xFFFF, height);
+ DOM.css(iframeElm, 'height', height);
+
+ editor.fire('ResizeEditor');
+ }
+
+ function resizeBy(dw, dh) {
+ var elm = editor.getContentAreaContainer();
+ self.resizeTo(elm.clientWidth + dw, elm.clientHeight + dh);
+ }
+
+ /**
+ * Renders the inline editor UI.
+ *
+ * @return {Object} Name/value object with theme data.
+ */
+ function renderInlineUI() {
+ var panel, inlineToolbarContainer;
+
+ if (settings.fixed_toolbar_container) {
+ inlineToolbarContainer = DOM.select(settings.fixed_toolbar_container)[0];
+ }
+
+ function reposition() {
+ if (panel && panel.moveRel && panel.visible() && !panel._fixed) {
+ // TODO: This is kind of ugly and doesn't handle multiple scrollable elements
+ var scrollContainer = editor.selection.getScrollContainer(), body = editor.getBody();
+ var deltaX = 0, deltaY = 0;
+
+ if (scrollContainer) {
+ var bodyPos = DOM.getPos(body), scrollContainerPos = DOM.getPos(scrollContainer);
+
+ deltaX = Math.max(0, scrollContainerPos.x - bodyPos.x);
+ deltaY = Math.max(0, scrollContainerPos.y - bodyPos.y);
+ }
+
+ panel.fixed(false).moveRel(body, editor.rtl ? ['tr-br', 'br-tr'] : ['tl-bl', 'bl-tl']).moveBy(deltaX, deltaY);
+ }
+ }
+
+ function show() {
+ if (panel) {
+ panel.show();
+ reposition();
+ DOM.addClass(editor.getBody(), 'mce-edit-focus');
+ }
+ }
+
+ function hide() {
+ if (panel) {
+ panel.hide();
+ DOM.removeClass(editor.getBody(), 'mce-edit-focus');
+ }
+ }
+
+ function render() {
+ if (panel) {
+ if (!panel.visible()) {
+ show();
+ }
+
+ return;
+ }
+
+ // Render a plain panel inside the inlineToolbarContainer if it's defined
+ panel = self.panel = Factory.create({
+ type: inlineToolbarContainer ? 'panel' : 'floatpanel',
+ classes: 'tinymce tinymce-inline',
+ layout: 'flex',
+ direction: 'column',
+ align: 'stretch',
+ autohide: false,
+ autofix: true,
+ fixed: !!inlineToolbarContainer,
+ border: 1,
+ items: [
+ settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()},
+ settings.toolbar === false ? null : {
+ type: 'panel', layout: 'stack', classes: "toolbar-grp", items: createToolbars()
+ }
+ ]
+ });
+
+ // Add statusbar
+ /*if (settings.statusbar !== false) {
+ panel.add({type: 'panel', classes: 'statusbar', layout: 'flow', border: '1 0 0 0', items: [
+ {type: 'elementpath'}
+ ]});
+ }*/
+
+ editor.fire('BeforeRenderUI');
+ panel.renderTo(inlineToolbarContainer || document.body).reflow();
+
+ addAccessibilityKeys(panel);
+ show();
+
+ editor.on('nodeChange', reposition);
+ editor.on('activate', show);
+ editor.on('deactivate', hide);
+ }
+
+ settings.content_editable = true;
+
+ editor.on('focus', render);
+ editor.on('blur', hide);
+
+ // Remove the panel when the editor is removed
+ editor.on('remove', function() {
+ if (panel) {
+ panel.remove();
+ panel = null;
+ }
+ });
+
+ return {};
+ }
+
+ /**
+ * Renders the iframe editor UI.
+ *
+ * @param {Object} args Details about target element etc.
+ * @return {Object} Name/value object with theme data.
+ */
+ function renderIframeUI(args) {
+ var panel, resizeHandleCtrl, startSize;
+
+ // Basic UI layout
+ panel = self.panel = Factory.create({
+ type: 'panel',
+ classes: 'tinymce',
+ style: 'visibility: hidden',
+ layout: 'stack',
+ border: 1,
+ items: [
+ settings.menubar === false ? null : {type: 'menubar', border: '0 0 1 0', items: createMenuButtons()},
+ settings.toolbar === false ? null : {type: 'panel', layout: 'stack', classes: "toolbar-grp", items: createToolbars()},
+ {type: 'panel', name: 'iframe', layout: 'stack', classes: 'edit-area', html: '', border: '1 0 0 0'}
+ ]
+ });
+
+ if (settings.resize !== false) {
+ resizeHandleCtrl = {
+ type: 'resizehandle',
+ direction: settings.resize,
+
+ onResizeStart: function() {
+ var elm = editor.getContentAreaContainer().firstChild;
+
+ startSize = {
+ width: elm.clientWidth,
+ height: elm.clientHeight
+ };
+ },
+
+ onResize: function(e) {
+ if (settings.resize == 'both') {
+ resizeTo(startSize.width + e.deltaX, startSize.height + e.deltaY);
+ } else {
+ resizeTo(null, startSize.height + e.deltaY);
+ }
+ }
+ };
+ }
+
+ // Add statusbar if needed
+ if (settings.statusbar !== false) {
+ panel.add({type: 'panel', name: 'statusbar', classes: 'statusbar', layout: 'flow', border: '1 0 0 0', items: [
+ {type: 'elementpath'},
+ resizeHandleCtrl
+ ]});
+ }
+
+ if (settings.readonly) {
+ panel.find('*').disabled(true);
+ }
+
+ editor.fire('BeforeRenderUI');
+ panel.renderBefore(args.targetNode).reflow();
+
+ if (settings.width) {
+ tinymce.DOM.setStyle(panel.getEl(), 'width', settings.width);
+ }
+
+ // Remove the panel when the editor is removed
+ editor.on('remove', function() {
+ panel.remove();
+ panel = null;
+ });
+
+ // Add accesibility shortkuts
+ addAccessibilityKeys(panel);
+
+ return {
+ iframeContainer: panel.find('#iframe')[0].getEl(),
+ editorContainer: panel.getEl()
+ };
+ }
+
+ /**
+ * Renders the UI for the theme. This gets called by the editor.
+ *
+ * @param {Object} args Details about target element etc.
+ * @return {Object} Theme UI data items.
+ */
+ self.renderUI = function(args) {
+ var skin = settings.skin !== false ? settings.skin || 'lightgray' : false;
+
+ if (skin) {
+ var skinUrl = settings.skin_url;
+
+ if (skinUrl) {
+ skinUrl = editor.documentBaseURI.toAbsolute(skinUrl);
+ } else {
+ skinUrl = tinymce.baseURL + '/skins/' + skin;
+ }
+
+ // Load special skin for IE7
+ // TODO: Remove this when we drop IE7 support
+ if (tinymce.Env.documentMode <= 7) {
+ tinymce.DOM.loadCSS(skinUrl + '/skin.ie7.min.css');
+ } else {
+ tinymce.DOM.loadCSS(skinUrl + '/skin.min.css');
+ }
+
+ // Load content.min.css or content.inline.min.css
+ editor.contentCSS.push(skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css');
+ }
+
+ // Handle editor setProgressState change
+ editor.on('ProgressState', function(e) {
+ self.throbber = self.throbber || new tinymce.ui.Throbber(self.panel.getEl('body'));
+
+ if (e.state) {
+ self.throbber.show(e.time);
+ } else {
+ self.throbber.hide();
+ }
+ });
+
+ // Render inline UI
+ if (settings.inline) {
+ return renderInlineUI(args);
+ }
+
+ // Render iframe UI
+ return renderIframeUI(args);
+ };
+
+ self.resizeTo = resizeTo;
+ self.resizeBy = resizeBy;
+});
diff --git a/src/wp-includes/js/tinymce/themes/modern/theme.min.js b/src/wp-includes/js/tinymce/themes/modern/theme.min.js
new file mode 100644
index 0000000000..6869cf7615
--- /dev/null
+++ b/src/wp-includes/js/tinymce/themes/modern/theme.min.js
@@ -0,0 +1 @@
+tinymce.ThemeManager.add("modern",function(e){function t(){function t(t){var i,o=[];if(t)return d(t.split(/[ ,]/),function(t){function n(){var n=e.selection;"bullist"==r&&n.selectorChanged("ul > li",function(e,n){for(var i,o=n.parents.length;o--&&(i=n.parents[o].nodeName,"OL"!=i&&"UL"!=i););t.active(e&&"UL"==i)}),"numlist"==r&&n.selectorChanged("ol > li",function(e,n){for(var i,o=n.parents.length;o--&&(i=n.parents[o].nodeName,"OL"!=i&&"UL"!=i););t.active(e&&"OL"==i)}),t.settings.stateSelector&&n.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&n.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})}var r;"|"==t?i=null:c.has(t)?(t={type:t},u.toolbar_items_size&&(t.size=u.toolbar_items_size),o.push(t),i=null):(i||(i={type:"buttongroup",items:[]},o.push(i)),e.buttons[t]&&(r=t,t=e.buttons[r],"function"==typeof t&&(t=t()),t.type=t.type||"button",u.toolbar_items_size&&(t.size=u.toolbar_items_size),t=c.create(t),i.items.push(t),e.initialized?n():e.on("init",n)))}),n.push({type:"toolbar",layout:"flow",items:o}),!0}for(var n=[],i=1;10>i&&t(u["toolbar"+i]);i++);return n.length||t(u.toolbar||f),n}function n(){function t(t){var n;return"|"==t?{text:"|"}:n=e.menuItems[t]}function n(n){var i,o,r,a,s;if(s=tinymce.makeMap((u.removed_menuitems||"").split(/[ ,]/)),u.menu?(o=u.menu[n],a=!0):o=h[n],o){i={text:o.title},r=[],d((o.items||"").split(/[ ,]/),function(e){var n=t(e);n&&!s[e]&&r.push(t(e))}),a||d(e.menuItems,function(e){e.context==n&&("before"==e.separator&&r.push({text:"|"}),e.prependToContext?r.unshift(e):r.push(e),"after"==e.separator&&r.push({text:"|"}))});for(var l=0;l=534;if(e.tinyMCEPreInit){s.suffix=tinyMCEPreInit.suffix;s.baseURL=tinyMCEPreInit.base;s.query=tinyMCEPreInit.query;return}s.suffix="";f=q.getElementsByTagName("base");for(m=0;m0?b:[f.scope]);if(e===false){break}}a.inDispatch=false;return e}});(function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(e,g){var f=this,i,d,c,h;e=tinymce.trim(e);g=f.settings=g||{};if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){f.source=e;return}if(e.indexOf("/")===0&&e.indexOf("//")!==0){e=(g.base_uri?g.base_uri.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){h=g.base_uri?g.base_uri.path:new tinymce.util.URI(location.href).directory;e=((g.base_uri&&g.base_uri.protocol)||"http")+"://mce_host"+f.toAbsPath(h,e)}e=e.replace(/@@/g,"(mce_at)");e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(b,j){var k=e[j];if(k){k=k.replace(/\(mce_at\)/g,"@@")}f[b]=k});c=g.base_uri;if(c){if(!f.protocol){f.protocol=c.protocol}if(!f.userInfo){f.userInfo=c.userInfo}if(!f.port&&f.host==="mce_host"){f.port=c.port}if(!f.host||f.host==="mce_host"){f.host=c.host}f.source=""}},setPath:function(c){var b=this;c=/^(.*?)\/?(\w+)?$/.exec(c);b.path=c[0];b.directory=c[1];b.file=c[2];b.source="";b.getURI()},toRelative:function(b){var d=this,f;if(b==="./"){return b}b=new tinymce.util.URI(b,{base_uri:d});if((b.host!="mce_host"&&d.host!=b.host&&b.host)||d.port!=b.port||d.protocol!=b.protocol){return b.getURI()}var c=d.getURI(),e=b.getURI();if(c==e||(c.charAt(c.length-1)=="/"&&c.substr(0,c.length-1)==e)){return c}f=d.toRelPath(d.path,b.path);if(b.query){f+="?"+b.query}if(b.anchor){f+="#"+b.anchor}return f},toAbsolute:function(b,c){b=new tinymce.util.URI(b,{base_uri:this});return b.getURI(this.host==b.host&&this.protocol==b.protocol?c:0)},toRelPath:function(g,h){var c,f=0,d="",e,b;g=g.substring(0,g.lastIndexOf("/"));g=g.split("/");c=h.split("/");if(g.length>=c.length){for(e=0,b=g.length;e=c.length||g[e]!=c[e]){f=e+1;break}}}if(g.length=g.length||g[e]!=c[e]){f=e+1;break}}}if(f===1){return h}for(e=0,b=g.length-(f-1);e=0;c--){if(f[c].length===0||f[c]==="."){continue}if(f[c]===".."){b++;continue}if(b>0){b--;continue}h.push(f[c])}c=e.length-b;if(c<=0){g=h.reverse().join("/")}else{g=e.slice(0,c).join("/")+"/"+h.reverse().join("/")}if(g.indexOf("/")!==0){g="/"+g}if(d&&g.lastIndexOf("/")!==g.length-1){g+=d}return g},getURI:function(d){var c,b=this;if(!b.source||d){c="";if(!d){if(b.protocol){c+=b.protocol+"://"}if(b.userInfo){c+=b.userInfo+"@"}if(b.host){c+=b.host}if(b.port){c+=":"+b.port}}if(b.path){c+=b.path}if(b.query){c+="?"+b.query}if(b.anchor){c+="#"+b.anchor}b.source=c}return b.source}})})();(function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(d){var b=this.get(d),c;if(b){a(b.split("&"),function(e){e=e.split("=");c=c||{};c[unescape(e[0])]=unescape(e[1])})}return c},setHash:function(j,b,g,f,i,c){var h="";a(b,function(e,d){h+=(!h?"":"&")+escape(d)+"="+escape(e)});this.set(j,h,g,f,i,c)},get:function(i){var h=document.cookie,g,f=i+"=",d;if(!h){return}d=h.indexOf("; "+f);if(d==-1){d=h.indexOf(f);if(d!==0){return null}}else{d+=2}g=h.indexOf(";",d);if(g==-1){g=h.length}return unescape(h.substring(d+f.length,g))},set:function(i,b,g,f,h,c){document.cookie=i+"="+escape(b)+((g)?"; expires="+g.toGMTString():"")+((f)?"; path="+escape(f):"")+((h)?"; domain="+h:"")+((c)?"; secure":"")},remove:function(c,e,d){var b=new Date();b.setTime(b.getTime()-1000);this.set(c,"",b,e,d)}})})();(function(){function serialize(o,quote){var i,v,t,name;quote=quote||'"';if(o==null){return"null"}t=typeof o;if(t=="string"){v="\bb\tt\nn\ff\rr\"\"''\\\\";return quote+o.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,b){if(quote==='"'&&a==="'"){return a}i=v.indexOf(b);if(i+1){return"\\"+v.charAt(i+1)}a=b.charCodeAt().toString(16);return"\\u"+"0000".substring(a.length)+a})+quote}if(t=="object"){if(o.hasOwnProperty&&Object.prototype.toString.call(o)==="[object Array]"){for(i=0,v="[";i0?",":"")+serialize(o[i],quote)}return v+"]"}v="{";for(name in o){if(o.hasOwnProperty(name)){v+=typeof o[name]!="function"?(v.length>1?","+quote:quote)+name+quote+":"+serialize(o[name],quote):""}}return v+"}"}return""+o}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}})();tinymce.create("static tinymce.util.XHR",{send:function(g){var a,e,b=window,h=0;function f(){if(!g.async||a.readyState==4||h++>10000){if(g.success&&h<10000&&a.status==200){g.success.call(g.success_scope,""+a.responseText,a,g)}else{if(g.error){g.error.call(g.error_scope,h>10000?"TIMED_OUT":"GENERAL",a,g)}}a=null}else{b.setTimeout(f,10)}}g.scope=g.scope||this;g.success_scope=g.success_scope||g.scope;g.error_scope=g.error_scope||g.scope;g.async=g.async===false?false:true;g.data=g.data||"";function d(i){a=0;try{a=new ActiveXObject(i)}catch(c){}return a}a=b.XMLHttpRequest?new XMLHttpRequest():d("Microsoft.XMLHTTP")||d("Msxml2.XMLHTTP");if(a){if(a.overrideMimeType){a.overrideMimeType(g.content_type)}a.open(g.type||(g.data?"POST":"GET"),g.url,g.async);if(g.content_type){a.setRequestHeader("Content-Type",g.content_type)}a.setRequestHeader("X-Requested-With","XMLHttpRequest");a.send(g.data);if(!g.async){return f()}e=b.setTimeout(f,10)}}});(function(){var c=tinymce.extend,b=tinymce.util.JSON,a=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(d){this.settings=c({},d);this.count=0},send:function(f){var e=f.error,d=f.success;f=c(this.settings,f);f.success=function(h,g){h=b.parse(h);if(typeof(h)=="undefined"){h={error:"JSON Parse error."}}if(h.error){e.call(f.error_scope||f.scope,h.error,g)}else{d.call(f.success_scope||f.scope,h.result)}};f.error=function(h,g){if(e){e.call(f.error_scope||f.scope,h,g)}};f.data=b.serialize({id:f.id||"c"+(this.count++),method:f.method,params:f.params});f.content_type="application/json";a.send(f)},"static":{sendRPC:function(d){return new tinymce.util.JSONRequest().send(d)}}})}());(function(a){a.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(b){return b.shiftKey||b.ctrlKey||b.altKey},metaKeyPressed:function(b){return a.isMac?b.metaKey:b.ctrlKey&&!b.altKey}}})(tinymce);tinymce.util.Quirks=function(a){var j=tinymce.VK,f=j.BACKSPACE,k=j.DELETE,e=a.dom,m=a.selection,I=a.settings,x=a.parser,p=a.serializer,F=tinymce.each;function B(O,N){try{a.getDoc().execCommand(O,false,N)}catch(M){}}function o(){var M=a.getDoc().documentMode;return M?M:6}function A(M){return M.isDefaultPrevented()}function K(){function M(S){var O,Q,N,T,P,R,U;function V(){if(P.nodeType==3){if(S&&R==P.length){return true}if(!S&&R===0){return true}}}O=m.getRng();var W=[O.startContainer,O.startOffset,O.endContainer,O.endOffset];if(!O.collapsed){S=true}P=O[(S?"start":"end")+"Container"];R=O[(S?"start":"end")+"Offset"];if(P.nodeType==3){Q=e.getParent(O.startContainer,e.isBlock);if(S){Q=e.getNext(Q,e.isBlock)}if(Q&&(V()||!O.collapsed)){N=e.create("em",{id:"__mceDel"});F(tinymce.grep(Q.childNodes),function(X){N.appendChild(X)});Q.appendChild(N)}}O=e.createRng();O.setStart(W[0],W[1]);O.setEnd(W[2],W[3]);m.setRng(O);a.getDoc().execCommand(S?"ForwardDelete":"Delete",false,null);if(N){T=m.getBookmark();while(U=e.get("__mceDel")){e.remove(U,true)}m.moveToBookmark(T)}}a.onKeyDown.add(function(N,P){var O;O=P.keyCode==k;if(!A(P)&&(O||P.keyCode==f)&&!j.modifierPressed(P)){P.preventDefault();M(O)}});a.addCommand("Delete",function(){M()})}function r(){function M(P){var O=e.create("body");var Q=P.cloneContents();O.appendChild(Q);return m.serializer.serialize(O,{format:"html"})}function N(O){var Q=M(O);var R=e.createRng();R.selectNode(a.getBody());var P=M(R);return Q===P}a.onKeyDown.add(function(P,R){var Q=R.keyCode,O;if(!A(R)&&(Q==k||Q==f)){O=P.selection.isCollapsed();if(O&&!e.isEmpty(P.getBody())){return}if(tinymce.isIE&&!O){return}if(!O&&!N(P.selection.getRng())){return}P.setContent("");P.selection.setCursorLocation(P.getBody(),0);P.nodeChanged()}})}function J(){a.onKeyDown.add(function(M,N){if(!A(N)&&N.keyCode==65&&j.metaKeyPressed(N)){N.preventDefault();M.execCommand("SelectAll")}})}function L(){if(!a.settings.content_editable){e.bind(a.getDoc(),"focusin",function(M){m.setRng(m.getRng())});e.bind(a.getDoc(),"mousedown",function(M){if(M.target==a.getDoc().documentElement){a.getWin().focus();m.setRng(m.getRng())}})}}function C(){a.onKeyDown.add(function(M,P){if(!A(P)&&P.keyCode===f){if(m.isCollapsed()&&m.getRng(true).startOffset===0){var O=m.getNode();var N=O.previousSibling;if(N&&N.nodeName&&N.nodeName.toLowerCase()==="hr"){e.remove(N);tinymce.dom.Event.cancel(P)}}}})}function z(){if(!Range.prototype.getClientRects){a.onMouseDown.add(function(N,O){if(!A(O)&&O.target.nodeName==="HTML"){var M=N.getBody();M.blur();setTimeout(function(){M.focus()},0)}})}}function h(){a.onClick.add(function(M,N){N=N.target;if(/^(IMG|HR)$/.test(N.nodeName)){m.getSel().setBaseAndExtent(N,0,N,1)}if(N.nodeName=="A"&&e.hasClass(N,"mceItemAnchor")){m.select(N)}M.nodeChanged()})}function c(){function N(){var P=e.getAttribs(m.getStart().cloneNode(false));return function(){var Q=m.getStart();if(Q!==a.getBody()){e.setAttrib(Q,"style",null);F(P,function(R){Q.setAttributeNode(R.cloneNode(true))})}}}function M(){return !m.isCollapsed()&&e.getParent(m.getStart(),e.isBlock)!=e.getParent(m.getEnd(),e.isBlock)}function O(P,Q){Q.preventDefault();return false}a.onKeyPress.add(function(P,R){var Q;if(!A(R)&&(R.keyCode==8||R.keyCode==46)&&M()){Q=N();P.getDoc().execCommand("delete",false,null);Q();R.preventDefault();return false}});e.bind(a.getDoc(),"cut",function(Q){var P;if(!A(Q)&&M()){P=N();a.onKeyUp.addToTop(O);setTimeout(function(){P();a.onKeyUp.remove(O)},0)}})}function b(){var N,M;e.bind(a.getDoc(),"selectionchange",function(){if(M){clearTimeout(M);M=0}M=window.setTimeout(function(){var O=m.getRng();if(!N||!tinymce.dom.RangeUtils.compareRanges(O,N)){a.nodeChanged();N=O}},50)})}function y(){document.body.setAttribute("role","application")}function u(){a.onKeyDown.add(function(M,O){if(!A(O)&&O.keyCode===f){if(m.isCollapsed()&&m.getRng(true).startOffset===0){var N=m.getNode().previousSibling;if(N&&N.nodeName&&N.nodeName.toLowerCase()==="table"){return tinymce.dom.Event.cancel(O)}}}})}function D(){if(o()>7){return}B("RespectVisibilityInDesign",true);a.contentStyles.push(".mceHideBrInPre pre br {display: none}");e.addClass(a.getBody(),"mceHideBrInPre");x.addNodeFilter("pre",function(M,O){var P=M.length,R,N,S,Q;while(P--){R=M[P].getAll("br");N=R.length;while(N--){S=R[N];Q=S.prev;if(Q&&Q.type===3&&Q.value.charAt(Q.value-1)!="\n"){Q.value+="\n"}else{S.parent.insert(new tinymce.html.Node("#text",3),S,true).value="\n"}}}});p.addNodeFilter("pre",function(M,O){var P=M.length,R,N,S,Q;while(P--){R=M[P].getAll("br");N=R.length;while(N--){S=R[N];Q=S.prev;if(Q&&Q.type==3){Q.value=Q.value.replace(/\r?\n$/,"")}}}})}function g(){e.bind(a.getBody(),"mouseup",function(O){var N,M=m.getNode();if(M.nodeName=="IMG"){if(N=e.getStyle(M,"width")){e.setAttrib(M,"width",N.replace(/[^0-9%]+/g,""));e.setStyle(M,"width","")}if(N=e.getStyle(M,"height")){e.setAttrib(M,"height",N.replace(/[^0-9%]+/g,""));e.setStyle(M,"height","")}}})}function d(){a.onKeyDown.add(function(S,T){var R,M,N,P,Q,U,O;R=T.keyCode==k;if(!A(T)&&(R||T.keyCode==f)&&!j.modifierPressed(T)){M=m.getRng();N=M.startContainer;P=M.startOffset;O=M.collapsed;if(N.nodeType==3&&N.nodeValue.length>0&&((P===0&&!O)||(O&&P===(R?0:1)))){U=N.previousSibling;if(U&&U.nodeName=="IMG"){return}nonEmptyElements=S.schema.getNonEmptyElements();T.preventDefault();Q=e.create("br",{id:"__tmp"});N.parentNode.insertBefore(Q,N);S.getDoc().execCommand(R?"ForwardDelete":"Delete",false,null);N=m.getRng().startContainer;U=N.previousSibling;if(U&&U.nodeType==1&&!e.isBlock(U)&&e.isEmpty(U)&&!nonEmptyElements[U.nodeName.toLowerCase()]){e.remove(U)}e.remove("__tmp")}}})}function H(){a.onKeyDown.add(function(Q,R){var O,N,S,M,P;if(A(R)||R.keyCode!=j.BACKSPACE){return}O=m.getRng();N=O.startContainer;S=O.startOffset;M=e.getRoot();P=N;if(!O.collapsed||S!==0){return}while(P&&P.parentNode&&P.parentNode.firstChild==P&&P.parentNode!=M){P=P.parentNode}if(P.tagName==="BLOCKQUOTE"){Q.formatter.toggle("blockquote",null,P);O=e.createRng();O.setStart(N,0);O.setEnd(N,0);m.setRng(O)}})}function G(){function M(){a._refreshContentEditable();B("StyleWithCSS",false);B("enableInlineTableEditing",false);if(!I.object_resizing){B("enableObjectResizing",false)}}if(!I.readonly){a.onBeforeExecCommand.add(M);a.onMouseDown.add(M)}}function t(){function M(N,O){F(e.select("a"),function(R){var P=R.parentNode,Q=e.getRoot();if(P.lastChild===R){while(P&&!e.isBlock(P)){if(P.parentNode.lastChild!==P||P===Q){return}P=P.parentNode}e.add(P,"br",{"data-mce-bogus":1})}})}a.onExecCommand.add(function(N,O){if(O==="CreateLink"){M(N)}});a.onSetContent.add(m.onSetContent.add(M))}function n(){if(I.forced_root_block){a.onInit.add(function(){B("DefaultParagraphSeparator",I.forced_root_block)})}}function q(){function M(O,N){if(!O||!N.initial){a.execCommand("mceRepaint")}}a.onUndo.add(M);a.onRedo.add(M);a.onSetContent.add(M)}function i(){a.onKeyDown.add(function(N,O){var M;if(!A(O)&&O.keyCode==f){M=N.getDoc().selection.createRange();if(M&&M.item){O.preventDefault();N.undoManager.beforeChange();e.remove(M.item(0));N.undoManager.add()}}})}function s(){var M;if(o()>=10){M="";F("p div h1 h2 h3 h4 h5 h6".split(" "),function(N,O){M+=(O>0?",":"")+N+":empty"});a.contentStyles.push(M+"{padding-right: 1px !important}")}}function v(){var O,N,ae,M,Z,ac,aa,ad,P,Q,ab,X,W,Y=document,U=a.getDoc();if(!I.object_resizing||I.webkit_fake_resize===false){return}B("enableObjectResizing",false);ab={n:[0.5,0,0,-1],e:[1,0.5,1,0],s:[0.5,1,0,1],w:[0,0.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};function S(ai){var ah,ag;ah=ai.screenX-ac;ag=ai.screenY-aa;X=ah*Z[2]+ad;W=ag*Z[3]+P;X=X<5?5:X;W=W<5?5:W;if(j.modifierPressed(ai)||(ae.nodeName=="IMG"&&Z[2]*Z[3]!==0)){X=Math.round(W/Q);W=Math.round(X*Q)}e.setStyles(M,{width:X,height:W});if(Z[2]<0&&M.clientWidth<=X){e.setStyle(M,"left",O+(ad-X))}if(Z[3]<0&&M.clientHeight<=W){e.setStyle(M,"top",N+(P-W))}}function af(){function ag(ah,ai){if(ai){if(ae.style[ah]||!a.schema.isValid(ae.nodeName.toLowerCase(),ah)){e.setStyle(ae,ah,ai)}else{e.setAttrib(ae,ah,ai)}}}ag("width",X);ag("height",W);e.unbind(U,"mousemove",S);e.unbind(U,"mouseup",af);if(Y!=U){e.unbind(Y,"mousemove",S);e.unbind(Y,"mouseup",af)}e.remove(M);R(ae)}function R(aj){var ah,ai,ag;T();ah=e.getPos(aj);O=ah.x;N=ah.y;ai=aj.offsetWidth;ag=aj.offsetHeight;if(ae!=aj){ae=aj;X=W=0}F(ab,function(am,ak){var al;al=e.get("mceResizeHandle"+ak);if(!al){al=e.add(U.documentElement,"div",{id:"mceResizeHandle"+ak,"class":"mceResizeHandle",style:"cursor:"+ak+"-resize; margin:0; padding:0"});e.bind(al,"mousedown",function(an){an.preventDefault();af();ac=an.screenX;aa=an.screenY;ad=ae.clientWidth;P=ae.clientHeight;Q=P/ad;Z=am;M=ae.cloneNode(true);e.addClass(M,"mceClonedResizable");e.setStyles(M,{left:O,top:N,margin:0});U.documentElement.appendChild(M);e.bind(U,"mousemove",S);e.bind(U,"mouseup",af);if(Y!=U){e.bind(Y,"mousemove",S);e.bind(Y,"mouseup",af)}})}else{e.show(al)}e.setStyles(al,{left:(ai*am[0]+O)-(al.offsetWidth/2),top:(ag*am[1]+N)-(al.offsetHeight/2)})});if(!tinymce.isOpera&&ae.nodeName=="IMG"){ae.setAttribute("data-mce-selected","1")}}function T(){if(ae){ae.removeAttribute("data-mce-selected")}for(var ag in ab){e.hide("mceResizeHandle"+ag)}}a.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}");function V(){var ag=e.getParent(m.getNode(),"table,img");F(e.select("img[data-mce-selected]"),function(ah){ah.removeAttribute("data-mce-selected")});if(ag){R(ag)}else{T()}}a.onNodeChange.add(V);e.bind(U,"selectionchange",V);a.serializer.addAttributeFilter("data-mce-selected",function(ag,ah){var ai=ag.length;while(ai--){ag[ai].attr(ah,null)}})}function E(){if(o()<9){x.addNodeFilter("noscript",function(M){var N=M.length,O,P;while(N--){O=M[N];P=O.firstChild;if(P){O.attr("data-mce-innertext",P.value)}}});p.addNodeFilter("noscript",function(M){var N=M.length,O,Q,P;while(N--){O=M[N];Q=M[N].firstChild;if(Q){Q.value=tinymce.html.Entities.decode(Q.value)}else{P=O.attributes.map["data-mce-innertext"];if(P){O.attr("data-mce-innertext",null);Q=new tinymce.html.Node("#text",3);Q.value=P;Q.raw=true;O.append(Q)}}}})}}function l(){a.contentStyles.push("body {min-height: 100px}");a.onClick.add(function(M,N){if(N.target.nodeName=="HTML"){a.execCommand("SelectAll");a.selection.collapse(true);a.nodeChanged()}})}u();H();r();if(tinymce.isWebKit){d();K();L();h();n();if(tinymce.isIDevice){b()}else{v();J()}}if(tinymce.isIE&&!tinymce.isIE11){C();y();D();g();i();s();E()}if(tinymce.isIE11){l()}if(tinymce.isGecko&&!tinymce.isIE11){C();z();c();G();t();q()}if(tinymce.isOpera){v()}};(function(j){var a,g,d,k=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\"\']/g,c=/&(#x|#)?([\w]+);/g,i={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"};g={'"':""","'":"'","<":"<",">":">","&":"&"};d={"<":"<",">":">","&":"&",""":'"',"'":"'"};function h(l){var m;m=document.createElement("div");m.innerHTML=l;return m.textContent||m.innerText||l}function e(m,p){var n,o,l,q={};if(m){m=m.split(",");p=p||10;for(n=0;n1){return""+(((n.charCodeAt(0)-55296)*1024)+(n.charCodeAt(1)-56320)+65536)+";"}return g[n]||""+n.charCodeAt(0)+";"})},encodeNamed:function(n,l,m){m=m||a;return n.replace(l?k:b,function(o){return g[o]||m[o]||o})},getEncodeFunc:function(l,o){var p=j.html.Entities;o=e(o)||a;function m(r,q){return r.replace(q?k:b,function(s){return g[s]||o[s]||""+s.charCodeAt(0)+";"||s})}function n(r,q){return p.encodeNamed(r,q,o)}l=j.makeMap(l.replace(/\+/g,","));if(l.named&&l.numeric){return m}if(l.named){if(o){return n}return p.encodeNamed}if(l.numeric){return p.encodeNumeric}return p.encodeRaw},decode:function(l){return l.replace(c,function(n,m,o){if(m){o=parseInt(o,m.length===2?16:10);if(o>65535){o-=65536;return String.fromCharCode(55296+(o>>10),56320+(o&1023))}else{return i[o]||String.fromCharCode(o)}}return d[n]||a[n]||h(n)})}}})(tinymce);tinymce.html.Styles=function(d,f){var k=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,h=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,b=/\s*([^:]+):\s*([^;]+);?/g,l=/\s+$/,m=/rgb/,e,g,a={},j;d=d||{};j="\\\" \\' \\; \\: ; : \uFEFF".split(" ");for(g=0;g1?r:"0"+r}return"#"+o(q)+o(p)+o(i)}return{toHex:function(i){return i.replace(k,c)},parse:function(s){var z={},q,n,x,r,v=d.url_converter,y=d.url_converter_scope||this;function p(D,G){var F,C,B,E;if(z["border-image"]==="none"){delete z["border-image"]}F=z[D+"-top"+G];if(!F){return}C=z[D+"-right"+G];if(F!=C){return}B=z[D+"-bottom"+G];if(C!=B){return}E=z[D+"-left"+G];if(B!=E){return}z[D+G]=E;delete z[D+"-top"+G];delete z[D+"-right"+G];delete z[D+"-bottom"+G];delete z[D+"-left"+G]}function u(C){var D=z[C],B;if(!D||D.indexOf(" ")<0){return}D=D.split(" ");B=D.length;while(B--){if(D[B]!==D[0]){return false}}z[C]=D[0];return true}function A(D,C,B,E){if(!u(C)){return}if(!u(B)){return}if(!u(E)){return}z[D]=z[C]+" "+z[B]+" "+z[E];delete z[C];delete z[B];delete z[E]}function t(B){r=true;return a[B]}function i(C,B){if(r){C=C.replace(/\uFEFF[0-9]/g,function(D){return a[D]})}if(!B){C=C.replace(/\\([\'\";:])/g,"$1")}return C}function o(C,B,F,E,G,D){G=G||D;if(G){G=i(G);return"'"+G.replace(/\'/g,"\\'")+"'"}B=i(B||F||E);if(v){B=v.call(y,B,"style")}return"url('"+B.replace(/\'/g,"\\'")+"')"}if(s){s=s.replace(/\\[\"\';:\uFEFF]/g,t).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(B){return B.replace(/[;:]/g,t)});while(q=b.exec(s)){n=q[1].replace(l,"").toLowerCase();x=q[2].replace(l,"");if(n&&x.length>0){if(n==="font-weight"&&x==="700"){x="bold"}else{if(n==="color"||n==="background-color"){x=x.toLowerCase()}}x=x.replace(k,c);x=x.replace(h,o);z[n]=r?i(x,true):x}b.lastIndex=q.index+q[0].length}p("border","");p("border","-width");p("border","-color");p("border","-style");p("padding","");p("margin","");A("border","border-width","border-style","border-color");if(z.border==="medium none"){delete z.border}}return z},serialize:function(p,r){var o="",n,q;function i(t){var x,u,s,v;x=f.styles[t];if(x){for(u=0,s=x.length;u0){o+=(o.length>0?" ":"")+t+": "+v+";"}}}}if(r&&f&&f.styles){i("*");i(r)}else{for(n in p){q=p[n];if(q!==e&&q.length>0){o+=(o.length>0?" ":"")+n+": "+q+";"}}}return o}}};(function(f){var a={},e=f.makeMap,g=f.each;function d(j,i){return j.split(i||",")}function h(m,l){var j,k={};function i(n){return n.replace(/[A-Z]+/g,function(o){return i(m[o])})}for(j in m){if(m.hasOwnProperty(j)){m[j]=i(m[j])}}i(l).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(q,o,n,p){n=d(n,"|");k[o]={attributes:e(n),attributesOrder:n,children:e(p,"|",{"#comment":{}})}});return k}function b(){var i=a.html5;if(!i){i=a.html5=h({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")}return i}function c(){var i=a.html4;if(!i){i=a.html4=h({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]")}return i}f.html.Schema=function(A){var u=this,s={},k={},j=[],D,y;var o,q,z,r,v,n,p={};function m(F,E,H){var G=A[F];if(!G){G=a[F];if(!G){G=e(E," ",e(E.toUpperCase()," "));G=f.extend(G,H);a[F]=G}}else{G=e(G,",",e(G.toUpperCase()," "))}return G}A=A||{};y=A.schema=="html5"?b():c();if(A.verify_html===false){A.valid_elements="*[*]"}if(A.valid_styles){D={};g(A.valid_styles,function(F,E){D[E]=f.explode(F)})}o=m("whitespace_elements","pre script noscript style textarea");q=m("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");z=m("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr");r=m("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls");n=m("non_empty_elements","td th iframe video audio object script",z);textBlockElementsMap=m("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure");v=m("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",textBlockElementsMap);function i(E){return new RegExp("^"+E.replace(/([?+*])/g,".$1")+"$")}function C(L){var K,G,Z,V,aa,F,I,U,X,Q,Y,ac,O,J,W,E,S,H,ab,ad,P,T,N=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,R=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,M=/[*?+]/;if(L){L=d(L);if(s["@"]){S=s["@"].attributes;H=s["@"].attributesOrder}for(K=0,G=L.length;K=0){for(U=A.length-1;U>=V;U--){T=A[U];if(T.valid){n.end(T.name)}}A.length=V}}function p(U,T,Y,X,W){var Z,V;T=T.toLowerCase();Y=T in H?T:j(Y||X||W||"");if(v&&!z&&T.indexOf("data-")!==0){Z=P[T];if(!Z&&F){V=F.length;while(V--){Z=F[V];if(Z.pattern.test(T)){break}}if(V===-1){Z=null}}if(!Z){return}if(Z.validValues&&!(Y in Z.validValues)){return}}N.map[T]=Y;N.push({name:T,value:Y})}l=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g");D=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g;K={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi};M=e.getShortEndedElements();J=c.self_closing_elements||e.getSelfClosingElements();H=e.getBoolAttrs();v=c.validate;s=c.remove_internals;y=c.fix_self_closing;q=a.isIE;o=/^:/;while(g=l.exec(E)){if(G0&&A[A.length-1].name===I){u(I)}if(!v||(m=e.getElementRule(I))){k=true;if(v){P=m.attributes;F=m.attributePatterns}if(R=g[8]){z=R.indexOf("data-mce-type")!==-1;if(z&&s){k=false}N=[];N.map={};R.replace(D,p)}else{N=[];N.map={}}if(v&&!z){S=m.attributesRequired;L=m.attributesDefault;f=m.attributesForced;if(f){Q=f.length;while(Q--){t=f[Q];r=t.name;h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}if(L){Q=L.length;while(Q--){t=L[Q];r=t.name;if(!(r in N.map)){h=t.value;if(h==="{$uid}"){h="mce_"+x++}N.map[r]=h;N.push({name:r,value:h})}}}if(S){Q=S.length;while(Q--){if(S[Q] in N.map){break}}if(Q===-1){k=false}}if(N.map["data-mce-bogus"]){k=false}}if(k){n.start(I,N,O)}}else{k=false}if(B=K[I]){B.lastIndex=G=g.index+g[0].length;if(g=B.exec(E)){if(k){C=E.substr(G,g.index-G)}G=g.index+g[0].length}else{C=E.substr(G);G=E.length}if(k&&C.length>0){n.text(C,true)}if(k){n.end(I)}l.lastIndex=G;continue}if(!O){if(!R||R.indexOf("/")!=R.length-1){A.push({name:I,valid:k})}else{if(k){n.end(I)}}}}else{if(I=g[1]){n.comment(I)}else{if(I=g[2]){n.cdata(I)}else{if(I=g[3]){n.doctype(I)}else{if(I=g[4]){n.pi(I,g[5])}}}}}}G=g.index+g[0].length}if(G=0;Q--){I=A[Q];if(I.valid){n.end(I.name)}}}}})(tinymce);(function(d){var c=/^[ \t\r\n]*$/,e={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};function a(k,l,j){var i,h,f=j?"lastChild":"firstChild",g=j?"prev":"next";if(k[f]){return k[f]}if(k!==l){i=k[g];if(i){return i}for(h=k.parent;h&&h!==l;h=h.parent){i=h[g];if(i){return i}}}}function b(f,g){this.name=f;this.type=g;if(g===1){this.attributes=[];this.attributes.map={}}}d.extend(b.prototype,{replace:function(g){var f=this;if(g.parent){g.remove()}f.insert(g,f);f.remove();return f},attr:function(h,l){var f=this,g,j,k;if(typeof h!=="string"){for(j in h){f.attr(j,h[j])}return f}if(g=f.attributes){if(l!==k){if(l===null){if(h in g.map){delete g.map[h];j=g.length;while(j--){if(g[j].name===h){g=g.splice(j,1);return f}}}return f}if(h in g.map){j=g.length;while(j--){if(g[j].name===h){g[j].value=l;break}}}else{g.push({name:h,value:l})}g.map[h]=l;return f}else{return g.map[h]}}},clone:function(){var g=this,n=new b(g.name,g.type),h,f,m,j,k;if(m=g.attributes){k=[];k.map={};for(h=0,f=m.length;h1){x.reverse();A=o=f.filterNode(x[0].clone());for(u=0;u0){Q.value=l;Q=Q.prev}else{O=Q.prev;Q.remove();Q=O}}}function H(O){var P,l={};for(P in O){if(P!=="li"&&P!="p"){l[P]=O[P]}}return l}n=new b.html.SaxParser({validate:z,self_closing_elements:H(h.getSelfClosingElements()),cdata:function(l){B.append(K("#cdata",4)).value=l},text:function(P,l){var O;if(!L){P=P.replace(k," ");if(B.lastChild&&o[B.lastChild.name]){P=P.replace(E,"")}}if(P.length!==0){O=K("#text",3);O.raw=!!l;B.append(O).value=P}},comment:function(l){B.append(K("#comment",8)).value=l},pi:function(l,O){B.append(K(l,7)).value=O;I(B)},doctype:function(O){var l;l=B.append(K("#doctype",10));l.value=O;I(B)},start:function(l,W,P){var U,R,Q,O,S,X,V,T;Q=z?h.getElementRule(l):{};if(Q){U=K(Q.outputName||l,1);U.attributes=W;U.shortEnded=P;B.append(U);T=p[B.name];if(T&&p[U.name]&&!T[U.name]){M.push(U)}R=d.length;while(R--){S=d[R].name;if(S in W.map){F=c[S];if(F){F.push(U)}else{c[S]=[U]}}}if(o[l]){I(U)}if(!P){B=U}if(!L&&s[l]){L=true}}},end:function(l){var S,P,R,O,Q;P=z?h.getElementRule(l):{};if(P){if(o[l]){if(!L){S=B.firstChild;if(S&&S.type===3){R=S.value.replace(E,"");if(R.length>0){S.value=R;S=S.next}else{O=S.next;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.next;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}S=B.lastChild;if(S&&S.type===3){R=S.value.replace(t,"");if(R.length>0){S.value=R;S=S.prev}else{O=S.prev;S.remove();S=O}while(S&&S.type===3){R=S.value;O=S.prev;if(R.length===0||y.test(R)){S.remove();S=O}S=O}}}}if(L&&s[l]){L=false}if(P.removeEmpty||P.paddEmpty){if(B.isEmpty(u)){if(P.paddEmpty){B.empty().append(new a("#text","3")).value="\u00a0"}else{if(!B.attributes.map.name&&!B.attributes.map.id){Q=B.parent;B.empty().remove();B=Q;return}}}}B=B.parent}}},h);J=B=new a(m.context||g.root_name,11);n.parse(v);if(z&&M.length){if(!m.context){j(M)}else{m.invalid=true}}if(q&&J.name=="body"){G()}if(!m.invalid){for(N in i){F=e[N];A=i[N];x=A.length;while(x--){if(!A[x].parent){A.splice(x,1)}}for(D=0,C=F.length;D0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}c.push("<",m);if(k){for(n=0,j=k.length;n"}else{c[c.length]=" />"}if(p&&a&&d[m]&&c.length>0){o=c[c.length-1];if(o.length>0&&o!=="\n"){c.push("\n")}}},end:function(h){var i;c.push("",h,">");if(a&&d[h]&&c.length>0){i=c[c.length-1];if(i.length>0&&i!=="\n"){c.push("\n")}}},text:function(i,h){if(i.length>0){c[c.length]=h?i:f(i)}},cdata:function(h){c.push("")},comment:function(h){c.push("")},pi:function(h,i){if(i){c.push("",h," ",i,"?>")}else{c.push("",h,"?>")}if(a){c.push("\n")}},doctype:function(h){c.push("",a?"\n":"")},reset:function(){c.length=0},getContent:function(){return c.join("").replace(/\n$/,"")}}};(function(a){a.html.Serializer=function(c,d){var b=this,e=new a.html.Writer(c);c=c||{};c.validate="validate" in c?c.validate:true;b.schema=d=d||new a.html.Schema();b.writer=e;b.serialize=function(h){var g,i;i=c.validate;g={3:function(k,j){e.text(k.value,k.raw)},8:function(j){e.comment(j.value)},7:function(j){e.pi(j.name,j.value)},10:function(j){e.doctype(j.value)},4:function(j){e.cdata(j.value)},11:function(j){if((j=j.firstChild)){do{f(j)}while(j=j.next)}}};e.reset();function f(k){var t=g[k.type],j,o,s,r,p,u,n,m,q;if(!t){j=k.name;o=k.shortEnded;s=k.attributes;if(i&&s&&s.length>1){u=[];u.map={};q=d.getElementRule(k.name);for(n=0,m=q.attributesOrder.length;n=8;k.boxModel=!e.isIE||o.compatMode=="CSS1Compat"||k.stdMode;k.hasOuterHTML="outerHTML" in o.createElement("a");k.settings=l=e.extend({keep_values:false,hex_colors:1},l);k.schema=l.schema;k.styles=new e.html.Styles({url_converter:l.url_converter,url_converter_scope:l.url_converter_scope},l.schema);if(e.isIE6){try{o.execCommand("BackgroundImageCache",false,true)}catch(m){k.cssFlicker=true}}k.fixDoc(o);k.events=l.ownEvents?new e.dom.EventUtils(l.proxy):e.dom.Event;e.addUnload(k.destroy,k);n=l.schema?l.schema.getBlockElements():{};k.isBlock=function(q){if(!q){return false}var p=q.nodeType;if(p){return !!(p===1&&n[q.nodeName])}return !!n[q]}},fixDoc:function(k){var j=this.settings,i;if(b&&!e.isIE11&&j.schema){("abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video").replace(/\w+/g,function(l){k.createElement(l)});for(i in j.schema.getCustomElements()){k.createElement(i)}}},clone:function(k,i){var j=this,m,l;if(!b||e.isIE11||k.nodeType!==1||i){return k.cloneNode(i)}l=j.doc;if(!i){m=l.createElement(k.nodeName);g(j.getAttribs(k),function(n){j.setAttrib(m,n.nodeName,j.getAttrib(k,n.nodeName))});return m}return m.firstChild},getRoot:function(){var i=this,j=i.settings;return(j&&i.get(j.root_element))||i.doc.body},getViewPort:function(j){var k,i;j=!j?this.win:j;k=j.document;i=this.boxModel?k.documentElement:k.body;return{x:j.pageXOffset||i.scrollLeft,y:j.pageYOffset||i.scrollTop,w:j.innerWidth||i.clientWidth,h:j.innerHeight||i.clientHeight}},getRect:function(l){var k,i=this,j;l=i.get(l);k=i.getPos(l);j=i.getSize(l);return{x:k.x,y:k.y,w:j.w,h:j.h}},getSize:function(l){var j=this,i,k;l=j.get(l);i=j.getStyle(l,"width");k=j.getStyle(l,"height");if(i.indexOf("px")===-1){i=0}if(k.indexOf("px")===-1){k=0}return{w:parseInt(i,10)||l.offsetWidth||l.clientWidth,h:parseInt(k,10)||l.offsetHeight||l.clientHeight}},getParent:function(k,j,i){return this.getParents(k,j,i,false)},getParents:function(s,m,k,q){var j=this,i,l=j.settings,p=[];s=j.get(s);q=q===undefined;if(l.strict_root){k=k||j.getRoot()}if(d(m,"string")){i=m;if(m==="*"){m=function(o){return o.nodeType==1}}else{m=function(o){return j.is(o,i)}}}while(s){if(s==k||!s.nodeType||s.nodeType===9){break}if(!m||m(s)){if(q){p.push(s)}else{return s}}s=s.parentNode}return q?p:null},get:function(i){var j;if(i&&this.doc&&typeof(i)=="string"){j=i;i=this.doc.getElementById(i);if(i&&i.id!==j){return this.doc.getElementsByName(j)[1]}}return i},getNext:function(j,i){return this._findSib(j,i,"nextSibling")},getPrev:function(j,i){return this._findSib(j,i,"previousSibling")},select:function(k,j){var i=this;return e.dom.Sizzle(k,i.get(j)||i.get(i.settings.root_element)||i.doc,[])},is:function(l,j){var k;if(l.length===undefined){if(j==="*"){return l.nodeType==1}if(c.test(j)){j=j.toLowerCase().split(/,/);l=l.nodeName.toLowerCase();for(k=j.length-1;k>=0;k--){if(j[k]==l){return true}}return false}}return e.dom.Sizzle.matches(j,l.nodeType?[l]:l).length>0},add:function(l,o,i,k,m){var j=this;return this.run(l,function(r){var q,n;q=d(o,"string")?j.doc.createElement(o):o;j.setAttribs(q,i);if(k){if(k.nodeType){q.appendChild(k)}else{j.setHTML(q,k)}}return !m?r.appendChild(q):q})},create:function(k,i,j){return this.add(this.doc.createElement(k),k,i,j,1)},createHTML:function(q,i,m){var p="",l=this,j;p+="<"+q;for(j in i){if(i.hasOwnProperty(j)){p+=" "+j+'="'+l.encode(i[j])+'"'}}if(typeof(m)!="undefined"){return p+">"+m+""+q+">"}return p+" />"},remove:function(i,j){return this.run(i,function(l){var m,k=l.parentNode;if(!k){return null}if(j){while(m=l.firstChild){if(!e.isIE||m.nodeType!==3||m.nodeValue){k.insertBefore(m,l)}else{l.removeChild(m)}}}return k.removeChild(l)})},setStyle:function(l,i,j){var k=this;return k.run(l,function(o){var n,m;n=o.style;i=i.replace(/-(\D)/g,function(q,p){return p.toUpperCase()});if(k.pixelStyles.test(i)&&(e.is(j,"number")||/^[\-0-9\.]+$/.test(j))){j+="px"}switch(i){case"opacity":if(b&&!e.isIE11){n.filter=j===""?"":"alpha(opacity="+(j*100)+")";if(!l.currentStyle||!l.currentStyle.hasLayout){n.display="inline-block"}}n[i]=n["-moz-opacity"]=n["-khtml-opacity"]=j||"";break;case"float":(b&&!e.isIE11)?n.styleFloat=j:n.cssFloat=j;break;default:n[i]=j||""}if(k.settings.update_styles){k.setAttrib(o,"data-mce-style")}})},getStyle:function(l,i,k){l=this.get(l);if(!l){return}if(this.doc.defaultView&&k){i=i.replace(/[A-Z]/g,function(m){return"-"+m});try{return this.doc.defaultView.getComputedStyle(l,null).getPropertyValue(i)}catch(j){return null}}i=i.replace(/-(\D)/g,function(n,m){return m.toUpperCase()});if(i=="float"){i=b?"styleFloat":"cssFloat"}if(l.currentStyle&&k){return l.currentStyle[i]}return l.style?l.style[i]:undefined},setStyles:function(l,m){var j=this,k=j.settings,i;i=k.update_styles;k.update_styles=0;g(m,function(o,p){j.setStyle(l,p,o)});k.update_styles=i;if(k.update_styles){j.setAttrib(l,k.cssText)}},removeAllAttribs:function(i){return this.run(i,function(l){var k,j=l.attributes;for(k=j.length-1;k>=0;k--){l.removeAttributeNode(j.item(k))}})},setAttrib:function(k,l,i){var j=this;if(!k||!l){return}if(j.settings.strict){l=l.toLowerCase()}return this.run(k,function(p){var o=j.settings;var m=p.getAttribute(l);if(i!==null){switch(l){case"style":if(!d(i,"string")){g(i,function(q,r){j.setStyle(p,r,q)});return}if(o.keep_values){if(i&&!j._isRes(i)){p.setAttribute("data-mce-style",i,2)}else{p.removeAttribute("data-mce-style",2)}}p.style.cssText=i;break;case"class":p.className=i||"";break;case"src":case"href":if(o.keep_values){if(o.url_converter){i=o.url_converter.call(o.url_converter_scope||j,i,l,p)}j.setAttrib(p,"data-mce-"+l,i,2)}break;case"shape":p.setAttribute("data-mce-style",i);break}}if(d(i)&&i!==null&&i.length!==0){p.setAttribute(l,""+i,2)}else{p.removeAttribute(l,2)}if(tinyMCE.activeEditor&&m!=i){var n=tinyMCE.activeEditor;n.onSetAttrib.dispatch(n,p,l,i)}})},setAttribs:function(j,k){var i=this;return this.run(j,function(l){g(k,function(m,o){i.setAttrib(l,o,m)})})},getAttrib:function(m,o,k){var i,j=this,l;m=j.get(m);if(!m||m.nodeType!==1){return k===l?false:k}if(!d(k)){k=""}if(/^(src|href|style|coords|shape)$/.test(o)){i=m.getAttribute("data-mce-"+o);if(i){return i}}if(b&&j.props[o]){i=m[j.props[o]];i=i&&i.nodeValue?i.nodeValue:i}if(!i){i=m.getAttribute(o,2)}if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(o)){if(m[j.props[o]]===true&&i===""){return o}return i?o:""}if(m.nodeName==="FORM"&&m.getAttributeNode(o)){return m.getAttributeNode(o).nodeValue}if(o==="style"){i=i||m.style.cssText;if(i){i=j.serializeStyle(j.parseStyle(i),m.nodeName);if(j.settings.keep_values&&!j._isRes(i)){m.setAttribute("data-mce-style",i)}}}if(f&&o==="class"&&i){i=i.replace(/(apple|webkit)\-[a-z\-]+/gi,"")}if(b){switch(o){case"rowspan":case"colspan":if(i===1){i=""}break;case"size":if(i==="+0"||i===20||i===0){i=""}break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":if(i===0){i=""}break;case"hspace":if(i===-1){i=""}break;case"maxlength":case"tabindex":if(i===32768||i===2147483647||i==="32768"){i=""}break;case"multiple":case"compact":case"noshade":case"nowrap":if(i===65535){return o}return k;case"shape":i=i.toLowerCase();break;default:if(o.indexOf("on")===0&&i){i=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+i)}}}return(i!==l&&i!==null&&i!=="")?""+i:k},getPos:function(q,l){var j=this,i=0,p=0,m,o=j.doc,k;q=j.get(q);l=l||o.body;if(q){if(q.getBoundingClientRect){q=q.getBoundingClientRect();m=j.boxModel?o.documentElement:o.body;i=q.left+(o.documentElement.scrollLeft||o.body.scrollLeft)-m.clientTop;p=q.top+(o.documentElement.scrollTop||o.body.scrollTop)-m.clientLeft;return{x:i,y:p}}k=q;while(k&&k!=l&&k.nodeType){i+=k.offsetLeft||0;p+=k.offsetTop||0;k=k.offsetParent}k=q.parentNode;while(k&&k!=l&&k.nodeType){i-=k.scrollLeft||0;p-=k.scrollTop||0;k=k.parentNode}}return{x:i,y:p}},parseStyle:function(i){return this.styles.parse(i)},serializeStyle:function(j,i){return this.styles.serialize(j,i)},addStyle:function(j){var k=this.doc,i;styleElm=k.getElementById("mceDefaultStyles");if(!styleElm){styleElm=k.createElement("style"),styleElm.id="mceDefaultStyles";styleElm.type="text/css";i=k.getElementsByTagName("head")[0];if(i.firstChild){i.insertBefore(styleElm,i.firstChild)}else{i.appendChild(styleElm)}}if(styleElm.styleSheet){styleElm.styleSheet.cssText+=j}else{styleElm.appendChild(k.createTextNode(j))}},loadCSS:function(i){var k=this,l=k.doc,j;if(!i){i=""}j=l.getElementsByTagName("head")[0];g(i.split(","),function(m){var n;if(k.files[m]){return}k.files[m]=true;n=k.create("link",{rel:"stylesheet",href:e._addVer(m)});if(b&&!e.isIE11&&l.documentMode&&l.recalc){n.onload=function(){if(l.recalc){l.recalc()}n.onload=null}}j.appendChild(n)})},addClass:function(i,j){return this.run(i,function(k){var l;if(!j){return 0}if(this.hasClass(k,j)){return k.className}l=this.removeClass(k,j);return k.className=(l!=""?(l+" "):"")+j})},removeClass:function(k,l){var i=this,j;return i.run(k,function(n){var m;if(i.hasClass(n,l)){if(!j){j=new RegExp("(^|\\s+)"+l+"(\\s+|$)","g")}m=n.className.replace(j," ");m=e.trim(m!=" "?m:"");n.className=m;if(!m){n.removeAttribute("class");n.removeAttribute("className")}return m}return n.className})},hasClass:function(j,i){j=this.get(j);if(!j||!i){return false}return(" "+j.className+" ").indexOf(" "+i+" ")!==-1},show:function(i){return this.setStyle(i,"display","block")},hide:function(i){return this.setStyle(i,"display","none")},isHidden:function(i){i=this.get(i);return !i||i.style.display=="none"||this.getStyle(i,"display")=="none"},uniqueId:function(i){return(!i?"mce_":i)+(this.counter++)},setHTML:function(k,j){var i=this;return i.run(k,function(m){if(b){while(m.firstChild){m.removeChild(m.firstChild)}try{m.innerHTML="
"+j;m.removeChild(m.firstChild)}catch(l){var n=i.create("div");n.innerHTML="
"+j;g(e.grep(n.childNodes),function(p,o){if(o&&m.canHaveHTML){m.appendChild(p)}})}}else{m.innerHTML=j}return j})},getOuterHTML:function(k){var j,i=this;k=i.get(k);if(!k){return null}if(k.nodeType===1&&i.hasOuterHTML){return k.outerHTML}j=(k.ownerDocument||i.doc).createElement("body");j.appendChild(k.cloneNode(true));return j.innerHTML},setOuterHTML:function(l,j,m){var i=this;function k(p,o,r){var s,q;q=r.createElement("body");q.innerHTML=o;s=q.lastChild;while(s){i.insertAfter(s.cloneNode(true),p);s=s.previousSibling}i.remove(p)}return this.run(l,function(o){o=i.get(o);if(o.nodeType==1){m=m||o.ownerDocument||i.doc;if(b){try{if(b&&o.nodeType==1){o.outerHTML=j}else{k(o,j,m)}}catch(n){k(o,j,m)}}else{k(o,j,m)}}})},decode:h.decode,encode:h.encodeAllRaw,insertAfter:function(i,j){j=this.get(j);return this.run(i,function(l){var k,m;k=j.parentNode;m=j.nextSibling;if(m){k.insertBefore(l,m)}else{k.appendChild(l)}return l})},replace:function(m,l,i){var j=this;if(d(l,"array")){m=m.cloneNode(true)}return j.run(l,function(k){if(i){g(e.grep(k.childNodes),function(n){m.appendChild(n)})}return k.parentNode.replaceChild(m,k)})},rename:function(l,i){var k=this,j;if(l.nodeName!=i.toUpperCase()){j=k.create(i);g(k.getAttribs(l),function(m){k.setAttrib(j,m.nodeName,k.getAttrib(l,m.nodeName))});k.replace(j,l,1)}return j||l},findCommonAncestor:function(k,i){var l=k,j;while(l){j=i;while(j&&l!=j){j=j.parentNode}if(l==j){break}l=l.parentNode}if(!l&&k.ownerDocument){return k.ownerDocument.documentElement}return l},toHex:function(i){var k=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(i);function j(l){l=parseInt(l,10).toString(16);return l.length>1?l:"0"+l}if(k){i="#"+j(k[1])+j(k[2])+j(k[3]);return i}return i},getClasses:function(){var n=this,j=[],m,o={},p=n.settings.class_filter,l;if(n.classes){return n.classes}function q(i){g(i.imports,function(s){q(s)});g(i.cssRules||i.rules,function(t){switch(t.type||1){case 1:if(t.selectorText){g(t.selectorText.split(","),function(r){r=r.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(r)||!/\.[\w\-]+$/.test(r)){return}l=r;r=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",r);if(p&&!(r=p(r,l))){return}if(!o[r]){j.push({"class":r});o[r]=1}})}break;case 3:try{q(t.styleSheet)}catch(s){}break}})}try{g(n.doc.styleSheets,q)}catch(k){}if(j.length>0){n.classes=j}return j},run:function(l,k,j){var i=this,m;if(i.doc&&typeof(l)==="string"){l=i.get(l)}if(!l){return false}j=j||this;if(!l.nodeType&&(l.length||l.length===0)){m=[];g(l,function(o,n){if(o){if(typeof(o)=="string"){o=i.doc.getElementById(o)}m.push(k.call(j,o,n))}});return m}return k.call(j,l)},getAttribs:function(j){var i;j=this.get(j);if(!j){return[]}if(b){i=[];if(j.nodeName=="OBJECT"){return j.attributes}if(j.nodeName==="OPTION"&&this.getAttrib(j,"selected")){i.push({specified:1,nodeName:"selected"})}j.cloneNode(false).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(k){i.push({specified:1,nodeName:k})});return i}return j.attributes},isEmpty:function(m,k){var r=this,o,n,q,j,l,p=0;m=m.firstChild;if(m){j=new e.dom.TreeWalker(m,m.parentNode);k=k||r.schema?r.schema.getNonEmptyElements():null;do{q=m.nodeType;if(q===1){if(m.getAttribute("data-mce-bogus")){continue}l=m.nodeName.toLowerCase();if(k&&k[l]){if(l==="br"){p++;continue}return false}n=r.getAttribs(m);o=m.attributes.length;while(o--){l=m.attributes[o].nodeName;if(l==="name"||l==="data-mce-bookmark"){return false}}}if(q==8){return false}if((q===3&&!a.test(m.nodeValue))){return false}}while(m=j.next())}return p<=1},destroy:function(j){var i=this;i.win=i.doc=i.root=i.events=i.frag=null;if(!j){e.removeUnload(i.destroy)}},createRng:function(){var i=this.doc;return i.createRange?i.createRange():new e.dom.Range(this)},nodeIndex:function(m,n){var i=0,k,l,j;if(m){for(k=m.nodeType,m=m.previousSibling,l=m;m;m=m.previousSibling){j=m.nodeType;if(n&&j==3){if(j==k||!m.nodeValue.length){continue}}i++;k=j}}return i},split:function(m,l,p){var q=this,i=q.createRng(),n,k,o;function j(v){var t,s=v.childNodes,u=v.nodeType;function x(A){var z=A.previousSibling&&A.previousSibling.nodeName=="SPAN";var y=A.nextSibling&&A.nextSibling.nodeName=="SPAN";return z&&y}if(u==1&&v.getAttribute("data-mce-type")=="bookmark"){return}for(t=s.length-1;t>=0;t--){j(s[t])}if(u!=9){if(u==3&&v.nodeValue.length>0){var r=e.trim(v.nodeValue).length;if(!q.isBlock(v.parentNode)||r>0||r===0&&x(v)){return}}else{if(u==1){s=v.childNodes;if(s.length==1&&s[0]&&s[0].nodeType==1&&s[0].getAttribute("data-mce-type")=="bookmark"){v.parentNode.insertBefore(s[0],v)}if(s.length||/^(br|hr|input|img)$/i.test(v.nodeName)){return}}}q.remove(v)}return v}if(m&&l){i.setStart(m.parentNode,q.nodeIndex(m));i.setEnd(l.parentNode,q.nodeIndex(l));n=i.extractContents();i=q.createRng();i.setStart(l.parentNode,q.nodeIndex(l)+1);i.setEnd(m.parentNode,q.nodeIndex(m)+1);k=i.extractContents();o=m.parentNode;o.insertBefore(j(n),m);if(p){o.replaceChild(p,l)}else{o.insertBefore(l,m)}o.insertBefore(j(k),m);q.remove(m);return p||l}},bind:function(l,i,k,j){return this.events.add(l,i,k,j||this)},unbind:function(k,i,j){return this.events.remove(k,i,j)},fire:function(k,j,i){return this.events.fire(k,j,i)},getContentEditable:function(j){var i;if(j.nodeType!=1){return null}i=j.getAttribute("data-mce-contenteditable");if(i&&i!=="inherit"){return i}return j.contentEditable!=="inherit"?j.contentEditable:null},_findSib:function(l,i,j){var k=this,m=i;if(l){if(d(m,"string")){m=function(n){return k.is(n,i)}}for(l=l[j];l;l=l[j]){if(m(l)){return l}}}return null},_isRes:function(i){return/^(top|left|bottom|right|width|height)/i.test(i)||/;\s*(top|left|bottom|right|width|height)/i.test(i)}});e.DOM=new e.dom.DOMUtils(document,{process_html:0})})(tinymce);(function(a){function b(c){var O=this,e=c.doc,U=0,F=1,j=2,E=true,S=false,W="startOffset",h="startContainer",Q="endContainer",A="endOffset",k=tinymce.extend,n=c.nodeIndex;k(O,{startContainer:e,startOffset:0,endContainer:e,endOffset:0,collapsed:E,commonAncestorContainer:e,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:q,setEnd:s,setStartBefore:g,setStartAfter:J,setEndBefore:K,setEndAfter:u,collapse:B,selectNode:y,selectNodeContents:G,compareBoundaryPoints:v,deleteContents:p,extractContents:I,cloneContents:d,insertNode:D,surroundContents:N,cloneRange:L,toStringIE:T});function x(){return e.createDocumentFragment()}function q(X,t){C(E,X,t)}function s(X,t){C(S,X,t)}function g(t){q(t.parentNode,n(t))}function J(t){q(t.parentNode,n(t)+1)}function K(t){s(t.parentNode,n(t))}function u(t){s(t.parentNode,n(t)+1)}function B(t){if(t){O[Q]=O[h];O[A]=O[W]}else{O[h]=O[Q];O[W]=O[A]}O.collapsed=E}function y(t){g(t);u(t)}function G(t){q(t,0);s(t,t.nodeType===1?t.childNodes.length:t.nodeValue.length)}function v(aa,t){var ad=O[h],Y=O[W],ac=O[Q],X=O[A],ab=t.startContainer,af=t.startOffset,Z=t.endContainer,ae=t.endOffset;if(aa===0){return H(ad,Y,ab,af)}if(aa===1){return H(ac,X,ab,af)}if(aa===2){return H(ac,X,Z,ae)}if(aa===3){return H(ad,Y,Z,ae)}}function p(){l(j)}function I(){return l(U)}function d(){return l(F)}function D(aa){var X=this[h],t=this[W],Z,Y;if((X.nodeType===3||X.nodeType===4)&&X.nodeValue){if(!t){X.parentNode.insertBefore(aa,X)}else{if(t>=X.nodeValue.length){c.insertAfter(aa,X)}else{Z=X.splitText(t);X.parentNode.insertBefore(aa,Z)}}}else{if(X.childNodes.length>0){Y=X.childNodes[t]}if(Y){X.insertBefore(aa,Y)}else{X.appendChild(aa)}}}function N(X){var t=O.extractContents();O.insertNode(X);X.appendChild(t);O.selectNode(X)}function L(){return k(new b(c),{startContainer:O[h],startOffset:O[W],endContainer:O[Q],endOffset:O[A],collapsed:O.collapsed,commonAncestorContainer:O.commonAncestorContainer})}function P(t,X){var Y;if(t.nodeType==3){return t}if(X<0){return t}Y=t.firstChild;while(Y&&X>0){--X;Y=Y.nextSibling}if(Y){return Y}return t}function m(){return(O[h]==O[Q]&&O[W]==O[A])}function H(Z,ab,X,aa){var ac,Y,t,ad,af,ae;if(Z==X){if(ab==aa){return 0}if(ab0){O.collapse(X)}}else{O.collapse(X)}O.collapsed=m();O.commonAncestorContainer=c.findCommonAncestor(O[h],O[Q])}function l(ad){var ac,Z=0,af=0,X,ab,Y,aa,t,ae;if(O[h]==O[Q]){return f(ad)}for(ac=O[Q],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[h]){return r(ac,ad)}++Z}for(ac=O[h],X=ac.parentNode;X;ac=X,X=X.parentNode){if(X==O[Q]){return V(ac,ad)}++af}ab=af-Z;Y=O[h];while(ab>0){Y=Y.parentNode;ab--}aa=O[Q];while(ab<0){aa=aa.parentNode;ab++}for(t=Y.parentNode,ae=aa.parentNode;t!=ae;t=t.parentNode,ae=ae.parentNode){Y=t;aa=ae}return o(Y,aa,ad)}function f(ac){var ae,af,t,Y,Z,ad,aa,X,ab;if(ac!=j){ae=x()}if(O[W]==O[A]){return ae}if(O[h].nodeType==3){af=O[h].nodeValue;t=af.substring(O[W],O[A]);if(ac!=F){Y=O[h];X=O[W];ab=O[A]-O[W];if(X===0&&ab>=Y.nodeValue.length-1){Y.parentNode.removeChild(Y)}else{Y.deleteData(X,ab)}O.collapse(E)}if(ac==j){return}if(t.length>0){ae.appendChild(e.createTextNode(t))}return ae}Y=P(O[h],O[W]);Z=O[A]-O[W];while(Y&&Z>0){ad=Y.nextSibling;aa=z(Y,ac);if(ae){ae.appendChild(aa)}--Z;Y=ad}if(ac!=F){O.collapse(E)}return ae}function r(ad,aa){var ac,ab,X,t,Z,Y;if(aa!=j){ac=x()}ab=i(ad,aa);if(ac){ac.appendChild(ab)}X=n(ad);t=X-O[W];if(t<=0){if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}ab=ad.previousSibling;while(t>0){Z=ab.previousSibling;Y=z(ab,aa);if(ac){ac.insertBefore(Y,ac.firstChild)}--t;ab=Z}if(aa!=F){O.setEndBefore(ad);O.collapse(S)}return ac}function V(ab,aa){var ad,X,ac,t,Z,Y;if(aa!=j){ad=x()}ac=R(ab,aa);if(ad){ad.appendChild(ac)}X=n(ab);++X;t=O[A]-X;ac=ab.nextSibling;while(ac&&t>0){Z=ac.nextSibling;Y=z(ac,aa);if(ad){ad.appendChild(Y)}--t;ac=Z}if(aa!=F){O.setStartAfter(ab);O.collapse(E)}return ad}function o(ab,t,ae){var Y,ag,aa,ac,ad,X,af,Z;if(ae!=j){ag=x()}Y=R(ab,ae);if(ag){ag.appendChild(Y)}aa=ab.parentNode;ac=n(ab);ad=n(t);++ac;X=ad-ac;af=ab.nextSibling;while(X>0){Z=af.nextSibling;Y=z(af,ae);if(ag){ag.appendChild(Y)}af=Z;--X}Y=i(t,ae);if(ag){ag.appendChild(Y)}if(ae!=F){O.setStartAfter(ab);O.collapse(E)}return ag}function i(ac,ad){var Y=P(O[Q],O[A]-1),ae,ab,aa,t,X,Z=Y!=O[Q];if(Y==ac){return M(Y,Z,S,ad)}ae=Y.parentNode;ab=M(ae,S,S,ad);while(ae){while(Y){aa=Y.previousSibling;t=M(Y,Z,S,ad);if(ad!=j){ab.insertBefore(t,ab.firstChild)}Z=E;Y=aa}if(ae==ac){return ab}Y=ae.previousSibling;ae=ae.parentNode;X=M(ae,S,S,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function R(ac,ad){var Z=P(O[h],O[W]),aa=Z!=O[h],ae,ab,Y,t,X;if(Z==ac){return M(Z,aa,E,ad)}ae=Z.parentNode;ab=M(ae,S,E,ad);while(ae){while(Z){Y=Z.nextSibling;t=M(Z,aa,E,ad);if(ad!=j){ab.appendChild(t)}aa=E;Z=Y}if(ae==ac){return ab}Z=ae.nextSibling;ae=ae.parentNode;X=M(ae,S,E,ad);if(ad!=j){X.appendChild(ab)}ab=X}}function M(t,aa,ad,ae){var Z,Y,ab,X,ac;if(aa){return z(t,ae)}if(t.nodeType==3){Z=t.nodeValue;if(ad){X=O[W];Y=Z.substring(X);ab=Z.substring(0,X)}else{X=O[A];Y=Z.substring(0,X);ab=Z.substring(X)}if(ae!=F){t.nodeValue=ab}if(ae==j){return}ac=c.clone(t,S);ac.nodeValue=Y;return ac}if(ae==j){return}return c.clone(t,S)}function z(X,t){if(t!=j){return t==F?c.clone(X,E):X}X.parentNode.removeChild(X)}function T(){return c.create("body",null,d()).outerText}return O}a.Range=b;b.prototype.toString=function(){return this.toStringIE()}})(tinymce.dom);(function(){function a(d){var b=this,h=d.dom,c=true,f=false;function e(i,j){var k,t=0,q,n,m,l,o,r,p=-1,s;k=i.duplicate();k.collapse(j);s=k.parentElement();if(s.ownerDocument!==d.dom.doc){return}while(s.contentEditable==="false"){s=s.parentNode}if(!s.hasChildNodes()){return{node:s,inside:1}}m=s.children;q=m.length-1;while(t<=q){r=Math.floor((t+q)/2);l=m[r];k.moveToElementText(l);p=k.compareEndPoints(j?"StartToStart":"EndToEnd",i);if(p>0){q=r-1}else{if(p<0){t=r+1}else{return{node:l}}}}if(p<0){if(!l){k.moveToElementText(s);k.collapse(true);l=s;n=true}else{k.collapse(false)}o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",1)===0||s!=k.parentElement()){break}o++}}else{k.collapse(true);o=0;while(k.compareEndPoints(j?"StartToStart":"StartToEnd",i)!==0){if(k.move("character",-1)===0||s!=k.parentElement()){break}o++}}return{node:l,position:p,offset:o,inside:n}}function g(){var i=d.getRng(),r=h.createRng(),l,k,p,q,m,j;l=i.item?i.item(0):i.parentElement();if(l.ownerDocument!=h.doc){return r}k=d.isCollapsed();if(i.item){r.setStart(l.parentNode,h.nodeIndex(l));r.setEnd(r.startContainer,r.startOffset+1);return r}function o(A){var u=e(i,A),s,y,z=0,x,v,t;s=u.node;y=u.offset;if(u.inside&&!s.hasChildNodes()){r[A?"setStart":"setEnd"](s,0);return}if(y===v){r[A?"setStartBefore":"setEndAfter"](s);return}if(u.position<0){x=u.inside?s.firstChild:s.nextSibling;if(!x){r[A?"setStartAfter":"setEndAfter"](s);return}if(!y){if(x.nodeType==3){r[A?"setStart":"setEnd"](x,0)}else{r[A?"setStartBefore":"setEndBefore"](x)}return}while(x){t=x.nodeValue;z+=t.length;if(z>=y){s=x;z-=y;z=t.length-z;break}x=x.nextSibling}}else{x=s.previousSibling;if(!x){return r[A?"setStartBefore":"setEndBefore"](s)}if(!y){if(s.nodeType==3){r[A?"setStart":"setEnd"](x,s.nodeValue.length)}else{r[A?"setStartAfter":"setEndAfter"](x)}return}while(x){z+=x.nodeValue.length;if(z>=y){s=x;z-=y;break}x=x.previousSibling}}r[A?"setStart":"setEnd"](s,z)}try{o(true);if(!k){o()}}catch(n){if(n.number==-2147024809){m=b.getBookmark(2);p=i.duplicate();p.collapse(true);l=p.parentElement();if(!k){p=i.duplicate();p.collapse(false);q=p.parentElement();q.innerHTML=q.innerHTML}l.innerHTML=l.innerHTML;b.moveToBookmark(m);i=d.getRng();o(true);if(!k){o()}}else{throw n}}return r}this.getBookmark=function(m){var j=d.getRng(),o,i,l={};function n(u){var t,p,s,r,q=[];t=u.parentNode;p=h.getRoot().parentNode;while(t!=p&&t.nodeType!==9){s=t.children;r=s.length;while(r--){if(u===s[r]){q.push(r);break}}u=t;t=t.parentNode}return q}function k(q){var p;p=e(j,q);if(p){return{position:p.position,offset:p.offset,indexes:n(p.node),inside:p.inside}}}if(m===2){if(!j.item){l.start=k(true);if(!d.isCollapsed()){l.end=k()}}else{l.start={ctrl:true,indexes:n(j.item(0))}}}return l};this.moveToBookmark=function(k){var j,i=h.doc.body;function m(o){var r,q,n,p;r=h.getRoot();for(q=o.length-1;q>=0;q--){p=r.children;n=o[q];if(n<=p.length-1){r=p[n]}}return r}function l(r){var n=k[r?"start":"end"],q,p,o;if(n){q=n.position>0;p=i.createTextRange();p.moveToElementText(m(n.indexes));offset=n.offset;if(offset!==o){p.collapse(n.inside||q);p.moveStart("character",q?-offset:offset)}else{p.collapse(r)}j.setEndPoint(r?"StartToStart":"EndToStart",p);if(r){j.collapse(true)}}}if(k.start){if(k.start.ctrl){j=i.createControlRange();j.addElement(m(k.start.indexes));j.select()}else{j=i.createTextRange();l(true);l();j.select()}}};this.addRange=function(i){var n,l,k,p,v,q,t,s=d.dom.doc,m=s.body,r,u;function j(C){var y,B,x,A,z;x=h.create("a");y=C?k:v;B=C?p:q;A=n.duplicate();if(y==s||y==s.documentElement){y=m;B=0}if(y.nodeType==3){y.parentNode.insertBefore(x,y);A.moveToElementText(x);A.moveStart("character",B);h.remove(x);n.setEndPoint(C?"StartToStart":"EndToEnd",A)}else{z=y.childNodes;if(z.length){if(B>=z.length){h.insertAfter(x,z[z.length-1])}else{y.insertBefore(x,z[B])}A.moveToElementText(x)}else{if(y.canHaveHTML){y.innerHTML="\uFEFF";x=y.firstChild;A.moveToElementText(x);A.collapse(f)}}n.setEndPoint(C?"StartToStart":"EndToEnd",A);h.remove(x)}}k=i.startContainer;p=i.startOffset;v=i.endContainer;q=i.endOffset;n=m.createTextRange();if(k==v&&k.nodeType==1){if(p==q&&!k.hasChildNodes()){if(k.canHaveHTML){t=k.previousSibling;if(t&&!t.hasChildNodes()&&h.isBlock(t)){t.innerHTML="\uFEFF"}else{t=null}k.innerHTML="\uFEFF\uFEFF";n.moveToElementText(k.lastChild);n.select();h.doc.selection.clear();k.innerHTML="";if(t){t.innerHTML=""}return}else{p=h.nodeIndex(k);k=k.parentNode}}if(p==q-1){try{u=k.childNodes[p];l=m.createControlRange();l.addElement(u);l.select();r=d.getRng();if(r.item&&u===r.item(0)){return}}catch(o){}}}j(true);j();n.select()};this.getRangeAt=g}tinymce.dom.TridentSelection=a})();(function(){var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache",o=0,r=Object.prototype.toString,h=false,g=true,q=/\\/g,u=/\r\n/g,x=/\W/;[0,0].sort(function(){g=false;return 0});var d=function(C,e,F,G){F=F||[];e=e||document;var I=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!C||typeof C!=="string"){return F}var z,K,N,y,J,M,L,E,B=true,A=d.isXML(e),D=[],H=C;do{n.exec("");z=n.exec(H);if(z){H=z[3];D.push(z[1]);if(z[2]){y=z[3];break}}}while(z);if(D.length>1&&j.exec(C)){if(D.length===2&&k.relative[D[0]]){K=s(D[0]+D[1],e,G)}else{K=k.relative[D[0]]?[e]:d(D.shift(),e);while(D.length){C=D.shift();if(k.relative[C]){C+=D.shift()}K=s(C,K,G)}}}else{if(!G&&D.length>1&&e.nodeType===9&&!A&&k.match.ID.test(D[0])&&!k.match.ID.test(D[D.length-1])){J=d.find(D.shift(),e,A);e=J.expr?d.filter(J.expr,J.set)[0]:J.set[0]}if(e){J=G?{expr:D.pop(),set:l(G)}:d.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&e.parentNode?e.parentNode:e,A);K=J.expr?d.filter(J.expr,J.set):J.set;if(D.length>0){N=l(K)}else{B=false}while(D.length){M=D.pop();L=M;if(!k.relative[M]){M=""}else{L=D.pop()}if(L==null){L=e}k.relative[M](N,L,A)}}else{N=D=[]}}if(!N){N=K}if(!N){d.error(M||C)}if(r.call(N)==="[object Array]"){if(!B){F.push.apply(F,N)}else{if(e&&e.nodeType===1){for(E=0;N[E]!=null;E++){if(N[E]&&(N[E]===true||N[E].nodeType===1&&d.contains(e,N[E]))){F.push(K[E])}}}else{for(E=0;N[E]!=null;E++){if(N[E]&&N[E].nodeType===1){F.push(K[E])}}}}}else{l(N,F)}if(y){d(y,I,F,G);d.uniqueSort(F)}return F};d.uniqueSort=function(y){if(p){h=g;y.sort(p);if(h){for(var e=1;e0};d.find=function(E,e,F){var D,z,B,A,C,y;if(!E){return[]}for(z=0,B=k.order.length;z":function(D,y){var C,B=typeof y==="string",z=0,e=D.length;if(B&&!x.test(y)){y=y.toLowerCase();for(;z=0)){if(!z){e.push(C)}}else{if(z){y[B]=false}}}}return false},ID:function(e){return e[1].replace(q,"")},TAG:function(y,e){return y[1].replace(q,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){d.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var y=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(y[1]+(y[2]||1))-0;e[3]=y[3]-0}else{if(e[2]){d.error(e[0])}}e[0]=o++;return e},ATTR:function(B,y,z,e,C,D){var A=B[1]=B[1].replace(q,"");if(!D&&k.attrMap[A]){B[1]=k.attrMap[A]}B[4]=(B[4]||B[5]||"").replace(q,"");if(B[2]==="~="){B[4]=" "+B[4]+" "}return B},PSEUDO:function(B,y,z,e,C){if(B[1]==="not"){if((n.exec(B[3])||"").length>1||/^\w/.test(B[3])){B[3]=d(B[3],null,null,y)}else{var A=d.filter(B[3],y,z,true^C);if(!z){e.push.apply(e,A)}return false}}else{if(k.match.POS.test(B[0])||k.match.CHILD.test(B[0])){return true}}return B},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(z,y,e){return !!d(e[3],z).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(z){var e=z.getAttribute("type"),y=z.type;return z.nodeName.toLowerCase()==="input"&&"text"===y&&(e===y||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===y.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(y){var e=y.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===y.type},button:function(y){var e=y.nodeName.toLowerCase();return e==="input"&&"button"===y.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(y,e){return e===0},last:function(z,y,e,A){return y===A.length-1},even:function(y,e){return e%2===0},odd:function(y,e){return e%2===1},lt:function(z,y,e){return ye[3]-0},nth:function(z,y,e){return e[3]-0===y},eq:function(z,y,e){return e[3]-0===y}},filter:{PSEUDO:function(z,E,D,F){var e=E[1],y=k.filters[e];if(y){return y(z,D,E,F)}else{if(e==="contains"){return(z.textContent||z.innerText||b([z])||"").indexOf(E[3])>=0}else{if(e==="not"){var A=E[3];for(var C=0,B=A.length;C=0)}}},ID:function(y,e){return y.nodeType===1&&y.getAttribute("id")===e},TAG:function(y,e){return(e==="*"&&y.nodeType===1)||!!y.nodeName&&y.nodeName.toLowerCase()===e},CLASS:function(y,e){return(" "+(y.className||y.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(C,A){var z=A[1],e=d.attr?d.attr(C,z):k.attrHandle[z]?k.attrHandle[z](C):C[z]!=null?C[z]:C.getAttribute(z),D=e+"",B=A[2],y=A[4];return e==null?B==="!=":!B&&d.attr?e!=null:B==="="?D===y:B==="*="?D.indexOf(y)>=0:B==="~="?(" "+D+" ").indexOf(y)>=0:!y?D&&e!==false:B==="!="?D!==y:B==="^="?D.indexOf(y)===0:B==="$="?D.substr(D.length-y.length)===y:B==="|="?D===y||D.substr(0,y.length+1)===y+"-":false},POS:function(B,y,z,C){var e=y[2],A=k.setFilters[e];if(A){return A(B,z,y,C)}}}};var j=k.match.POS,c=function(y,e){return"\\"+(e-0+1)};for(var f in k.match){k.match[f]=new RegExp(k.match[f].source+(/(?![^\[]*\])(?![^\(]*\))/.source));k.leftMatch[f]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[f].source.replace(/\\(\d+)/g,c))}k.match.globalPOS=j;var l=function(y,e){y=Array.prototype.slice.call(y,0);if(e){e.push.apply(e,y);return e}return y};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(v){l=function(B,A){var z=0,y=A||[];if(r.call(B)==="[object Array]"){Array.prototype.push.apply(y,B)}else{if(typeof B.length==="number"){for(var e=B.length;z ";e.insertBefore(y,e.firstChild);if(document.getElementById(z)){k.find.ID=function(B,C,D){if(typeof C.getElementById!=="undefined"&&!D){var A=C.getElementById(B[1]);return A?A.id===B[1]||typeof A.getAttributeNode!=="undefined"&&A.getAttributeNode("id").nodeValue===B[1]?[A]:undefined:[]}};k.filter.ID=function(C,A){var B=typeof C.getAttributeNode!=="undefined"&&C.getAttributeNode("id");return C.nodeType===1&&B&&B.nodeValue===A}}e.removeChild(y);e=y=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){k.find.TAG=function(y,C){var B=C.getElementsByTagName(y[1]);if(y[1]==="*"){var A=[];for(var z=0;B[z];z++){if(B[z].nodeType===1){A.push(B[z])}}B=A}return B}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){k.attrHandle.href=function(y){return y.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var e=d,A=document.createElement("div"),z="__sizzle__";A.innerHTML="";if(A.querySelectorAll&&A.querySelectorAll(".TEST").length===0){return}d=function(L,C,G,K){C=C||document;if(!K&&!d.isXML(C)){var J=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(L);if(J&&(C.nodeType===1||C.nodeType===9)){if(J[1]){return l(C.getElementsByTagName(L),G)}else{if(J[2]&&k.find.CLASS&&C.getElementsByClassName){return l(C.getElementsByClassName(J[2]),G)}}}if(C.nodeType===9){if(L==="body"&&C.body){return l([C.body],G)}else{if(J&&J[3]){var F=C.getElementById(J[3]);if(F&&F.parentNode){if(F.id===J[3]){return l([F],G)}}else{return l([],G)}}}try{return l(C.querySelectorAll(L),G)}catch(H){}}else{if(C.nodeType===1&&C.nodeName.toLowerCase()!=="object"){var D=C,E=C.getAttribute("id"),B=E||z,N=C.parentNode,M=/^\s*[+~]/.test(L);if(!E){C.setAttribute("id",B)}else{B=B.replace(/'/g,"\\$&")}if(M&&N){C=C.parentNode}try{if(!M||N){return l(C.querySelectorAll("[id='"+B+"'] "+L),G)}}catch(I){}finally{if(!E){D.removeAttribute("id")}}}}}return e(L,C,G,K)};for(var y in e){d[y]=e[y]}A=null})()}(function(){var e=document.documentElement,z=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(z){var B=!z.call(document.createElement("div"),"div"),y=false;try{z.call(document.documentElement,"[test!='']:sizzle")}catch(A){y=true}d.matchesSelector=function(D,F){F=F.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!d.isXML(D)){try{if(y||!k.match.PSEUDO.test(F)&&!/!=/.test(F)){var C=z.call(D,F);if(C||!B||D.document&&D.document.nodeType!==11){return C}}}catch(E){}}return d(F,null,null,[D]).length>0}}})();(function(){var e=document.createElement("div");e.innerHTML="";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}k.order.splice(1,0,"CLASS");k.find.CLASS=function(y,z,A){if(typeof z.getElementsByClassName!=="undefined"&&!A){return z.getElementsByClassName(y[1])}};e=null})();function a(y,D,C,G,E,F){for(var A=0,z=G.length;A0){B=e;break}}}e=e[y]}G[A]=B}}}if(document.documentElement.contains){d.contains=function(y,e){return y!==e&&(y.contains?y.contains(e):true)}}else{if(document.documentElement.compareDocumentPosition){d.contains=function(y,e){return !!(y.compareDocumentPosition(e)&16)}}else{d.contains=function(){return false}}}d.isXML=function(e){var y=(e?e.ownerDocument||e:0).documentElement;return y?y.nodeName!=="HTML":false};var s=function(z,e,D){var C,E=[],B="",F=e.nodeType?[e]:e;while((C=k.match.PSEUDO.exec(z))){B+=C[0];z=z.replace(k.match.PSEUDO,"")}z=k.relative[z]?z+"*":z;for(var A=0,y=F.length;A"+(i.item?i.item(0).outerHTML:i.htmlText);m.removeChild(m.firstChild)}else{m.innerHTML=i.toString()}}if(/^\s/.test(m.innerHTML)){j=" "}if(/\s+$/.test(m.innerHTML)){l=" "}h.getInner=true;h.content=g.isCollapsed()?"":j+g.serializer.serialize(m,h)+l;g.onGetContent.dispatch(g,h);return h.content},setContent:function(h,j){var o=this,g=o.getRng(),k,l=o.win.document,n,m;j=j||{format:"html"};j.set=true;h=j.content=h;if(!j.no_events){o.onBeforeSetContent.dispatch(o,j)}h=j.content;if(g.insertNode){h+='_';if(g.startContainer==l&&g.endContainer==l){l.body.innerHTML=h}else{g.deleteContents();if(l.body.childNodes.length===0){l.body.innerHTML=h}else{if(g.createContextualFragment){g.insertNode(g.createContextualFragment(h))}else{n=l.createDocumentFragment();m=l.createElement("div");n.appendChild(m);m.outerHTML=h;g.insertNode(n)}}}k=o.dom.get("__caret");g=l.createRange();g.setStartBefore(k);g.setEndBefore(k);o.setRng(g);o.dom.remove("__caret");try{o.setRng(g)}catch(i){}}else{if(g.item){l.execCommand("Delete",false,null);g=o.getRng()}if(/^\s+/.test(h)){g.pasteHTML('_'+h);o.dom.remove("__mce_tmp")}else{g.pasteHTML(h)}}if(!j.no_events){o.onSetContent.dispatch(o,j)}},getStart:function(){var i=this,h=i.getRng(),j,g,l,k;if(h.duplicate||h.item){if(h.item){return h.item(0)}l=h.duplicate();l.collapse(1);j=l.parentElement();if(j.ownerDocument!==i.dom.doc){j=i.dom.getRoot()}g=k=h.parentElement();while(k=k.parentNode){if(k==j){j=g;break}}return j}else{j=h.startContainer;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[Math.min(j.childNodes.length-1,h.startOffset)]}if(j&&j.nodeType==3){return j.parentNode}return j}},getEnd:function(){var h=this,g=h.getRng(),j,i;if(g.duplicate||g.item){if(g.item){return g.item(0)}g=g.duplicate();g.collapse(0);j=g.parentElement();if(j.ownerDocument!==h.dom.doc){j=h.dom.getRoot()}if(j&&j.nodeName=="BODY"){return j.lastChild||j}return j}else{j=g.endContainer;i=g.endOffset;if(j.nodeType==1&&j.hasChildNodes()){j=j.childNodes[i>0?i-1:i]}if(j&&j.nodeType==3){return j.parentNode}return j}},getBookmark:function(s,v){var y=this,n=y.dom,h,k,j,o,i,p,q,m="\uFEFF",x;function g(z,A){var t=0;e(n.select(z),function(C,B){if(C==A){t=B}});return t}function u(t){function z(E){var A,D,C,B=E?"start":"end";A=t[B+"Container"];D=t[B+"Offset"];if(A.nodeType==1&&A.nodeName=="TR"){C=A.childNodes;A=C[Math.min(E?D:D-1,C.length-1)];if(A){D=E?0:A.childNodes.length;t["set"+(E?"Start":"End")](A,D)}}}z(true);z();return t}function l(){var z=y.getRng(true),t=n.getRoot(),A={};function B(E,J){var D=E[J?"startContainer":"endContainer"],I=E[J?"startOffset":"endOffset"],C=[],F,H,G=0;if(D.nodeType==3){if(v){for(F=D.previousSibling;F&&F.nodeType==3;F=F.previousSibling){I+=F.nodeValue.length}}C.push(I)}else{H=D.childNodes;if(I>=H.length&&H.length){G=1;I=Math.max(0,H.length-1)}C.push(y.dom.nodeIndex(H[I],v)+G)}for(;D&&D!=t;D=D.parentNode){C.push(y.dom.nodeIndex(D,v))}return C}A.start=B(z,true);if(!y.isCollapsed()){A.end=B(z)}return A}if(s==2){if(y.tridentSel){return y.tridentSel.getBookmark(s)}return l()}if(s){h=y.getRng();if(h.setStart){h={startContainer:h.startContainer,startOffset:h.startOffset,endContainer:h.endContainer,endOffset:h.endOffset}}return{rng:h}}h=y.getRng();j=n.uniqueId();o=tinyMCE.activeEditor.selection.isCollapsed();x="overflow:hidden;line-height:0px";if(h.duplicate||h.item){if(!h.item){k=h.duplicate();try{h.collapse();h.pasteHTML(''+m+"");if(!o){k.collapse(false);h.moveToElementText(k.parentElement());if(h.compareEndPoints("StartToEnd",k)===0){k.move("character",-1)}k.pasteHTML(''+m+"")}}catch(r){return null}}else{p=h.item(0);i=p.nodeName;return{name:i,index:g(i,p)}}}else{p=y.getNode();i=p.nodeName;if(i=="IMG"){return{name:i,index:g(i,p)}}k=u(h.cloneRange());if(!o){k.collapse(false);k.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_end",style:x},m))}h=u(h);h.collapse(true);h.insertNode(n.create("span",{"data-mce-type":"bookmark",id:j+"_start",style:x},m))}y.moveToBookmark({id:j,keep:1});return{id:j}},moveToBookmark:function(q){var v=this,n=v.dom,l,j,g,i,u,k,x,r,s;function h(C){var t=q[C?"start":"end"],z,A,B,y;if(t){B=t[0];for(A=u,z=t.length-1;z>=1;z--){y=A.childNodes;if(t[z]>y.length-1){return}A=y[t[z]]}if(A.nodeType===3){B=Math.min(t[0],A.nodeValue.length)}if(A.nodeType===1){B=Math.min(t[0],A.childNodes.length)}if(C){g.setStart(A,B)}else{g.setEnd(A,B)}}return true}function m(D){var y=n.get(q.id+"_"+D),C,t,A,B,z=q.keep;if(y){C=y.parentNode;if(D=="start"){if(!z){t=n.nodeIndex(y)}else{C=y.firstChild;t=1}k=x=C;r=s=t}else{if(!z){t=n.nodeIndex(y)}else{C=y.firstChild;t=1}x=C;s=t}if(!z){B=y.previousSibling;A=y.nextSibling;e(d.grep(y.childNodes),function(E){if(E.nodeType==3){E.nodeValue=E.nodeValue.replace(/\uFEFF/g,"")}});while(y=n.get(q.id+"_"+D)){n.remove(y,1)}if(B&&A&&B.nodeType==A.nodeType&&B.nodeType==3&&!d.isOpera){t=B.nodeValue.length;B.appendData(A.nodeValue);n.remove(A);if(D=="start"){k=x=B;r=s=t}else{x=B;s=t}}}}}function o(t){if(n.isBlock(t)&&!t.innerHTML&&!b){t.innerHTML='
'}return t}if(q){if(q.start){g=n.createRng();u=n.getRoot();if(v.tridentSel){return v.tridentSel.moveToBookmark(q)}if(h(true)&&h()){v.setRng(g)}}else{if(q.id){m("start");m("end");if(k){g=n.createRng();g.setStart(o(k),r);g.setEnd(o(x),s);v.setRng(g)}}else{if(q.name){v.select(n.select(q.name)[q.index])}else{if(q.rng){g=q.rng;if(g.startContainer){i=v.dom.createRng();try{i.setStart(g.startContainer,g.startOffset);i.setEnd(g.endContainer,g.endOffset)}catch(p){}g=i}v.setRng(g)}}}}}},select:function(l,k){var j=this,m=j.dom,h=m.createRng(),g;function i(n,p){var o=new a(n,n);do{if(n.nodeType==3&&d.trim(n.nodeValue).length!==0){if(p){h.setStart(n,0)}else{h.setEnd(n,n.nodeValue.length)}return}if(n.nodeName=="BR"){if(p){h.setStartBefore(n)}else{h.setEndBefore(n)}return}}while(n=(p?o.next():o.prev()))}if(l){g=m.nodeIndex(l);h.setStart(l.parentNode,g);h.setEnd(l.parentNode,g+1);if(k){i(l,1);i(l)}j.setRng(h)}return l},isCollapsed:function(){var g=this,i=g.getRng(),h=g.getSel();if(!i||i.item){return false}if(i.compareEndPoints){return i.compareEndPoints("StartToEnd",i)===0}return !h||i.collapsed},collapse:function(g){var i=this,h=i.getRng(),j;if(h.item){j=h.item(0);h=i.win.document.body.createTextRange();h.moveToElementText(j)}h.collapse(!!g);i.setRng(h)},getSel:function(){var h=this,g=this.win;return g.getSelection?g.getSelection():g.document.selection},getRng:function(m){var h=this,j,g,l,k=h.win.document;if(m&&h.tridentSel){return h.tridentSel.getRangeAt(0)}try{if(j=h.getSel()){g=j.rangeCount>0?j.getRangeAt(0):(j.createRange?j.createRange():k.createRange())}}catch(i){}if(d.isIE&&!d.isIE11&&g&&g.setStart&&k.selection.createRange().item){l=k.selection.createRange().item(0);g=k.createRange();g.setStartBefore(l);g.setEndAfter(l)}if(!g){g=k.createRange?k.createRange():k.body.createTextRange()}if(g.setStart&&g.startContainer.nodeType===9&&g.collapsed){l=h.dom.getRoot();g.setStart(l,0);g.setEnd(l,0)}if(h.selectedRange&&h.explicitRange){if(g.compareBoundaryPoints(g.START_TO_START,h.selectedRange)===0&&g.compareBoundaryPoints(g.END_TO_END,h.selectedRange)===0){g=h.explicitRange}else{h.selectedRange=null;h.explicitRange=null}}return g},setRng:function(k,g){var j,i=this;if(!i.tridentSel){j=i.getSel();if(j){i.explicitRange=k;try{j.removeAllRanges()}catch(h){}j.addRange(k);if(g===false&&j.extend){j.collapse(k.endContainer,k.endOffset);j.extend(k.startContainer,k.startOffset)}i.selectedRange=j.rangeCount>0?j.getRangeAt(0):null}}else{if(k.cloneRange){try{i.tridentSel.addRange(k);return}catch(h){}}try{k.select()}catch(h){}}},setNode:function(h){var g=this;g.setContent(g.dom.getOuterHTML(h));return h},getNode:function(){var i=this,h=i.getRng(),j=i.getSel(),m,l=h.startContainer,g=h.endContainer;function k(q,o){var p=q;while(q&&q.nodeType===3&&q.length===0){q=o?q.nextSibling:q.previousSibling}return q||p}if(!h){return i.dom.getRoot()}if(h.setStart){m=h.commonAncestorContainer;if(!h.collapsed){if(h.startContainer==h.endContainer){if(h.endOffset-h.startOffset<2){if(h.startContainer.hasChildNodes()){m=h.startContainer.childNodes[h.startOffset]}}}if(l.nodeType===3&&g.nodeType===3){if(l.length===h.startOffset){l=k(l.nextSibling,true)}else{l=l.parentNode}if(h.endOffset===0){g=k(g.previousSibling,false)}else{g=g.parentNode}if(l&&l===g){return l}}}if(m&&m.nodeType==3){return m.parentNode}return m}return h.item?h.item(0):h.parentElement()},getSelectedBlocks:function(p,h){var o=this,k=o.dom,m,l,i,j=[];m=k.getParent(p||o.getStart(),k.isBlock);l=k.getParent(h||o.getEnd(),k.isBlock);if(m){j.push(m)}if(m&&l&&m!=l){i=m;var g=new a(m,k.getRoot());while((i=g.next())&&i!=l){if(k.isBlock(i)){j.push(i)}}}if(l&&m!=l){j.push(l)}return j},isForward:function(){var i=this.dom,g=this.getSel(),j,h;if(!g||g.anchorNode==null||g.focusNode==null){return true}j=i.createRng();j.setStart(g.anchorNode,g.anchorOffset);j.collapse(true);h=i.createRng();h.setStart(g.focusNode,g.focusOffset);h.collapse(true);return j.compareBoundaryPoints(j.START_TO_START,h)<=0},normalize:function(){var h=this,g,m,l,j,i;function k(p){var o,r,n,s=h.dom,u=s.getRoot(),q,t,v;function y(z,A){var B=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(z=B[A?"prev":"next"]()){if(z.nodeName==="BR"){return true}}}function x(B,z){var C,A;z=z||o;C=new a(z,s.getParent(z.parentNode,s.isBlock)||u);while(q=C[B?"prev":"next"]()){if(q.nodeType===3&&q.nodeValue.length>0){o=q;r=B?q.nodeValue.length:0;m=true;return}if(s.isBlock(q)||t[q.nodeName.toLowerCase()]){return}A=q}if(l&&A){o=A;m=true;r=0}}o=g[(p?"start":"end")+"Container"];r=g[(p?"start":"end")+"Offset"];t=s.schema.getNonEmptyElements();if(o.nodeType===9){o=s.getRoot();r=0}if(o===u){if(p){q=o.childNodes[r>0?r-1:0];if(q){v=q.nodeName.toLowerCase();if(t[q.nodeName]||q.nodeName=="TABLE"){return}}}if(o.hasChildNodes()){o=o.childNodes[Math.min(!p&&r>0?r-1:r,o.childNodes.length-1)];r=0;if(o.hasChildNodes()&&!/TABLE/.test(o.nodeName)){q=o;n=new a(o,u);do{if(q.nodeType===3&&q.nodeValue.length>0){r=p?0:q.nodeValue.length;o=q;m=true;break}if(t[q.nodeName.toLowerCase()]){r=s.nodeIndex(q);o=q.parentNode;if(q.nodeName=="IMG"&&!p){r++}m=true;break}}while(q=(p?n.next():n.prev()))}}}if(l){if(o.nodeType===3&&r===0){x(true)}if(o.nodeType===1){q=o.childNodes[r];if(q&&q.nodeName==="BR"&&!y(q)&&!y(q,true)){x(true,o.childNodes[r])}}}if(p&&!l&&o.nodeType===3&&r===o.nodeValue.length){x(false)}if(m){g["set"+(p?"Start":"End")](o,r)}}if(d.isIE){return}g=h.getRng();l=g.collapsed;k(true);if(!l){k()}if(m){if(l){g.collapse(true)}h.setRng(g,h.isForward())}},selectorChanged:function(g,j){var h=this,i;if(!h.selectorChangedData){h.selectorChangedData={};i={};h.editor.onNodeChange.addToTop(function(l,k,o){var p=h.dom,m=p.getParents(o,null,p.getRoot()),n={};e(h.selectorChangedData,function(r,q){e(m,function(s){if(p.is(s,q)){if(!i[q]){e(r,function(t){t(true,{node:s,selector:q,parents:m})});i[q]=r}n[q]=r;return false}})});e(i,function(r,q){if(!n[q]){delete i[q];e(r,function(s){s(false,{node:o,selector:q,parents:m})})}})})}if(!h.selectorChangedData[g]){h.selectorChangedData[g]=[]}h.selectorChangedData[g].push(j);return h},scrollIntoView:function(k){var j,h,g=this,i=g.dom;h=i.getViewPort(g.editor.getWin());j=i.getPos(k).y;if(jh.y+h.h){g.editor.getWin().scrollTo(0,j0){p.setEndPoint("StartToStart",o)}else{p.setEndPoint("EndToEnd",o)}p.select()}}else{l()}}function l(){var p=n.selection.createRange();if(o&&!p.item&&p.compareEndPoints("StartToEnd",p)===0){o.select()}h.unbind(n,"mouseup",l);h.unbind(n,"mousemove",m);o=k=0}n.documentElement.unselectable=true;h.bind(n,["mousedown","contextmenu"],function(p){if(p.target.nodeName==="HTML"){if(k){l()}g=n.documentElement;if(g.scrollHeight>g.clientHeight){return}k=1;o=j(p.x,p.y);if(o){h.bind(n,"mouseup",l);h.bind(n,"mousemove",m);h.win.focus();o.select()}}})}})})(tinymce);(function(a){a.dom.Serializer=function(e,i,f){var h,b,d=a.isIE,g=a.each,c;if(!e.apply_source_formatting){e.indent=false}i=i||a.DOM;f=f||new a.html.Schema(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs" in e?e.remove_trailing_brs:true;h=new a.util.Dispatcher(self);b=new a.util.Dispatcher(self);c=new a.html.DomParser(e,f);c.addAttributeFilter("src,href,style",function(k,j){var o=k.length,l,q,n="data-mce-"+j,p=e.url_converter,r=e.url_converter_scope,m;while(o--){l=k[o];q=l.attributes.map[n];if(q!==m){l.attr(j,q.length>0?q:null);l.attr(n,null)}else{q=l.attributes.map[j];if(j==="style"){q=i.serializeStyle(i.parseStyle(q),l.name)}else{if(p){q=p.call(r,q,j,l.name)}}l.attr(j,q.length>0?q:null)}}});c.addAttributeFilter("class",function(j,k){var l=j.length,m,n;while(l--){m=j[l];n=m.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,"");m.attr("class",n.length>0?n:null)}});c.addAttributeFilter("data-mce-type",function(j,l,k){var m=j.length,n;while(m--){n=j[m];if(n.attributes.map["data-mce-type"]==="bookmark"&&!k.cleanup){n.remove()}}});c.addAttributeFilter("data-mce-expando",function(j,l,k){var m=j.length;while(m--){j[m].attr(l,null)}});c.addNodeFilter("noscript",function(j){var k=j.length,l;while(k--){l=j[k].firstChild;if(l){l.value=a.html.Entities.decode(l.value)}}});c.addNodeFilter("script,style",function(k,l){var m=k.length,n,o;function j(p){return p.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}while(m--){n=k[m];o=n.firstChild?n.firstChild.value:"";if(l==="script"){n.attr("type",(n.attr("type")||"text/javascript").replace(/^mce\-/,""));if(o.length>0){n.firstChild.value="// "}}else{if(o.length>0){n.firstChild.value=""}}}});c.addNodeFilter("#comment",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.value.indexOf("[CDATA[")===0){m.name="#cdata";m.type=4;m.value=m.value.replace(/^\[CDATA\[|\]\]$/g,"")}else{if(m.value.indexOf("mce:protected ")===0){m.name="#text";m.type=3;m.raw=true;m.value=unescape(m.value).substr(14)}}}});c.addNodeFilter("xml:namespace,input",function(j,k){var l=j.length,m;while(l--){m=j[l];if(m.type===7){m.remove()}else{if(m.type===1){if(k==="input"&&!("type" in m.attributes.map)){m.attr("type","text")}}}}});if(e.fix_list_elements){c.addNodeFilter("ul,ol",function(k,l){var m=k.length,n,j;while(m--){n=k[m];j=n.parent;if(j.name==="ul"||j.name==="ol"){if(n.prev&&n.prev.name==="li"){n.prev.append(n)}}}})}c.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(j,k){var l=j.length;while(l--){j[l].attr(k,null)}});return{schema:f,addNodeFilter:c.addNodeFilter,addAttributeFilter:c.addAttributeFilter,onPreProcess:h,onPostProcess:b,serialize:function(o,m){var l,p,k,j,n;if(d&&i.select("script,style,select,map").length>0){n=o.innerHTML;o=o.cloneNode(false);i.setHTML(o,n)}else{o=o.cloneNode(true)}l=o.ownerDocument.implementation;if(l.createHTMLDocument){p=l.createHTMLDocument("");g(o.nodeName=="BODY"?o.childNodes:[o],function(q){p.body.appendChild(p.importNode(q,true))});if(o.nodeName!="BODY"){o=p.body.firstChild}else{o=p.body}k=i.doc;i.doc=p}m=m||{};m.format=m.format||"html";if(!m.no_events){m.node=o;h.dispatch(self,m)}j=new a.html.Serializer(e,f);m.content=j.serialize(c.parse(a.trim(m.getInner?o.innerHTML:i.getOuterHTML(o)),m));if(!m.cleanup){m.content=m.content.replace(/\uFEFF/g,"")}if(!m.no_events){b.dispatch(self,m)}if(k){i.doc=k}m.node=null;return m.content},addRules:function(j){f.addValidElements(j)},setRules:function(j){f.setValidElements(j)}}}})(tinymce);(function(a){a.dom.ScriptLoader=function(h){var c=0,k=1,i=2,l={},j=[],e={},d=[],g=0,f;function b(m,v){var x=this,q=a.DOM,s,o,r,n;function p(){q.remove(n);if(s){s.onreadystatechange=s.onload=s=null}v()}function u(){if(typeof(console)!=="undefined"&&console.log){console.log("Failed to load: "+m)}}n=q.uniqueId();if(a.isIE6){o=new a.util.URI(m);r=location;if(o.host==r.hostname&&o.port==r.port&&(o.protocol+":")==r.protocol&&o.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(o.getURI()),success:function(y){var t=q.create("script",{type:"text/javascript"});t.text=y;document.getElementsByTagName("head")[0].appendChild(t);q.remove(t);p()},error:u});return}}s=document.createElement("script");s.id=n;s.type="text/javascript";s.src=a._addVer(m);if(!a.isIE||a.isIE11){s.onload=p}s.onerror=u;if(!a.isOpera){s.onreadystatechange=function(){var t=s.readyState;if(t=="complete"||t=="loaded"){p()}}}(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}this.isDone=function(m){return l[m]==i};this.markDone=function(m){l[m]=i};this.add=this.load=function(m,q,n){var o,p=l[m];if(p==f){j.push(m);l[m]=c}if(q){if(!e[m]){e[m]=[]}e[m].push({func:q,scope:n||this})}};this.loadQueue=function(n,m){this.loadScripts(j,n,m)};this.loadScripts=function(m,q,p){var o;function n(r){a.each(e[r],function(s){s.func.call(s.scope)});e[r]=f}d.push({func:q,scope:p||this});o=function(){var r=a.grep(m);m.length=0;a.each(r,function(s){if(l[s]==i){n(s);return}if(l[s]!=k){l[s]=k;g++;b(s,function(){l[s]=i;g--;n(s);o()})}});if(!g){a.each(d,function(s){s.func.call(s.scope)});d.length=0}};o()}};a.ScriptLoader=new a.dom.ScriptLoader()})(tinymce);(function(a){a.dom.RangeUtils=function(c){var b="\uFEFF";this.walk=function(d,s){var i=d.startContainer,l=d.startOffset,t=d.endContainer,m=d.endOffset,j,g,o,h,r,q,e;e=c.select("td.mceSelected,th.mceSelected");if(e.length>0){a.each(e,function(u){s([u])});return}function f(u){var v;v=u[0];if(v.nodeType===3&&v===i&&l>=v.nodeValue.length){u.splice(0,1)}v=u[u.length-1];if(m===0&&u.length>0&&v===t&&v.nodeType===3){u.splice(u.length-1,1)}return u}function p(x,v,u){var y=[];for(;x&&x!=u;x=x[v]){y.push(x)}return y}function n(v,u){do{if(v.parentNode==u){return v}v=v.parentNode}while(v)}function k(x,v,y){var u=y?"nextSibling":"previousSibling";for(h=x,r=h.parentNode;h&&h!=v;h=r){r=h.parentNode;q=p(h==x?h:h[u],u);if(q.length){if(!y){q.reverse()}s(f(q))}}}if(i.nodeType==1&&i.hasChildNodes()){i=i.childNodes[l]}if(t.nodeType==1&&t.hasChildNodes()){t=t.childNodes[Math.min(m-1,t.childNodes.length-1)]}if(i==t){return s(f([i]))}j=c.findCommonAncestor(i,t);for(h=i;h;h=h.parentNode){if(h===t){return k(i,j,true)}if(h===j){break}}for(h=t;h;h=h.parentNode){if(h===i){return k(t,j)}if(h===j){break}}g=n(i,j)||i;o=n(t,j)||t;k(i,g,true);q=p(g==i?g:g.nextSibling,"nextSibling",o==t?o.nextSibling:o);if(q.length){s(f(q))}k(t,o)};this.split=function(e){var h=e.startContainer,d=e.startOffset,i=e.endContainer,g=e.endOffset;function f(j,k){return j.splitText(k)}if(h==i&&h.nodeType==3){if(d>0&&dd){g=g-d;h=i=f(i,g).previousSibling;g=i.nodeValue.length;d=0}else{g=0}}}else{if(h.nodeType==3&&d>0&&d0&&g=m.length){r=0}}t=m[r];f.setAttrib(g,"tabindex","-1");f.setAttrib(t.id,"tabindex","0");f.get(t.id).focus();if(e.actOnFocus){e.onAction(t.id)}if(s){a.cancel(s)}};p=function(z){var v=37,u=39,y=38,A=40,r=27,t=14,s=13,x=32;switch(z.keyCode){case v:if(i){q.moveFocus(-1)}a.cancel(z);break;case u:if(i){q.moveFocus(1)}a.cancel(z);break;case y:if(o){q.moveFocus(-1)}a.cancel(z);break;case A:if(o){q.moveFocus(1)}a.cancel(z);break;case r:if(e.onCancel){e.onCancel();a.cancel(z)}break;case t:case s:case x:if(e.onAction){e.onAction(g);a.cancel(z)}break}};c(m,function(t,r){var s,u;if(!t.id){t.id=f.uniqueId("_mce_item_")}u=f.get(t.id);if(l){f.bind(u,"blur",h);s="-1"}else{s=(r===0?"0":"-1")}u.setAttribute("tabindex",s);f.bind(u,"focus",k)});if(m[0]){g=m[0].id}f.setAttrib(n,"tabindex","-1");var j=f.get(n);f.bind(j,"focus",d);f.bind(j,"keydown",p)}})})(tinymce);(function(c){var b=c.DOM,a=c.is;c.create("tinymce.ui.Control",{Control:function(f,e,d){this.id=f;this.settings=e=e||{};this.rendered=false;this.onRender=new c.util.Dispatcher(this);this.classPrefix="";this.scope=e.scope||this;this.disabled=0;this.active=0;this.editor=d},setAriaProperty:function(f,e){var d=b.get(this.id+"_aria")||b.get(this.id);if(d){b.setAttrib(d,"aria-"+f,!!e)}},focus:function(){b.get(this.id).focus()},setDisabled:function(d){if(d!=this.disabled){this.setAriaProperty("disabled",d);this.setState("Disabled",d);this.setState("Enabled",!d);this.disabled=d}},isDisabled:function(){return this.disabled},setActive:function(d){if(d!=this.active){this.setState("Active",d);this.active=d;this.setAriaProperty("pressed",d)}},isActive:function(){return this.active},setState:function(f,d){var e=b.get(this.id);f=this.classPrefix+f;if(d){b.addClass(e,f)}else{b.removeClass(e,f)}},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(d){b.setHTML(d,this.renderHTML())},postRender:function(){var e=this,d;if(a(e.disabled)){d=e.disabled;e.disabled=-1;e.setDisabled(d)}if(a(e.active)){d=e.active;e.active=-1;e.setActive(d)}},remove:function(){b.remove(this.id);this.destroy()},destroy:function(){c.dom.Event.clear(this.id)}})})(tinymce);tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(c,b,a){this.parent(c,b,a);this.controls=[];this.lookup={}},add:function(a){this.lookup[a.id]=a;this.controls.push(a);return a},get:function(a){return this.lookup[a]}});tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(b,a){this.parent(b,a);this.classPrefix="mceSeparator";this.setDisabled(true)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}});(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(g,f){this.parent(g,f);this.classPrefix="mceMenuItem"},setSelected:function(f){this.setState("Selected",f);this.setAriaProperty("checked",!!f);this.selected=f},isSelected:function(){return this.selected},postRender:function(){var f=this;f.parent();if(c(f.selected)){f.setSelected(f.selected)}}})})(tinymce);(function(d){var c=d.is,b=d.DOM,e=d.each,a=d.walk;d.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(h,g){var f=this;f.parent(h,g);f.items={};f.collapsed=false;f.menuCount=0;f.onAddItem=new d.util.Dispatcher(this)},expand:function(g){var f=this;if(g){a(f,function(h){if(h.expand){h.expand()}},"items",f)}f.collapsed=false},collapse:function(g){var f=this;if(g){a(f,function(h){if(h.collapse){h.collapse()}},"items",f)}f.collapsed=true},isCollapsed:function(){return this.collapsed},add:function(f){if(!f.settings){f=new d.ui.MenuItem(f.id||b.uniqueId(),f)}this.onAddItem.dispatch(this,f);return this.items[f.id]=f},addSeparator:function(){return this.add({separator:true})},addMenu:function(f){if(!f.collapse){f=this.createMenu(f)}this.menuCount++;return this.add(f)},hasMenus:function(){return this.menuCount!==0},remove:function(f){delete this.items[f.id]},removeAll:function(){var f=this;a(f,function(g){if(g.removeAll){g.removeAll()}else{g.remove()}g.destroy()},"items",f);f.items={}},createMenu:function(g){var f=new d.ui.Menu(g.id||b.uniqueId(),g);f.onAddItem.add(this.onAddItem.dispatch,this.onAddItem);return f}})})(tinymce);(function(e){var d=e.is,c=e.DOM,f=e.each,a=e.dom.Event,b=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(h,g){g=g||{};g.container=g.container||c.doc.body;g.offset_x=g.offset_x||0;g.offset_y=g.offset_y||0;g.vp_offset_x=g.vp_offset_x||0;g.vp_offset_y=g.vp_offset_y||0;if(d(g.icons)&&!g.icons){g["class"]+=" mceNoIcons"}this.parent(h,g);this.onShowMenu=new e.util.Dispatcher(this);this.onHideMenu=new e.util.Dispatcher(this);this.classPrefix="mceMenu"},createMenu:function(j){var h=this,i=h.settings,g;j.container=j.container||i.container;j.parent=h;j.constrain=j.constrain||i.constrain;j["class"]=j["class"]||i["class"];j.vp_offset_x=j.vp_offset_x||i.vp_offset_x;j.vp_offset_y=j.vp_offset_y||i.vp_offset_y;j.keyboard_focus=i.keyboard_focus;g=new e.ui.DropMenu(j.id||c.uniqueId(),j);g.onAddItem.add(h.onAddItem.dispatch,h.onAddItem);return g},focus:function(){var g=this;if(g.keyboardNav){g.keyboardNav.focus()}},update:function(){var i=this,j=i.settings,g=c.get("menu_"+i.id+"_tbl"),l=c.get("menu_"+i.id+"_co"),h,k;h=j.max_width?Math.min(g.offsetWidth,j.max_width):g.offsetWidth;k=j.max_height?Math.min(g.offsetHeight,j.max_height):g.offsetHeight;if(!c.boxModel){i.element.setStyles({width:h+2,height:k+2})}else{i.element.setStyles({width:h,height:k})}if(j.max_width){c.setStyle(l,"width",h)}if(j.max_height){c.setStyle(l,"height",k);if(g.clientHeightv){p=r?r-u:Math.max(0,(v-A.vp_offset_x)-u)}if((n+A.vp_offset_y+l)>q){n=Math.max(0,(q-A.vp_offset_y)-l)}}c.setStyles(o,{left:p,top:n});z.element.update();z.isMenuVisible=1;z.mouseClickFunc=a.add(o,"click",function(s){var h;s=s.target;if(s&&(s=c.getParent(s,"tr"))&&!c.hasClass(s,m+"ItemSub")){h=z.items[s.id];if(h.isDisabled()){return}k=z;while(k){if(k.hideMenu){k.hideMenu()}k=k.settings.parent}if(h.settings.onclick){h.settings.onclick(s)}return false}});if(z.hasMenus()){z.mouseOverFunc=a.add(o,"mouseover",function(x){var h,t,s;x=x.target;if(x&&(x=c.getParent(x,"tr"))){h=z.items[x.id];if(z.lastMenu){z.lastMenu.collapse(1)}if(h.isDisabled()){return}if(x&&c.hasClass(x,m+"ItemSub")){t=c.getRect(x);h.showMenu((t.x+t.w-i),t.y-i,t.x);z.lastMenu=h;c.addClass(c.get(h.id).firstChild,m+"ItemActive")}}})}a.add(o,"keydown",z._keyHandler,z);z.onShowMenu.dispatch(z);if(A.keyboard_focus){z._setupKeyboardNav()}},hideMenu:function(j){var g=this,i=c.get("menu_"+g.id),h;if(!g.isMenuVisible){return}if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(i,"mouseover",g.mouseOverFunc);a.remove(i,"click",g.mouseClickFunc);a.remove(i,"keydown",g._keyHandler);c.hide(i);g.isMenuVisible=0;if(!j){g.collapse(1)}if(g.element){g.element.hide()}if(h=c.get(g.id)){c.removeClass(h.firstChild,g.classPrefix+"ItemActive")}g.onHideMenu.dispatch(g)},add:function(i){var g=this,h;i=g.parent(i);if(g.isRendered&&(h=c.get("menu_"+g.id))){g._add(c.select("tbody",h)[0],i)}return i},collapse:function(g){this.parent(g);this.hideMenu(1)},remove:function(g){c.remove(g.id);this.destroy();return this.parent(g)},destroy:function(){var g=this,h=c.get("menu_"+g.id);if(g.keyboardNav){g.keyboardNav.destroy()}a.remove(h,"mouseover",g.mouseOverFunc);a.remove(c.select("a",h),"focus",g.mouseOverFunc);a.remove(h,"click",g.mouseClickFunc);a.remove(h,"keydown",g._keyHandler);if(g.element){g.element.remove()}c.remove(h)},renderNode:function(){var i=this,j=i.settings,l,h,k,g;g=c.create("div",{role:"listbox",id:"menu_"+i.id,"class":j["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"});if(i.settings.parent){c.setAttrib(g,"aria-parent","menu_"+i.settings.parent.id)}k=c.add(g,"div",{role:"presentation",id:"menu_"+i.id+"_co","class":i.classPrefix+(j["class"]?" "+j["class"]:"")});i.element=new b("menu_"+i.id,{blocker:1,container:j.container});if(j.menu_line){c.add(k,"span",{"class":i.classPrefix+"Line"})}l=c.add(k,"table",{role:"presentation",id:"menu_"+i.id+"_tbl",border:0,cellPadding:0,cellSpacing:0});h=c.add(l,"tbody");f(i.items,function(m){i._add(h,m)});i.rendered=true;return g},_setupKeyboardNav:function(){var i,h,g=this;i=c.get("menu_"+g.id);h=c.select("a[role=option]","menu_"+g.id);h.splice(0,0,i);g.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+g.id,items:h,onCancel:function(){g.hideMenu()},enableUpDown:true});i.focus()},_keyHandler:function(g){var h=this,i;switch(g.keyCode){case 37:if(h.settings.parent){h.hideMenu();h.settings.parent.focus();a.cancel(g)}break;case 39:if(h.mouseOverFunc){h.mouseOverFunc(g)}break}},_add:function(j,h){var i,q=h.settings,p,l,k,m=this.classPrefix,g;if(q.separator){l=c.add(j,"tr",{id:h.id,"class":m+"ItemSeparator"});c.add(l,"td",{"class":m+"ItemSeparator"});if(i=l.previousSibling){c.addClass(i,"mceLast")}return}i=l=c.add(j,"tr",{id:h.id,"class":m+"Item "+m+"ItemEnabled"});i=k=c.add(i,q.titleItem?"th":"td");i=p=c.add(i,"a",{id:h.id+"_aria",role:q.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"});if(q.parent){c.setAttrib(p,"aria-haspopup","true");c.setAttrib(p,"aria-owns","menu_"+h.id)}c.addClass(k,q["class"]);g=c.add(i,"span",{"class":"mceIcon"+(q.icon?" mce_"+q.icon:"")});if(q.icon_src){c.add(g,"img",{src:q.icon_src})}i=c.add(i,q.element||"span",{"class":"mceText",title:h.settings.title},h.settings.title);if(h.settings.style){if(typeof h.settings.style=="function"){h.settings.style=h.settings.style()}c.setAttrib(i,"style",h.settings.style)}if(j.childNodes.length==1){c.addClass(l,"mceFirst")}if((i=l.previousSibling)&&c.hasClass(i,m+"ItemSeparator")){c.addClass(l,"mceFirst")}if(h.collapse){c.addClass(l,m+"ItemSub")}if(i=l.previousSibling){c.removeClass(i,"mceLast")}c.addClass(l,"mceLast")}})})(tinymce);(function(b){var a=b.DOM;b.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,d,c){this.parent(e,d,c);this.classPrefix="mceButton"},renderHTML:function(){var f=this.classPrefix,e=this.settings,d,c;c=a.encode(e.label||"");d='';if(e.image&&!(this.editor&&this.editor.forcedHighContrastMode)){d+='
'+(c?''+c+"":"")}else{d+=''+(c?''+c+"":"")}d+='";d+="";return d},postRender:function(){var d=this,e=d.settings,c;if(b.isIE&&d.editor){b.dom.Event.add(d.id,"mousedown",function(f){var g=d.editor.selection.getNode().nodeName;c=g==="IMG"?d.editor.selection.getBookmark():null})}b.dom.Event.add(d.id,"click",function(f){if(!d.isDisabled()){if(b.isIE&&d.editor&&c!==null){d.editor.selection.moveToBookmark(c)}return e.onclick.call(e.scope,f)}});b.dom.Event.add(d.id,"keydown",function(f){if(!d.isDisabled()&&f.keyCode==b.VK.SPACEBAR){b.dom.Event.cancel(f);return e.onclick.call(e.scope,f)}})}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(j,i,g){var h=this;h.parent(j,i,g);h.items=[];h.onChange=new a(h);h.onPostRender=new a(h);h.onAdd=new a(h);h.onRenderMenu=new e.util.Dispatcher(this);h.classPrefix="mceListBox";h.marked={}},select:function(h){var g=this,j,i;g.marked={};if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){var i=this,j,k,h;i.marked={};if(g!=i.selectedIndex){j=d.get(i.id+"_text");h=d.get(i.id+"_voiceDesc");k=i.items[g];if(k){i.selectedValue=k.value;i.selectedIndex=g;d.setHTML(j,d.encode(k.title));d.setHTML(h,i.settings.title+" - "+k.title);d.removeClass(j,"mceTitle");d.setAttrib(i.id,"aria-valuenow",k.title)}else{d.setHTML(j,d.encode(i.settings.title));d.setHTML(h,d.encode(i.settings.title));d.addClass(j,"mceTitle");i.selectedValue=i.selectedIndex=null;d.setAttrib(i.id,"aria-valuenow",i.settings.title)}j=0}},mark:function(g){this.marked[g]=true},add:function(j,g,i){var h=this;i=i||{};i=e.extend(i,{title:j,value:g});h.items.push(i);h.onAdd.dispatch(h,i)},getLength:function(){return this.items.length},renderHTML:function(){var j="",g=this,i=g.settings,k=g.classPrefix;j='';j+=""+d.createHTML("span",{id:g.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},g.settings.title);j+=d.createHTML("a",{id:g.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},d.encode(g.settings.title))+" ";j+=""+d.createHTML("a",{id:g.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'')+" ";j+="
";return j},showMenu:function(){var h=this,j,i=d.get(this.id),g;if(h.isDisabled()||h.items.length===0){return}if(h.menu&&h.menu.isMenuVisible){return h.hideMenu()}if(!h.isMenuRendered){h.renderMenu();h.isMenuRendered=true}j=d.getPos(i);g=h.menu;g.settings.offset_x=j.x;g.settings.offset_y=j.y;g.settings.keyboard_focus=!e.isOpera;f(h.items,function(k){if(g.items[k.id]){g.items[k.id].setSelected(0)}});f(h.items,function(k){if(g.items[k.id]&&h.marked[k.value]){g.items[k.id].setSelected(1)}if(k.value===h.selectedValue){g.items[k.id].setSelected(1)}});g.showMenu(0,i.clientHeight);b.add(d.doc,"mousedown",h.hideMenu,h);d.addClass(h.id,h.classPrefix+"Selected")},hideMenu:function(h){var g=this;if(g.menu&&g.menu.isMenuVisible){d.removeClass(g.id,g.classPrefix+"Selected");if(h&&h.type=="mousedown"&&(h.target.id==g.id+"_text"||h.target.id==g.id+"_open")){return}if(!h||!d.getParent(h.target,".mceMenu")){d.removeClass(g.id,g.classPrefix+"Selected");b.remove(d.doc,"mousedown",g.hideMenu,g);g.menu.hideMenu()}}},renderMenu:function(){var h=this,g;g=h.settings.control_manager.createDropMenu(h.id+"_menu",{menu_line:1,"class":h.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150});g.onHideMenu.add(function(){h.hideMenu();h.focus()});g.add({title:h.settings.title,"class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}});f(h.items,function(i){if(i.value===c){g.add({title:i.title,role:"option","class":"mceMenuItemTitle",onclick:function(){if(h.settings.onselect("")!==false){h.select("")}}})}else{i.id=d.uniqueId();i.role="option";i.onclick=function(){if(h.settings.onselect(i.value)!==false){h.select(i.value)}};g.add(i)}});h.onRenderMenu.dispatch(h,g);h.menu=g},postRender:function(){var g=this,h=g.classPrefix;b.add(g.id,"click",g.showMenu,g);b.add(g.id,"keydown",function(i){if(i.keyCode==32){g.showMenu(i);b.cancel(i)}});b.add(g.id,"focus",function(){if(!g._focused){g.keyDownHandler=b.add(g.id,"keydown",function(i){if(i.keyCode==40){g.showMenu();b.cancel(i)}});g.keyPressHandler=b.add(g.id,"keypress",function(j){var i;if(j.keyCode==13){i=g.selectedValue;g.selectedValue=null;b.cancel(j);g.settings.onselect(i)}})}g._focused=1});b.add(g.id,"blur",function(){b.remove(g.id,"keydown",g.keyDownHandler);b.remove(g.id,"keypress",g.keyPressHandler);g._focused=0});if(e.isIE6||!d.boxModel){b.add(g.id,"mouseover",function(){if(!d.hasClass(g.id,h+"Disabled")){d.addClass(g.id,h+"Hover")}});b.add(g.id,"mouseout",function(){if(!d.hasClass(g.id,h+"Disabled")){d.removeClass(g.id,h+"Hover")}})}g.onPostRender.dispatch(g,d.get(g.id))},destroy:function(){this.parent();b.clear(this.id+"_text");b.clear(this.id+"_open")}})})(tinymce);(function(e){var d=e.DOM,b=e.dom.Event,f=e.each,a=e.util.Dispatcher,c;e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(h,g){this.parent(h,g);this.classPrefix="mceNativeListBox"},setDisabled:function(g){d.get(this.id).disabled=g;this.setAriaProperty("disabled",g)},isDisabled:function(){return d.get(this.id).disabled},select:function(h){var g=this,j,i;if(h==c){return g.selectByIndex(-1)}if(h&&typeof(h)=="function"){i=h}else{i=function(k){return k==h}}if(h!=g.selectedValue){f(g.items,function(l,k){if(i(l.value)){j=1;g.selectByIndex(k);return false}});if(!j){g.selectByIndex(-1)}}},selectByIndex:function(g){d.get(this.id).selectedIndex=g+1;this.selectedValue=this.items[g]?this.items[g].value:null},add:function(k,h,g){var j,i=this;g=g||{};g.value=h;if(i.isRendered()){d.add(d.get(this.id),"option",g,k)}j={title:k,value:h,attribs:g};i.items.push(j);i.onAdd.dispatch(i,j)},getLength:function(){return this.items.length},renderHTML:function(){var i,g=this;i=d.createHTML("option",{value:""},"-- "+g.settings.title+" --");f(g.items,function(h){i+=d.createHTML("option",{value:h.value},h.title)});i=d.createHTML("select",{id:g.id,"class":"mceNativeListBox","aria-labelledby":g.id+"_aria"},i);i+=d.createHTML("span",{id:g.id+"_aria",style:"display: none"},g.settings.title);return i},postRender:function(){var h=this,i,j=true;h.rendered=true;function g(l){var k=h.items[l.target.selectedIndex-1];if(k&&(k=k.value)){h.onChange.dispatch(h,k);if(h.settings.onselect){h.settings.onselect(k)}}}b.add(h.id,"change",g);b.add(h.id,"keydown",function(q){var n,p=37,m=39,l=38,r=40,k=13,o=32;b.remove(h.id,"change",i);j=false;n=b.add(h.id,"blur",function(){if(j){return}j=true;b.add(h.id,"change",g);b.remove(h.id,"blur",n)});if(q.keyCode==k||q.keyCode==o){g(q);return b.cancel(q)}else{if(q.keyCode==r||q.keyCode==l){q.stopImmediatePropagation()}}});h.onPostRender.dispatch(h,d.get(h.id))}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(g,f,e){this.parent(g,f,e);this.onRenderMenu=new c.util.Dispatcher(this);f.menu_container=f.menu_container||b.doc.body},showMenu:function(){var g=this,j,i,h=b.get(g.id),f;if(g.isDisabled()){return}if(!g.isMenuRendered){g.renderMenu();g.isMenuRendered=true}if(g.isMenuVisible){return g.hideMenu()}j=b.getPos(g.settings.menu_container);i=b.getPos(h);f=g.menu;f.settings.offset_x=i.x;f.settings.offset_y=i.y;f.settings.vp_offset_x=i.x;f.settings.vp_offset_y=i.y;f.settings.keyboard_focus=g._focused;f.showMenu(0,h.firstChild.clientHeight);a.add(b.doc,"mousedown",g.hideMenu,g);g.setState("Selected",1);g.isMenuVisible=1},renderMenu:function(){var f=this,e;e=f.settings.control_manager.createDropMenu(f.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:f.settings.icons});e.onHideMenu.add(function(){f.hideMenu();f.focus()});f.onRenderMenu.dispatch(f,e);f.menu=e},hideMenu:function(g){var f=this;if(g&&g.type=="mousedown"&&b.getParent(g.target,function(h){return h.id===f.id||h.id===f.id+"_open"})){return}if(!g||!b.getParent(g.target,".mceMenu")){f.setState("Selected",0);a.remove(b.doc,"mousedown",f.hideMenu,f);if(f.menu){f.menu.hideMenu()}}f.isMenuVisible=0},postRender:function(){var e=this,f=e.settings;a.add(e.id,"click",function(){if(!e.isDisabled()){if(f.onclick){f.onclick(e.value)}e.showMenu()}})}})})(tinymce);(function(c){var b=c.DOM,a=c.dom.Event,d=c.each;c.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(g,f,e){this.parent(g,f,e);this.classPrefix="mceSplitButton"},renderHTML:function(){var i,f=this,g=f.settings,e;i="";if(g.image){e=b.createHTML("img ",{src:g.image,role:"presentation","class":"mceAction "+g["class"]})}else{e=b.createHTML("span",{"class":"mceAction "+g["class"]},"")}e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:f.id+"_voice",style:"display:none;"},g.title);i+=""+b.createHTML("a",{role:"button",id:f.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+" ";e=b.createHTML("span",{"class":"mceOpen "+g["class"]},'');i+=""+b.createHTML("a",{role:"button",id:f.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+g["class"],onclick:"return false;",onmousedown:"return false;",title:g.title},e)+" ";i+=" ";i=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+g["class"],cellpadding:"0",cellspacing:"0",title:g.title},i);return b.createHTML("div",{id:f.id,role:"button",tabindex:"0","aria-labelledby":f.id+"_voice","aria-haspopup":"true"},i)},postRender:function(){var e=this,g=e.settings,f;if(g.onclick){f=function(h){if(!e.isDisabled()){g.onclick(e.value);a.cancel(h)}};a.add(e.id+"_action","click",f);a.add(e.id,["click","keydown"],function(h){var k=32,m=14,i=13,j=38,l=40;if((h.keyCode===32||h.keyCode===13||h.keyCode===14)&&!h.altKey&&!h.ctrlKey&&!h.metaKey){f();a.cancel(h)}else{if(h.type==="click"||h.keyCode===l){e.showMenu();a.cancel(h)}}})}a.add(e.id+"_open","click",function(h){e.showMenu();a.cancel(h)});a.add([e.id,e.id+"_open"],"focus",function(){e._focused=1});a.add([e.id,e.id+"_open"],"blur",function(){e._focused=0});if(c.isIE6||!b.boxModel){a.add(e.id,"mouseover",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.addClass(e.id,"mceSplitButtonHover")}});a.add(e.id,"mouseout",function(){if(!b.hasClass(e.id,"mceSplitButtonDisabled")){b.removeClass(e.id,"mceSplitButtonHover")}})}},destroy:function(){this.parent();a.clear(this.id+"_action");a.clear(this.id+"_open");a.clear(this.id)}})})(tinymce);(function(d){var c=d.DOM,a=d.dom.Event,b=d.is,e=d.each;d.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(i,h,f){var g=this;g.parent(i,h,f);g.settings=h=d.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},g.settings);g.onShowMenu=new d.util.Dispatcher(g);g.onHideMenu=new d.util.Dispatcher(g);g.value=h.default_color},showMenu:function(){var f=this,g,j,i,h;if(f.isDisabled()){return}if(!f.isMenuRendered){f.renderMenu();f.isMenuRendered=true}if(f.isMenuVisible){return f.hideMenu()}i=c.get(f.id);c.show(f.id+"_menu");c.addClass(i,"mceSplitButtonSelected");h=c.getPos(i);c.setStyles(f.id+"_menu",{left:h.x,top:h.y+i.firstChild.clientHeight,zIndex:200000});i=0;a.add(c.doc,"mousedown",f.hideMenu,f);f.onShowMenu.dispatch(f);if(f._focused){f._keyHandler=a.add(f.id+"_menu","keydown",function(k){if(k.keyCode==27){f.hideMenu()}});c.select("a",f.id+"_menu")[0].focus()}f.keyboardNav=new d.ui.KeyboardNavigation({root:f.id+"_menu",items:c.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu();f.focus()}});f.keyboardNav.focus();f.isMenuVisible=1},hideMenu:function(g){var f=this;if(f.isMenuVisible){if(g&&g.type=="mousedown"&&c.getParent(g.target,function(h){return h.id===f.id+"_open"})){return}if(!g||!c.getParent(g.target,".mceSplitButtonMenu")){c.removeClass(f.id,"mceSplitButtonSelected");a.remove(c.doc,"mousedown",f.hideMenu,f);a.remove(f.id+"_menu","keydown",f._keyHandler);c.hide(f.id+"_menu")}f.isMenuVisible=0;f.onHideMenu.dispatch();f.keyboardNav.destroy()}},renderMenu:function(){var p=this,h,k=0,q=p.settings,g,j,l,o,f;o=c.add(q.menu_container,"div",{role:"listbox",id:p.id+"_menu","class":q.menu_class+" "+q["class"],style:"position:absolute;left:0;top:-1000px;"});h=c.add(o,"div",{"class":q["class"]+" mceSplitButtonMenu"});c.add(h,"span",{"class":"mceMenuLine"});g=c.add(h,"table",{role:"presentation","class":"mceColorSplitMenu"});j=c.add(g,"tbody");k=0;e(b(q.colors,"array")?q.colors:q.colors.split(","),function(m){m=m.replace(/^#/,"");if(!k--){l=c.add(j,"tr");k=q.grid_width-1}g=c.add(l,"td");var i={href:"javascript:;",style:{backgroundColor:"#"+m},title:p.editor.getLang("colors."+m,m),"data-mce-color":"#"+m};if(!d.isIE){i.role="option"}g=c.add(g,"a",i);if(p.editor.forcedHighContrastMode){g=c.add(g,"canvas",{width:16,height:16,"aria-hidden":"true"});if(g.getContext&&(f=g.getContext("2d"))){f.fillStyle="#"+m;f.fillRect(0,0,16,16)}else{c.remove(g)}}});if(q.more_colors_func){g=c.add(j,"tr");g=c.add(g,"td",{colspan:q.grid_width,"class":"mceMoreColors"});g=c.add(g,"a",{role:"option",id:p.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},q.more_colors_title);a.add(g,"click",function(i){q.more_colors_func.call(q.more_colors_scope||this);return a.cancel(i)})}c.addClass(h,"mceColorSplitMenu");a.add(p.id+"_menu","mousedown",function(i){return a.cancel(i)});a.add(p.id+"_menu","click",function(i){var m;i=c.getParent(i.target,"a",j);if(i&&i.nodeName.toLowerCase()=="a"&&(m=i.getAttribute("data-mce-color"))){p.setColor(m)}return false});return o},setColor:function(f){this.displayColor(f);this.hideMenu();this.settings.onselect(f)},displayColor:function(g){var f=this;c.setStyle(f.id+"_preview","backgroundColor",g);f.value=g},postRender:function(){var f=this,g=f.id;f.parent();c.add(g+"_action","div",{id:g+"_preview","class":"mceColorPreview"});c.setStyle(f.id+"_preview","backgroundColor",f.value)},destroy:function(){var f=this;f.parent();a.clear(f.id+"_menu");a.clear(f.id+"_more");c.remove(f.id+"_menu");if(f.keyboardNav){f.keyboardNav.destroy()}}})})(tinymce);(function(b){var d=b.DOM,c=b.each,a=b.dom.Event;b.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var f=this,i=[],e=f.controls,j=b.each,g=f.settings;i.push('');i.push("");i.push('");j(e,function(h){i.push(h.renderHTML())});i.push("");i.push("");return i.join("")},focus:function(){var e=this;d.get(e.id).focus()},postRender:function(){var f=this,e=[];c(f.controls,function(g){c(g.controls,function(h){if(h.id){e.push(h)}})});f.keyNav=new b.ui.KeyboardNavigation({root:f.id,items:e,onCancel:function(){if(b.isWebKit){d.get(f.editor.id+"_ifr").focus()}f.editor.focus()},excludeFromTabOrder:!f.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent();e.keyNav.destroy();a.clear(e.id)}})})(tinymce);(function(a){var c=a.DOM,b=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var m=this,f="",j,k,n=m.settings,e,d,g,l;l=m.controls;for(e=0;e"))}if(d&&k.ListBox){if(d.Button||d.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarEnd"},c.createHTML("span",null,""))}}if(c.stdMode){f+=''+k.renderHTML()+" "}else{f+=""+k.renderHTML()+" "}if(g&&k.ListBox){if(g.Button||g.SplitButton){f+=c.createHTML("td",{"class":"mceToolbarStart"},c.createHTML("span",null,""))}}}j="mceToolbarEnd";if(k.Button){j+=" mceToolbarEndButton"}else{if(k.SplitButton){j+=" mceToolbarEndSplitButton"}else{if(k.ListBox){j+=" mceToolbarEndListBox"}}}f+=c.createHTML("td",{"class":j},c.createHTML("span",null,""));return c.createHTML("table",{id:m.id,"class":"mceToolbar"+(n["class"]?" "+n["class"]:""),cellpadding:"0",cellspacing:"0",align:m.settings.align||"",role:"presentation",tabindex:"-1"},""+f+" ")}})})(tinymce);(function(b){var a=b.util.Dispatcher,c=b.each;b.create("tinymce.AddOnManager",{AddOnManager:function(){var d=this;d.items=[];d.urls={};d.lookup={};d.onAdd=new a(d)},get:function(d){if(this.lookup[d]){return this.lookup[d].instance}else{return undefined}},dependencies:function(e){var d;if(this.lookup[e]){d=this.lookup[e].dependencies}return d||[]},requireLangPack:function(e){var d=b.settings;if(d&&d.language&&d.language_load!==false){b.ScriptLoader.add(this.urls[e]+"/langs/"+d.language+".js")}},add:function(f,e,d){this.items.push(e);this.lookup[f]={instance:e,dependencies:d};this.onAdd.dispatch(this,f,e);return e},createUrl:function(d,e){if(typeof e==="object"){return e}else{return{prefix:d.prefix,resource:e,suffix:d.suffix}}},addComponents:function(f,d){var e=this.urls[f];b.each(d,function(g){b.ScriptLoader.add(e+"/"+g)})},load:function(j,f,d,h){var g=this,e=f;function i(){var k=g.dependencies(j);b.each(k,function(m){var l=g.createUrl(f,m);g.load(l.resource,l,undefined,undefined)});if(d){if(h){d.call(h)}else{d.call(b.ScriptLoader)}}}if(g.urls[j]){return}if(typeof f==="object"){e=f.prefix+f.resource+f.suffix}if(e.indexOf("/")!==0&&e.indexOf("://")==-1){e=b.baseURL+"/"+e}g.urls[j]=e.substring(0,e.lastIndexOf("/"));if(g.lookup[j]){i()}else{b.ScriptLoader.add(e,i,h)}}});b.PluginManager=new b.AddOnManager();b.ThemeManager=new b.AddOnManager()}(tinymce));(function(j){var g=j.each,d=j.extend,k=j.DOM,i=j.dom.Event,f=j.ThemeManager,b=j.PluginManager,e=j.explode,h=j.util.Dispatcher,a,c=0;j.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(j.documentBaseURL)){j.documentBaseURL+="/"}j.baseURL=new j.util.URI(j.documentBaseURL).toAbsolute(j.baseURL);j.baseURI=new j.util.URI(j.baseURL);j.onBeforeUnload=new h(j);i.add(window,"beforeunload",function(l){j.onBeforeUnload.dispatch(j,l)});j.onAddEditor=new h(j);j.onRemoveEditor=new h(j);j.EditorManager=d(j,{editors:[],i18n:{},activeEditor:null,init:function(x){var v=this,o,n=j.ScriptLoader,u,l=[],r;function q(t){var s=t.id;if(!s){s=t.name;if(s&&!k.get(s)){s=t.name}else{s=k.uniqueId()}t.setAttribute("id",s)}return s}function m(z,A,t){var y=z[A];if(!y){return}if(j.is(y,"string")){t=y.replace(/\.\w+$/,"");t=t?j.resolve(t):0;y=j.resolve(y)}return y.apply(t||this,Array.prototype.slice.call(arguments,2))}function p(t,s){return s.constructor===RegExp?s.test(t.className):k.hasClass(t,s)}v.settings=x;i.bind(window,"ready",function(){var s,t;m(x,"onpageload");switch(x.mode){case"exact":s=x.elements||"";if(s.length>0){g(e(s),function(y){if(k.get(y)){r=new j.Editor(y,x);l.push(r);r.render(1)}else{g(document.forms,function(z){g(z.elements,function(A){if(A.name===y){y="mce_editor_"+c++;k.setAttrib(A,"id",y);r=new j.Editor(y,x);l.push(r);r.render(1)}})})}})}break;case"textareas":case"specific_textareas":g(k.select("textarea"),function(y){if(x.editor_deselector&&p(y,x.editor_deselector)){return}if(!x.editor_selector||p(y,x.editor_selector)){r=new j.Editor(q(y),x);l.push(r);r.render(1)}});break;default:if(x.types){g(x.types,function(y){g(k.select(y.selector),function(A){var z=new j.Editor(q(A),j.extend({},x,y));l.push(z);z.render(1)})})}else{if(x.selector){g(k.select(x.selector),function(z){var y=new j.Editor(q(z),x);l.push(y);y.render(1)})}}}if(x.oninit){s=t=0;g(l,function(y){t++;if(!y.initialized){y.onInit.add(function(){s++;if(s==t){m(x,"oninit")}})}else{s++}if(s==t){m(x,"oninit")}})}})},get:function(l){if(l===a){return this.editors}if(!this.editors.hasOwnProperty(l)){return a}return this.editors[l]},getInstanceById:function(l){return this.get(l)},add:function(m){var l=this,n=l.editors;n[m.id]=m;n.push(m);l._setActive(m);l.onAddEditor.dispatch(l,m);return m},remove:function(n){var m=this,l,o=m.editors;if(!o[n.id]){return null}delete o[n.id];for(l=0;l':"",visual:n,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:n,directionality:"ltr",forced_root_block:"p",hidden_input:n,padd_empty_editor:n,render_ui:n,indentation:"30px",fix_table_elements:n,inline_styles:n,convert_fonts_to_spans:n,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:n,entity_encoding:"named",url_converter:m.convertURL,url_converter_scope:m,ie7_compat:n},o);m.id=m.editorId=p;m.isNotDirty=false;m.plugins={};m.documentBaseURI=new k.util.URI(o.document_base_url||k.documentBaseURL,{base_uri:tinyMCE.baseURI});m.baseURI=k.baseURI;m.contentCSS=[];m.contentStyles=[];m.setupEvents();m.execCommands={};m.queryStateCommands={};m.queryValueCommands={};m.execCallback("setup",m)},render:function(o){var p=this,q=p.settings,r=p.id,m=k.ScriptLoader;if(!j.domLoaded){j.add(window,"ready",function(){p.render()});return}tinyMCE.settings=q;if(!p.getElement()){return}if(k.isIDevice&&!k.isIOS5){return}if(!/TEXTAREA|INPUT/i.test(p.getElement().nodeName)&&q.hidden_input&&l.getParent(r,"form")){l.insertAfter(l.create("input",{type:"hidden",name:r}),r)}if(!q.content_editable){p.orgVisibility=p.getElement().style.visibility;p.getElement().style.visibility="hidden"}if(k.WindowManager){p.windowManager=new k.WindowManager(p)}if(q.encoding=="xml"){p.onGetContent.add(function(s,t){if(t.save){t.content=l.encode(t.content)}})}if(q.add_form_submit_trigger){p.onSubmit.addToTop(function(){if(p.initialized){p.save();p.isNotDirty=1}})}if(q.add_unload_trigger){p._beforeUnload=tinyMCE.onBeforeUnload.add(function(){if(p.initialized&&!p.destroyed&&!p.isHidden()){p.save({format:"raw",no_events:true})}})}k.addUnload(p.destroy,p);if(q.submit_patch){p.onBeforeRenderUI.add(function(){var s=p.getElement().form;if(!s){return}if(s._mceOldSubmit){return}if(!s.submit.nodeType&&!s.submit.length){p.formElement=s;s._mceOldSubmit=s.submit;s.submit=function(){k.triggerSave();p.isNotDirty=1;return p.formElement._mceOldSubmit(p.formElement)}}s=null})}function n(){if(q.language&&q.language_load!==false){m.add(k.baseURL+"/langs/"+q.language+".js")}if(q.theme&&typeof q.theme!="function"&&q.theme.charAt(0)!="-"&&!h.urls[q.theme]){h.load(q.theme,"themes/"+q.theme+"/editor_template"+k.suffix+".js")}i(g(q.plugins),function(t){if(t&&!c.urls[t]){if(t.charAt(0)=="-"){t=t.substr(1,t.length);var s=c.dependencies(t);i(s,function(v){var u={prefix:"plugins/",resource:v,suffix:"/editor_plugin"+k.suffix+".js"};v=c.createUrl(u,v);c.load(v.resource,v)})}else{if(t=="safari"){return}c.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+k.suffix+".js"})}}});m.loadQueue(function(){if(!p.removed){p.init()}})}n()},init:function(){var q,G=this,H=G.settings,D,y,z,C=G.getElement(),p,m,E,v,B,F,x,r=[];k.add(G);H.aria_label=H.aria_label||l.getAttrib(C,"aria-label",G.getLang("aria.rich_text_area"));if(H.theme){if(typeof H.theme!="function"){H.theme=H.theme.replace(/-/,"");p=h.get(H.theme);G.theme=new p();if(G.theme.init){G.theme.init(G,h.urls[H.theme]||k.documentBaseURL.replace(/\/$/,""))}}else{G.theme=H.theme}}function A(s){var t=c.get(s),o=c.urls[s]||k.documentBaseURL.replace(/\/$/,""),n;if(t&&k.inArray(r,s)===-1){i(c.dependencies(s),function(u){A(u)});n=new t(G,o);G.plugins[s]=n;if(n.init){n.init(G,o);r.push(s)}}}i(g(H.plugins.replace(/\-/g,"")),A);if(H.popup_css!==false){if(H.popup_css){H.popup_css=G.documentBaseURI.toAbsolute(H.popup_css)}else{H.popup_css=G.baseURI.toAbsolute("themes/"+H.theme+"/skins/"+H.skin+"/dialog.css")}}if(H.popup_css_add){H.popup_css+=","+G.documentBaseURI.toAbsolute(H.popup_css_add)}G.controlManager=new k.ControlManager(G);G.onBeforeRenderUI.dispatch(G,G.controlManager);if(H.render_ui&&G.theme){G.orgDisplay=C.style.display;if(typeof H.theme!="function"){D=H.width||C.style.width||C.offsetWidth;y=H.height||C.style.height||C.offsetHeight;z=H.min_height||100;F=/^[0-9\.]+(|px)$/i;if(F.test(""+D)){D=Math.max(parseInt(D,10)+(p.deltaWidth||0),100)}if(F.test(""+y)){y=Math.max(parseInt(y,10)+(p.deltaHeight||0),z)}p=G.theme.renderUI({targetNode:C,width:D,height:y,deltaWidth:H.delta_width,deltaHeight:H.delta_height});l.setStyles(p.sizeContainer||p.editorContainer,{width:D,height:y});y=(p.iframeHeight||y)+(typeof(y)=="number"?(p.deltaHeight||0):"");if(y';if(H.document_base_url!=k.documentBaseURL){G.iframeHTML+=' '}if(k.isIE8){if(H.ie7_compat){G.iframeHTML+=''}else{G.iframeHTML+=''}}G.iframeHTML+='';for(x=0;x '}G.contentCSS=[];v=H.body_id||"tinymce";if(v.indexOf("=")!=-1){v=G.getParam("body_id","","hash");v=v[G.id]||v}B=H.body_class||"";if(B.indexOf("=")!=-1){B=G.getParam("body_class","","hash");B=B[G.id]||""}G.iframeHTML+='