Changeset 26876
- Timestamp:
- 12/28/2013 11:52:04 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 49 added
- 22 deleted
- 25 edited
- 1 copied
- 20 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Gruntfile.js
r26771 r26876 18 18 src: [] 19 19 }, 20 tinymce: { 21 src: [ 22 '<%= concat.tinymce.dest %>', 23 BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce-schema.min.js', 24 BUILD_DIR + 'wp-includes/js/tinymce/mark_loaded.js' 25 ] 26 }, 20 tinymce: ['<%= concat.tinymce.dest %>'], 27 21 qunit: ['tests/qunit/compiled.html'] 28 22 }, … … 192 186 'wp-includes/js/plupload/handlers.js', 193 187 'wp-includes/js/plupload/wp-plupload.js', 194 'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js', 195 'wp-includes/js/tinymce/plugins/wp*/editor_plugin_src.js', 196 'wp-includes/js/tinymce/mark_loaded_src.js', 188 'wp-includes/js/tinymce/plugins/wordpress/plugin.js', 189 'wp-includes/js/tinymce/plugins/wp*/plugin.js', 197 190 // Third party scripts 198 191 '!wp-admin/js/farbtastic.js', … … 263 256 'wp-includes/js/plupload/handlers.js', 264 257 'wp-includes/js/plupload/wp-plupload.js', 265 'wp-includes/js/tinymce/plugins/wp*/js/*.js', 266 'wp-includes/js/tinymce/wp-tinymce-schema.js', 258 'wp-includes/js/tinymce/plugins/wordpress/plugin.js', 259 'wp-includes/js/tinymce/plugins/wp*/plugin.js', 260 267 261 // Exceptions 268 262 '!wp-admin/js/custom-header.js', // Why? We should minify this. … … 272 266 '!wp-includes/js/swfobject.js', 273 267 '!wp-includes/js/underscore.min.js', 274 '!wp-includes/js/zxcvbn.min.js', 275 // Hard-coded in editimage.html 276 '!wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js' 277 ] 278 }, 279 tinymce: { 280 expand: true, 281 cwd: SOURCE_DIR, 282 dest: BUILD_DIR, 283 src: [ 284 'wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js', 285 'wp-includes/js/tinymce/plugins/wp*/editor_plugin_src.js', 286 'wp-includes/js/tinymce/mark_loaded_src.js' 287 ], 288 // TinyMCE plugins use a nonstandard naming scheme: plugin files are named 289 // `editor_plugin_src.js`, and are compressed into `editor_plugin.js`. 290 rename: function(destBase, destPath) { 291 destPath = destPath.replace(/_src.js$/, '.js'); 292 return path.join(destBase || '', destPath); 293 } 268 '!wp-includes/js/zxcvbn.min.js' 269 ] 294 270 } 295 271 }, … … 303 279 }, 304 280 src: [ 305 BUILD_DIR + 'wp-includes/js/tinymce/tiny_mce.js', 306 BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce-schema.min.js', 307 BUILD_DIR + 'wp-includes/js/tinymce/themes/advanced/editor_template.js', 308 BUILD_DIR + 'wp-includes/js/tinymce/plugins/*/editor_plugin.js', 309 BUILD_DIR + 'wp-includes/js/tinymce/mark_loaded.js' 281 BUILD_DIR + 'wp-includes/js/tinymce/tinymce.min.js', 282 BUILD_DIR + 'wp-includes/js/tinymce/themes/modern/theme.min.js', 283 BUILD_DIR + 'wp-includes/js/tinymce/plugins/*/plugin.min.js' 310 284 ], 311 285 dest: BUILD_DIR + 'wp-includes/js/tinymce/wp-tinymce.js' … … 371 345 // Build task. 372 346 grunt.registerTask('build', ['clean:all', 'copy:all', 'cssmin:core', 'colors', 'rtl', 'cssmin:rtl', 'cssmin:colors', 373 'uglify:core', ' uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']);347 'uglify:core', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']); 374 348 375 349 // Testing tasks. … … 384 358 grunt.registerTask('qunit:compiled', 'Runs QUnit tests on compiled as well as uncompiled scripts.', 385 359 ['build', 'copy:qunit', 'qunit']); 360 386 361 grunt.registerTask('test', 'Runs all QUnit and PHPUnit tasks.', ['qunit:compiled', 'phpunit']); 387 362 -
trunk/src/wp-admin/css/wp-admin.css
r26847 r26876 4316 4316 4317 4317 .autosave-info { 4318 padding: 2px 15px;4318 padding: 2px; 4319 4319 text-align: right; 4320 4320 } … … 4324 4324 } 4325 4325 4326 #content-resize-handle, 4327 #post-body .wp_themeSkin .mceStatusbar a.mceResize { 4326 #content-resize-handle { 4328 4327 background: transparent url('../images/resize.gif') no-repeat scroll right bottom; 4329 4328 width: 12px; 4330 height: 12px; 4331 cursor: se-resize; 4332 } 4333 4334 .rtl #content-resize-handle, 4335 .rtl #post-body .wp_themeSkin .mceStatusbar a.mceResize { 4336 background: transparent url('../images/resize-rtl.gif') no-repeat scroll right bottom; 4337 } 4338 4339 #post-body .wp_themeSkin .mceStatusbar a.mceResize { 4340 bottom: 3px; 4341 position: absolute; 4342 right: 3px; 4343 } 4344 4345 #post-body .postarea .wp_themeSkin .mceStatusbar a.mceResize { 4346 bottom: -20px; 4347 } 4348 4349 #content-resize-handle { 4350 position: absolute; 4351 right: 3px; 4352 bottom: -20px; 4329 cursor: n-resize; 4330 } 4331 4332 .rtl #content-resize-handle { 4333 background: transparent url('../images/resize-rtl.gif') no-repeat scroll left bottom; 4353 4334 } 4354 4335 4355 4336 .press-this #content-resize-handle { 4356 4337 bottom: 2px; 4357 }4358 4359 .tmce-active #content-resize-handle {4360 display: none;4361 4338 } 4362 4339 -
trunk/src/wp-admin/edit-form-advanced.php
r26518 r26876 484 484 'tabfocus_elements' => 'insert-media-button,save-post', 485 485 'editor_height' => 360, 486 'tinymce' => array( 487 'resize' => false, 488 ), 486 489 ) ); ?> 487 490 <table id="post-status-info" cellspacing="0"><tbody><tr> … … 500 503 } ?> 501 504 </td> 505 <td id="content-resize-handle" class="hide-if-no-js"><br /></td> 502 506 </tr></tbody></table> 503 507 -
trunk/src/wp-admin/includes/ajax-actions.php
r26868 r26876 1788 1788 $post_id = edit_post(); 1789 1789 1790 if ( is_wp_error($post_id) ) { 1791 if ( $post_id->get_error_message() ) 1792 $message = $post_id->get_error_message(); 1793 else 1794 $message = __('Save failed'); 1795 1796 echo json_encode( array( 'message' => $message, 'last_edited' => '' ) ); 1797 wp_die(); 1798 } else { 1799 $message = __('Saved.'); 1790 if ( is_wp_error( $post_id ) ) { 1791 wp_send_json_error(); 1800 1792 } 1801 1793 … … 1808 1800 } 1809 1801 1810 if ( $last_id = get_post_meta( $post_id, '_edit_last', true) ) {1811 $last_user = get_userdata( $last_id);1802 if ( $last_id = get_post_meta( $post_id, '_edit_last', true ) ) { 1803 $last_user = get_userdata( $last_id ); 1812 1804 $last_edited = sprintf( __('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), $last_date, $last_time ); 1813 1805 } else { … … 1815 1807 } 1816 1808 1817 echo json_encode( array( 'message' => $message, 'last_edited' => $last_edited ) ); 1818 wp_die(); 1809 wp_send_json_success( array( 'last_edited' => $last_edited ) ); 1819 1810 } 1820 1811 … … 1840 1831 * @since 3.3.0 1841 1832 * 1842 * @param int $interval The interval in seconds the post lock duration should last, plus 5 seconds. Default 1 20.1833 * @param int $interval The interval in seconds the post lock duration should last, plus 5 seconds. Default 150. 1843 1834 */ 1844 $new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', 1 20 ) + 5 ) . ':' . $active_lock[1];1835 $new_lock = ( time() - apply_filters( 'wp_check_post_lock_window', 150 ) + 5 ) . ':' . $active_lock[1]; 1845 1836 update_post_meta( $post_id, '_edit_lock', $new_lock, implode( ':', $active_lock ) ); 1846 1837 wp_die( 1 ); -
trunk/src/wp-admin/js/editor.js
r26224 r26876 14 14 // mode can be 'html', 'tmce', or 'toggle'; 'html' is used for the 'Text' editor tab. 15 15 go: function( id, mode ) { 16 var t = this, ed, wrap_id, txtarea_el, 17 dom = tinymce.DOM;16 var t = this, ed, wrap_id, txtarea_el, editorHeight, toolbarHeight, 17 DOM = tinymce.DOM; //DOMUtils outside the editor iframe 18 18 19 19 id = id || 'content'; … … 22 22 ed = tinymce.get( id ); 23 23 wrap_id = 'wp-' + id + '-wrap'; 24 txtarea_el = dom.get( id );24 txtarea_el = DOM.get( id ); 25 25 26 26 if ( 'toggle' === mode ) { … … 32 32 } 33 33 34 function getToolbarHeight() { 35 var height; 36 37 try { 38 height = DOM.getSize( DOM.select( '.mce-toolbar-grp', ed.getContainer() )[0] ); 39 } catch(e){} 40 41 if ( height && height.h && height.h > 10 && height.h < 100 ) { 42 return height.h; 43 } 44 45 return 0; 46 } 47 34 48 if ( 'tmce' === mode || 'tinymce' === mode ) { 35 49 if ( ed && ! ed.isHidden() ) { … … 41 55 } 42 56 57 editorHeight = txtarea_el ? parseInt( txtarea_el.style.height, 10 ) : 0; 58 43 59 if ( tinyMCEPreInit.mceInit[ id ] && tinyMCEPreInit.mceInit[ id ].wpautop ) { 44 60 txtarea_el.value = t.wpautop( txtarea_el.value ); … … 47 63 if ( ed ) { 48 64 ed.show(); 65 66 if ( editorHeight && ( toolbarHeight = getToolbarHeight() ) ) { 67 editorHeight = editorHeight - toolbarHeight + 11; 68 69 // height cannot be under 50 or over 5000 70 if ( editorHeight > 50 && editorHeight < 5000 ) { 71 ed.theme.resizeTo( null, editorHeight ); 72 } 73 } 49 74 } else { 50 ed = new tinymce.Editor( id, tinyMCEPreInit.mceInit[ id ] ); 51 ed.render(); 52 } 53 54 dom.removeClass( wrap_id, 'html-active' ); 55 dom.addClass( wrap_id, 'tmce-active' ); 75 tinymce.init( tinyMCEPreInit.mceInit[id] ); 76 77 // ed = tinymce.createEditor( id, tinyMCEPreInit.mceInit[id] ); 78 // ed.render(); 79 } 80 81 DOM.removeClass( wrap_id, 'html-active' ); 82 DOM.addClass( wrap_id, 'tmce-active' ); 56 83 setUserSetting( 'editor', 'tinymce' ); 57 84 … … 63 90 64 91 if ( ed ) { 92 editorHeight = DOM.get( id + '_ifr' ); 93 editorHeight = editorHeight ? parseInt( editorHeight.style.height, 10 ) : 0; 94 95 if ( editorHeight && ( toolbarHeight = getToolbarHeight() ) ) { 96 editorHeight = editorHeight + toolbarHeight - 11; 97 98 // height cannot be under 50 or over 5000 99 if ( editorHeight > 50 && editorHeight < 5000 ) { 100 txtarea_el.style.height = editorHeight + 'px'; 101 } 102 } 103 65 104 ed.hide(); 66 105 } else { … … 70 109 } 71 110 72 dom.setStyles( txtarea_el, {'display': '', 'visibility': ''} );73 } 74 75 dom.removeClass( wrap_id, 'tmce-active' );76 dom.addClass( wrap_id, 'html-active' );111 DOM.setStyles( txtarea_el, {'display': '', 'visibility': ''} ); 112 } 113 114 DOM.removeClass( wrap_id, 'tmce-active' ); 115 DOM.addClass( wrap_id, 'html-active' ); 77 116 setUserSetting( 'editor', 'html' ); 78 117 } … … 89 128 preserve_linebreaks = true; 90 129 content = content.replace( /<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function( a ) { 91 a = a.replace( /<br ?\/?>(\r\n|\n)?/g, '<wp-temp-lb>' ); 92 return a.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '<wp-temp-lb>' ); 130 a = a.replace( /<br ?\/?>(\r\n|\n)?/g, '<wp-line-break>' ); 131 a = a.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '<wp-line-break>' ); 132 return a.replace( /\r?\n/g, '<wp-line-break>' ); 93 133 }); 94 134 } … … 150 190 // put back the line breaks in pre|script 151 191 if ( preserve_linebreaks ) { 152 content = content.replace( /<wp- temp-lb>/g, '\n' );192 content = content.replace( /<wp-line-break>/g, '\n' ); 153 193 } 154 194 … … 182 222 preserve_linebreaks = true; 183 223 pee = pee.replace( /<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function( a ) { 184 return a.replace( /(\r\n|\n)/g, '<wp- temp-lb>' );224 return a.replace( /(\r\n|\n)/g, '<wp-line-break>' ); 185 225 }); 186 226 } … … 231 271 // put back the line breaks in pre|script 232 272 if ( preserve_linebreaks ) { 233 pee = pee.replace( /<wp- temp-lb>/g, '\n' );273 pee = pee.replace( /<wp-line-break>/g, '\n' ); 234 274 } 235 275 -
trunk/src/wp-admin/js/media-upload.js
r26323 r26876 7 7 var ed, mce = typeof(tinymce) != 'undefined', qt = typeof(QTags) != 'undefined'; 8 8 9 if ( ! wpActiveEditor ) {9 if ( ! wpActiveEditor ) { 10 10 if ( mce && tinymce.activeEditor ) { 11 11 ed = tinymce.activeEditor; 12 12 wpActiveEditor = ed.id; 13 } else if ( ! qt ) {13 } else if ( ! qt ) { 14 14 return false; 15 15 } 16 16 } else if ( mce ) { 17 if ( tinymce.activeEditor && (tinymce.activeEditor.id == 'mce_fullscreen' || tinymce.activeEditor.id == 'wp_mce_fullscreen') ) 18 ed = tinymce.activeEditor; 19 else 20 ed = tinymce.get(wpActiveEditor); 17 ed = tinymce.get( wpActiveEditor ); 21 18 } 22 19 23 if ( ed && ! ed.isHidden() ) {20 if ( ed && ! ed.isHidden() ) { 24 21 // restore caret position on IE 25 if ( tinymce.isIE && ed.windowManager.insertimagebookmark )26 ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);22 // if ( tinymce.isIE && ed.windowManager.insertimagebookmark ) 23 // ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark); 27 24 28 25 if ( h.indexOf('[caption') !== -1 ) { … … 79 76 80 77 $(window).resize(function(){ tb_position(); }); 81 78 /* 82 79 // store caret position in IE 83 80 $(document).ready(function($){ … … 91 88 }); 92 89 }); 93 90 */ 94 91 })(jQuery); -
trunk/src/wp-admin/js/post.js
r26851 r26876 813 813 wptitlehint(); 814 814 815 // resizable textarea#content 816 (function() { 817 var textarea = $('textarea#content'), offset = null, el; 815 // Resize the visual and text editors 816 ( function() { 817 var editor, offset, mce, 818 $document = $( document ), 819 $textarea = $('textarea#content'), 820 $handle = $('#post-status-info'); 821 818 822 // No point for touch devices 819 if ( ! textarea.length || 'ontouchstart' in window )823 if ( ! $textarea.length || 'ontouchstart' in window ) { 820 824 return; 821 822 function dragging(e) {823 textarea.height( Math.max(50, offset + e.pageY) + 'px' );824 return false;825 825 } 826 826 827 function dragging( event ) { 828 if ( mce ) { 829 editor.theme.resizeTo( null, offset + event.pageY ); 830 } else { 831 $textarea.height( Math.max( 50, offset + event.pageY ) ); 832 } 833 834 event.preventDefault(); 835 } 836 827 837 function endDrag() { 828 var height; 829 830 textarea.focus(); 831 $(document).unbind('mousemove', dragging).unbind('mouseup', endDrag); 832 833 height = parseInt( textarea.css('height'), 10 ); 838 var height, toolbarHeight; 839 840 if ( mce ) { 841 editor.focus(); 842 toolbarHeight = $( '#wp-content-editor-container .mce-toolbar-grp' ).height(); 843 height = parseInt( $('#content_ifr').css('height'), 10 ) + toolbarHeight - 28; 844 } else { 845 $textarea.focus(); 846 height = parseInt( $textarea.css('height'), 10 ); 847 } 848 849 $document.off( 'mousemove.wp-editor-resize mouseup.wp-editor-resize' ); 834 850 835 851 // sanity check 836 if ( height && height > 50 && height < 5000 ) 852 if ( height && height > 50 && height < 5000 ) { 837 853 setUserSetting( 'ed_size', height ); 854 } 838 855 } 839 856 840 textarea.css('resize', 'none'); 841 el = $('<div id="content-resize-handle"><br></div>'); 842 $('#wp-content-wrap').append(el); 843 el.on('mousedown', function(e) { 844 offset = textarea.height() - e.pageY; 845 textarea.blur(); 846 $(document).mousemove(dragging).mouseup(endDrag); 847 return false; 857 $textarea.css( 'resize', 'none' ); 858 859 $handle.on( 'mousedown.wp-editor-resize', function( event ) { 860 if ( typeof tinymce !== 'undefined' ) { 861 editor = tinymce.get('content'); 862 } 863 864 if ( editor && ! editor.isHidden() ) { 865 mce = true; 866 offset = $('#content_ifr').height() - event.pageY; 867 } else { 868 mce = false; 869 offset = $textarea.height() - event.pageY; 870 $textarea.blur(); 871 } 872 873 $document.on( 'mousemove.wp-editor-resize', dragging ) 874 .on( 'mouseup.wp-editor-resize', endDrag ); 875 876 event.preventDefault(); 848 877 }); 849 878 })(); 850 879 851 if ( typeof(tinymce) != 'undefined' ) { 852 tinymce.onAddEditor.add(function(mce, ed){ 853 // iOS expands the iframe to full height and the user cannot adjust it. 854 if ( ed.id != 'content' || tinymce.isIOS5 ) 855 return; 856 857 function getHeight() { 858 var height, node = document.getElementById('content_ifr'), 859 ifr_height = node ? parseInt( node.style.height, 10 ) : 0, 860 tb_height = $('#content_tbl tr.mceFirst').height(); 861 862 if ( !ifr_height || !tb_height ) 863 return false; 864 865 // total height including toolbar and statusbar 866 height = ifr_height + tb_height + 21; 867 // textarea height = total height - 33px toolbar 868 height -= 33; 869 870 return height; 871 } 872 873 // resize TinyMCE to match the textarea height when switching Text -> Visual 874 ed.onLoadContent.add( function() { 875 var ifr_height, node = document.getElementById('content'), 876 height = node ? parseInt( node.style.height, 10 ) : 0, 877 tb_height = $('#content_tbl tr.mceFirst').height() || 33; 878 879 // height cannot be under 50 or over 5000 880 if ( !height || height < 50 || height > 5000 ) 881 height = 360; // default height for the main editor 882 883 if ( getUserSetting( 'ed_size' ) > 5000 ) 884 setUserSetting( 'ed_size', 360 ); 885 886 // compensate for padding and toolbars 887 ifr_height = ( height - tb_height ) + 12; 888 889 // sanity check 890 if ( ifr_height > 50 && ifr_height < 5000 ) { 891 $('#content_tbl').css('height', '' ); 892 $('#content_ifr').css('height', ifr_height + 'px' ); 893 } 894 }); 895 896 // resize the textarea to match TinyMCE's height when switching Visual -> Text 897 ed.onSaveContent.add( function() { 898 var height = getHeight(); 899 900 if ( !height || height < 50 || height > 5000 ) 901 return; 902 903 $('textarea#content').css( 'height', height + 'px' ); 904 }); 905 906 // save on resizing TinyMCE 907 ed.onPostRender.add(function() { 908 $( '#content_resize' ).on( 'mousedown.wp-mce-resize', function() { 909 $( document ).on( 'mouseup.wp-mce-resize', function() { 910 var height; 911 912 $(document).off('mouseup.wp-mce-resize'); 913 914 height = getHeight(); 915 // sanity check 916 if ( height && height > 50 && height < 5000 ) 917 setUserSetting( 'ed_size', height ); 918 }); 919 }); 920 }); 921 }); 922 880 if ( typeof tinymce !== 'undefined' ) { 923 881 // When changing post formats, change the editor body class 924 882 $( '#post-formats-select input.post-format' ).on( 'change.set-editor-class', function() { -
trunk/src/wp-admin/js/wp-fullscreen.js
r26667 r26876 1 1 /* global ajaxurl, deleteUserSetting, setUserSetting, switchEditors, tinymce, tinyMCEPreInit, wp_fullscreen_settings, wpActiveEditor:true, wpLink */ 2 /**3 * PubSub4 *5 * A lightweight publish/subscribe implementation.6 * Private use only!7 */8 var PubSub, fullscreen, wptitlehint;9 10 PubSub = function() {11 this.topics = {};12 };13 14 PubSub.prototype.subscribe = function( topic, callback ) {15 if ( ! this.topics[ topic ] )16 this.topics[ topic ] = [];17 18 this.topics[ topic ].push( callback );19 return callback;20 };21 22 PubSub.prototype.unsubscribe = function( topic, callback ) {23 var i, l,24 topics = this.topics[ topic ];25 26 if ( ! topics )27 return callback || [];28 29 // Clear matching callbacks30 if ( callback ) {31 for ( i = 0, l = topics.length; i < l; i++ ) {32 if ( callback == topics[i] )33 topics.splice( i, 1 );34 }35 return callback;36 37 // Clear all callbacks38 } else {39 this.topics[ topic ] = [];40 return topics;41 }42 };43 44 PubSub.prototype.publish = function( topic, args ) {45 var i, l, broken,46 topics = this.topics[ topic ];47 48 if ( ! topics )49 return;50 51 args = args || [];52 53 for ( i = 0, l = topics.length; i < l; i++ ) {54 broken = ( topics[i].apply( null, args ) === false || broken );55 }56 return ! broken;57 };58 59 2 /** 60 3 * Distraction Free Writing 61 4 * (wp-fullscreen) 62 5 * 63 * Access the API globally using the fullscreen variable.6 * Access the API globally using the window.wp.editor.fullscreen variable. 64 7 */ 65 66 (function($){ 67 var api, ps, bounder, s, timer, block, set_title_hint; 8 ( function( $, window ) { 9 var api, ps, s, toggleUI, uiTimer, PubSub, 10 oldheight = 0, 11 uiScrollTop = 0, 12 transitionend = 'transitionend webkitTransitionEnd', 13 $body = $( document.body ), 14 $document = $( document ); 15 16 /** 17 * PubSub 18 * 19 * A lightweight publish/subscribe implementation. 20 * 21 * @access private 22 */ 23 PubSub = function() { 24 this.topics = {}; 25 26 this.subscribe = function( topic, callback ) { 27 if ( ! this.topics[ topic ] ) 28 this.topics[ topic ] = []; 29 30 this.topics[ topic ].push( callback ); 31 return callback; 32 }; 33 34 this.unsubscribe = function( topic, callback ) { 35 var i, l, 36 topics = this.topics[ topic ]; 37 38 if ( ! topics ) 39 return callback || []; 40 41 // Clear matching callbacks 42 if ( callback ) { 43 for ( i = 0, l = topics.length; i < l; i++ ) { 44 if ( callback == topics[i] ) 45 topics.splice( i, 1 ); 46 } 47 return callback; 48 49 // Clear all callbacks 50 } else { 51 this.topics[ topic ] = []; 52 return topics; 53 } 54 }; 55 56 this.publish = function( topic, args ) { 57 var i, l, broken, 58 topics = this.topics[ topic ]; 59 60 if ( ! topics ) 61 return; 62 63 args = args || []; 64 65 for ( i = 0, l = topics.length; i < l; i++ ) { 66 broken = ( topics[i].apply( null, args ) === false || broken ); 67 } 68 return ! broken; 69 }; 70 }; 68 71 69 72 // Initialize the fullscreen/api object 70 fullscreen =api = {};73 api = {}; 71 74 72 75 // Create the PubSub (publish/subscribe) interface. 73 76 ps = api.pubsub = new PubSub(); 74 timer = 0;75 block = false;76 77 77 78 s = api.settings = { // Settings 78 visible : false, 79 mode : 'tinymce', 80 editor_id : 'content', 81 title_id : '', 82 timer : 0, 83 toolbar_shown : false 84 }; 85 86 /** 87 * Bounder 88 * 89 * Creates a function that publishes start/stop topics. 90 * Used to throttle events. 91 */ 92 bounder = api.bounder = function( start, stop, delay, e ) { 93 var y, top; 94 95 delay = delay || 1250; 96 97 if ( e ) { 98 y = e.pageY || e.clientY || e.offsetY; 99 top = $(document).scrollTop(); 100 101 if ( !e.isDefaultPrevented ) // test if e ic jQuery normalized 102 y = 135 + y; 103 104 if ( y - top > 120 ) 79 visible: false, 80 mode: 'tinymce', 81 id: '', 82 title_id: '', 83 timer: 0, 84 toolbar_shown: false 85 }; 86 87 function _hideUI() { 88 $body.removeClass('wp-dfw-show-ui'); 89 uiShown = false; 90 } 91 92 /** 93 * toggleUI 94 * 95 * Toggle the CSS class to show/hide the toolbar, borders and statusbar. 96 */ 97 toggleUI = api.toggleUI = function( hide ) { 98 clearTimeout( uiTimer ); 99 100 if ( ! $body.hasClass('wp-dfw-show-ui') ) { 101 $body.addClass('wp-dfw-show-ui'); 102 } 103 104 if ( hide === 'hide' ) { 105 uiTimer = setTimeout( _hideUI, 2000 ); 106 } 107 }; 108 109 function resetCssPosition( add ) { 110 s.$dfwWrap.parents().each( function( i, parent ) { 111 var cssPosition, $parent = $(parent); 112 113 if ( add ) { 114 if ( parent.style.position ) { 115 $parent.data( 'wp-dfw-css-position', parent.style.position ); 116 } 117 118 $parent.css( 'position', 'static' ); 119 } else { 120 cssPosition = $parent.data( 'wp-dfw-css-position' ); 121 cssPosition = cssPosition || ''; 122 $parent.css( 'position', cssPosition ); 123 } 124 125 if ( parent.nodeName === 'BODY' ) { 126 return false; 127 } 128 }); 129 } 130 131 /** 132 * on() 133 * 134 * Turns fullscreen on. 135 * 136 * @param string mode Optional. Switch to the given mode before opening. 137 */ 138 api.on = function() { 139 var id, $dfwWrap, editor, titleId; 140 141 if ( s.visible ) { 142 return; 143 } 144 145 if ( ! s.$fullscreenFader ) { 146 api.ui.init(); 147 } 148 149 // Settings can be added or changed by defining "wp_fullscreen_settings" JS object. 150 if ( typeof window.wp_fullscreen_settings === 'object' ) 151 $.extend( s, window.wp_fullscreen_settings ); 152 153 id = s.id || window.wpActiveEditor; 154 155 if ( ! id ) { 156 if ( s.hasTinymce ) { 157 id = tinymce.activeEditor.id; 158 } else { 105 159 return; 106 } 107 108 if ( block ) 160 } 161 } 162 163 s.id = id; 164 $dfwWrap = s.$dfwWrap = $( '#wp-' + id + '-wrap' ); 165 166 if ( ! $dfwWrap.length ) { 109 167 return; 110 111 block = true; 112 113 setTimeout( function() { 114 block = false; 115 }, 400 ); 116 117 if ( s.timer ) 118 clearTimeout( s.timer ); 119 else 120 ps.publish( start ); 121 122 function timed() { 123 ps.publish( stop ); 124 s.timer = 0; 125 } 126 127 s.timer = setTimeout( timed, delay ); 128 }; 129 130 /** 131 * on() 132 * 133 * Turns fullscreen on. 134 * 135 * @param string mode Optional. Switch to the given mode before opening. 136 */ 137 api.on = function() { 138 if ( s.visible ) 139 return; 140 141 // Settings can be added or changed by defining "wp_fullscreen_settings" JS object. 142 if ( typeof(wp_fullscreen_settings) == 'object' ) 143 $.extend( s, wp_fullscreen_settings ); 144 145 s.editor_id = wpActiveEditor || 'content'; 146 147 if ( $('input#title').length && s.editor_id == 'content' ) 148 s.title_id = 'title'; 149 else if ( $('input#' + s.editor_id + '-title').length ) // the title input field should have [editor_id]-title HTML ID to be auto detected 150 s.title_id = s.editor_id + '-title'; 151 else 152 $('#wp-fullscreen-title, #wp-fullscreen-title-prompt-text').hide(); 153 154 s.mode = $('#' + s.editor_id).is(':hidden') ? 'tinymce' : 'html'; 155 s.qt_canvas = $('#' + s.editor_id).get(0); 156 157 if ( ! s.element ) 158 api.ui.init(); 159 160 s.is_mce_on = s.has_tinymce && typeof( tinymce.get(s.editor_id) ) != 'undefined'; 168 } 169 170 s.$dfwTextarea = $( '#' + id ); 171 s.$editorContainer = $dfwWrap.find( '.wp-editor-container' ); 172 uiScrollTop = $document.scrollTop(); 173 174 if ( s.hasTinymce ) { 175 s.editor = tinymce.get( id ); 176 } 177 178 if ( s.editor && ! s.editor.isHidden() ) { 179 s.origHeight = $( '#' + id + '_ifr' ).height(); 180 s.mode = 'tinymce'; 181 } else { 182 s.origHeight = s.$dfwTextarea.height(); 183 s.mode = 'html'; 184 } 185 186 // Try to find title field 187 if ( typeof window.adminpage !== 'undefined' && 188 ( window.adminpage === 'post-php' || window.adminpage === 'post-new-php' ) ) { 189 190 titleId = 'title'; 191 } else { 192 titleId = id + '-title'; 193 } 194 195 s.$dfwTitle = $( '#' + titleId ); 196 197 if ( ! s.$dfwTitle.length ) { 198 s.$dfwTitle = null; 199 } 161 200 162 201 api.ui.fade( 'show', 'showing', 'shown' ); … … 188 227 var from = s.mode; 189 228 190 if ( ! to || ! s.visible || ! s.has _tinymce )229 if ( ! to || ! s.visible || ! s.hasTinymce || typeof switchEditors === 'undefined' ) { 191 230 return from; 231 } 192 232 193 233 // Don't switch if the mode is the same. … … 195 235 return from; 196 236 197 ps.publish( 'switchMode', [ from, to ] ); 237 if ( to === 'tinymce' && ! s.editor ) { 238 s.editor = tinymce.get( s.id ); 239 240 if ( ! s.editor && typeof tinyMCEPreInit !== 'undefined' && 241 tinyMCEPreInit.mceInit && tinyMCEPreInit.mceInit[ s.id ] ) { 242 243 // If the TinyMCE instance hasn't been created, set the "wp_fulscreen" flag on creating it 244 tinyMCEPreInit.mceInit[ s.id ].wp_fullscreen = true; 245 } 246 } 247 198 248 s.mode = to; 199 ps.publish( 'switchedMode', [ from, to ] ); 249 switchEditors.go( s.id, to ); 250 api.refreshButtons( true ); 251 252 if ( to === 'html' ) { 253 setTimeout( api.resizeTextarea, 200 ); 254 } 200 255 201 256 return to; … … 207 262 208 263 api.save = function() { 209 var hidden = $('#hiddenaction'), old = hidden.val(), spinner = $('#wp-fullscreen-save .spinner'), 210 message = $('#wp-fullscreen-save span'); 211 212 spinner.show(); 213 api.savecontent(); 214 215 hidden.val('wp-fullscreen-save-post'); 216 217 $.post( ajaxurl, $('form#post').serialize(), function(r){ 218 spinner.hide(); 219 message.show(); 220 221 setTimeout( function(){ 222 message.fadeOut(1000); 223 }, 3000 ); 224 225 if ( r.last_edited ) 226 $('#wp-fullscreen-save input').attr( 'title', r.last_edited ); 227 228 }, 'json'); 229 230 hidden.val(old); 231 }; 232 233 api.savecontent = function() { 234 var ed, content; 235 236 if ( s.title_id ) 237 $('#' + s.title_id).val( $('#wp-fullscreen-title').val() ); 238 239 if ( s.mode === 'tinymce' && (ed = tinymce.get('wp_mce_fullscreen')) ) { 240 content = ed.save(); 241 } else { 242 content = $('#wp_mce_fullscreen').val(); 243 } 244 245 $('#' + s.editor_id).val( content ); 246 $(document).triggerHandler('wpcountwords', [ content ]); 247 }; 248 249 set_title_hint = function( title ) { 250 if ( ! title.val().length ) 251 title.siblings('label').css( 'visibility', '' ); 252 else 253 title.siblings('label').css( 'visibility', 'hidden' ); 254 }; 255 256 api.dfw_width = function(n) { 257 var el = $('#wp-fullscreen-wrap'), w = el.width(); 258 259 if ( !n ) { // reset to theme width 260 el.width( $('#wp-fullscreen-central-toolbar').width() ); 264 var $hidden = $('#hiddenaction'), 265 oldVal = $hidden.val(), 266 $spinner = $('#wp-fullscreen-save .spinner'), 267 $saveMessage = $('#wp-fullscreen-save .wp-fullscreen-saved-message') 268 $errorMessage = $('#wp-fullscreen-save .wp-fullscreen-error-message'); 269 270 $spinner.show(); 271 $errorMessage.hide(); 272 $hidden.val('wp-fullscreen-save-post'); 273 274 if ( s.editor && ! s.editor.isHidden() ) { 275 s.editor.save(); 276 } 277 278 $.ajax({ 279 url: window.ajaxurl, 280 type: 'post', 281 data: $('form#post').serialize(), 282 dataType: 'json' 283 }).done( function( response ) { 284 $spinner.hide(); 285 286 if ( response && response.success ) { 287 $saveMessage.show(); 288 289 setTimeout( function() { 290 $saveMessage.fadeOut(300); 291 }, 3000 ); 292 293 if ( response.data && response.data.last_edited ) { 294 $('#wp-fullscreen-save input').attr( 'title', response.data.last_edited ); 295 } 296 } else { 297 $errorMessage.show(); 298 } 299 }).fail( function() { 300 $spinner.hide(); 301 $errorMessage.show(); 302 }); 303 304 $hidden.val( oldVal ); 305 }; 306 307 api.dfwWidth = function( pixels, total ) { 308 var width; 309 310 if ( ! pixels ) { 311 // reset to theme width 312 width = $('#wp-fullscreen-body').data('theme-width') || 800; 313 s.$editorContainer.width( width ); 314 315 if ( s.$dfwTitle ) { 316 s.$dfwTitle.width( width - 16 ); 317 } 318 261 319 deleteUserSetting('dfw_width'); 262 320 return; 263 321 } 264 322 265 w = n + w; 266 267 if ( w < 200 || w > 1200 ) // sanity check 323 if ( total ) { 324 width = pixels; 325 } else { 326 width = s.$editorContainer.width(); 327 width += pixels; 328 } 329 330 if ( width < 200 || width > 1200 ) { 331 // sanity check 268 332 return; 269 270 el.width( w ); 271 setUserSetting('dfw_width', w); 272 }; 273 274 ps.subscribe( 'showToolbar', function() { 275 s.toolbars.removeClass('fade-1000').addClass('fade-300'); 276 api.fade.In( s.toolbars, 300, function(){ ps.publish('toolbarShown'); }, true ); 277 $('#wp-fullscreen-body').addClass('wp-fullscreen-focus'); 278 s.toolbar_shown = true; 333 } 334 335 s.$editorContainer.width( width ); 336 337 if ( s.$dfwTitle ) { 338 s.$dfwTitle.width( width - 16 ); 339 } 340 341 setUserSetting( 'dfw_width', width ); 342 }; 343 344 // This event occurs before the overlay blocks the UI. 345 ps.subscribe( 'show', function() { 346 var title = $('#last-edit').text(); 347 348 if ( title ) { 349 $('#wp-fullscreen-save input').attr( 'title', title ); 350 } 279 351 }); 280 352 281 ps.subscribe( 'hideToolbar', function() { 282 s.toolbars.removeClass('fade-300').addClass('fade-1000'); 283 api.fade.Out( s.toolbars, 1000, function(){ ps.publish('toolbarHidden'); }, true ); 284 $('#wp-fullscreen-body').removeClass('wp-fullscreen-focus'); 285 }); 286 287 ps.subscribe( 'toolbarShown', function() { 288 s.toolbars.removeClass('fade-300'); 289 }); 290 291 ps.subscribe( 'toolbarHidden', function() { 292 s.toolbars.removeClass('fade-1000'); 293 s.toolbar_shown = false; 294 }); 295 296 ps.subscribe( 'show', function() { // This event occurs before the overlay blocks the UI. 297 var title; 298 299 if ( s.title_id ) { 300 title = $('#wp-fullscreen-title').val( $('#' + s.title_id).val() ); 301 set_title_hint( title ); 302 } 303 304 $('#wp-fullscreen-save input').attr( 'title', $('#last-edit').text() ); 305 306 s.textarea_obj.value = s.qt_canvas.value; 307 308 if ( s.has_tinymce && s.mode === 'tinymce' ) 309 tinymce.execCommand('wpFullScreenInit'); 310 311 s.orig_y = $(window).scrollTop(); 312 }); 313 314 ps.subscribe( 'showing', function() { // This event occurs while the DFW overlay blocks the UI. 315 $( document.body ).addClass( 'fullscreen-active' ); 316 api.refresh_buttons(); 317 318 $( document ).bind( 'mousemove.fullscreen', function(e) { bounder( 'showToolbar', 'hideToolbar', 2000, e ); } ); 319 bounder( 'showToolbar', 'hideToolbar', 2000 ); 353 // This event occurs while the overlay blocks the UI. 354 ps.subscribe( 'showing', function() { 355 $body.addClass( 'wp-fullscreen-active' ); 356 357 s.$dfwWrap.addClass( 'wp-fullscreen-wrap' ); 358 s.$editorContainer.append( $('#wp-fullscreen-status') ); 359 360 if ( s.$dfwTitle ) { 361 s.$dfwTitle.after( '<span id="wp-fullscreen-title-placeholder">' ); 362 s.$dfwWrap.prepend( s.$dfwTitle.addClass('wp-fullscreen-title') ); 363 } 364 365 api.refreshButtons(); 366 resetCssPosition( true ); 367 $('#wpadminbar').hide(); 368 369 // Show the UI for 2 sec. when opening 370 toggleUI('hide'); 320 371 321 372 api.bind_resize(); 322 setTimeout( api.resize_textarea, 200 ); 373 374 if ( s.editor ) { 375 s.editor.execCommand( 'wpFullScreenOn' ); 376 } 377 378 api.dfwWidth( $( '#wp-fullscreen-body' ).data('dfw-width') || 800, true ); 323 379 324 380 // scroll to top so the user is not disoriented 325 381 scrollTo(0, 0); 326 327 // needed it for IE7 and compat mode328 $('#wpadminbar').hide();329 382 }); 330 383 331 ps.subscribe( 'shown', function() { // This event occurs after the DFW overlay is shown 332 var interim_init; 333 384 // This event occurs after the overlay unblocks the UI 385 ps.subscribe( 'shown', function() { 334 386 s.visible = true; 335 387 336 // init the standard TinyMCE instance if missing 337 if ( s.has_tinymce && ! s.is_mce_on ) { 338 339 interim_init = function(mce, ed) { 340 var el = ed.getElement(), old_val = el.value, settings = tinyMCEPreInit.mceInit[s.editor_id]; 341 342 if ( settings && settings.wpautop && typeof(switchEditors) != 'undefined' ) 343 el.value = switchEditors.wpautop( el.value ); 344 345 ed.onInit.add(function(ed) { 346 ed.hide(); 347 ed.getElement().value = old_val; 348 tinymce.onAddEditor.remove(interim_init); 349 }); 350 }; 351 352 tinymce.onAddEditor.add(interim_init); 353 tinymce.init(tinyMCEPreInit.mceInit[s.editor_id]); 354 355 s.is_mce_on = true; 356 } 357 358 wpActiveEditor = 'wp_mce_fullscreen'; 388 if ( s.editor && ! s.editor.isHidden() ) { 389 s.editor.execCommand( 'wpAutoResize' ); 390 } else { 391 api.resizeTextarea( 'force' ); 392 } 359 393 }); 360 394 361 395 ps.subscribe( 'hide', function() { // This event occurs before the overlay blocks DFW. 362 var htmled_is_hidden = $('#' + s.editor_id).is(':hidden'); 363 // Make sure the correct editor is displaying. 364 if ( s.has_tinymce && s.mode === 'tinymce' && !htmled_is_hidden ) { 365 switchEditors.go(s.editor_id, 'tmce'); 366 } else if ( s.mode === 'html' && htmled_is_hidden ) { 367 switchEditors.go(s.editor_id, 'html'); 368 } 369 370 // Save content must be after switchEditors or content will be overwritten. See #17229. 371 api.savecontent(); 372 373 $( document ).unbind( '.fullscreen' ); 374 $(s.textarea_obj).unbind('.grow'); 375 376 if ( s.has_tinymce && s.mode === 'tinymce' ) 377 tinymce.execCommand('wpFullScreenSave'); 378 379 if ( s.title_id ) 380 set_title_hint( $('#' + s.title_id) ); 381 382 s.qt_canvas.value = s.textarea_obj.value; 396 $document.unbind( '.fullscreen' ); 397 s.$dfwTextarea.unbind('.wp-dfw-resize'); 383 398 }); 384 399 385 400 ps.subscribe( 'hiding', function() { // This event occurs while the overlay blocks the DFW UI. 386 387 $( document.body ).removeClass( 'fullscreen-active' ); 388 scrollTo(0, s.orig_y); 401 $body.removeClass( 'wp-fullscreen-active' ); 402 $( '#wp-fullscreen-body' ).append( $('#wp-fullscreen-status') ); 403 404 if ( s.$dfwTitle ) { 405 $( '#wp-fullscreen-title-placeholder' ).before( s.$dfwTitle.removeClass('wp-fullscreen-title') ).remove(); 406 } 407 408 s.$dfwWrap.removeClass( 'wp-fullscreen-wrap' ) 409 s.$editorContainer.css( 'width', '' ); 410 s.$dfwTextarea.add( '#' + s.id + '_ifr' ).height( s.origHeight ); 411 412 if ( s.editor ) { 413 s.editor.execCommand( 'wpFullScreenOff' ); 414 } 415 416 resetCssPosition( false ); 417 418 window.scrollTo( 0, uiScrollTop ); 389 419 $('#wpadminbar').show(); 390 420 }); 391 421 392 ps.subscribe( 'hidden', function() { // This event occurs after DFW is removed. 422 // This event occurs after DFW is removed. 423 ps.subscribe( 'hidden', function() { 393 424 s.visible = false; 394 $('#wp_mce_fullscreen, #wp-fullscreen-title').removeAttr('style');395 396 if ( s.has_tinymce && s.is_mce_on )397 tinymce.execCommand('wpFullScreenClose');398 399 s.textarea_obj.value = '';400 api.oldheight = 0;401 wpActiveEditor = s.editor_id;402 425 }); 403 426 404 ps.subscribe( 'switchMode', function( from, to ) { 405 var ed; 406 407 if ( !s.has_tinymce || !s.is_mce_on ) 408 return; 409 410 ed = tinymce.get('wp_mce_fullscreen'); 411 412 if ( from === 'html' && to === 'tinymce' ) { 413 414 if ( tinymce.get(s.editor_id).getParam('wpautop') && typeof(switchEditors) != 'undefined' ) 415 s.textarea_obj.value = switchEditors.wpautop( s.textarea_obj.value ); 416 417 if ( 'undefined' == typeof(ed) ) 418 tinymce.execCommand('wpFullScreenInit'); 419 else 420 ed.show(); 421 422 } else if ( from === 'tinymce' && to === 'html' ) { 423 if ( ed ) 424 ed.hide(); 425 } 426 }); 427 428 ps.subscribe( 'switchedMode', function( from, to ) { 429 api.refresh_buttons(true); 430 431 if ( to === 'html' ) 432 setTimeout( api.resize_textarea, 200 ); 433 }); 434 435 /** 436 * Buttons 437 */ 438 api.b = function() { 439 if ( s.has_tinymce && 'tinymce' === s.mode ) 440 tinymce.execCommand('Bold'); 441 }; 442 443 api.i = function() { 444 if ( s.has_tinymce && 'tinymce' === s.mode ) 445 tinymce.execCommand('Italic'); 446 }; 447 448 api.ul = function() { 449 if ( s.has_tinymce && 'tinymce' === s.mode ) 450 tinymce.execCommand('InsertUnorderedList'); 451 }; 452 453 api.ol = function() { 454 if ( s.has_tinymce && 'tinymce' === s.mode ) 455 tinymce.execCommand('InsertOrderedList'); 456 }; 457 458 api.link = function() { 459 if ( s.has_tinymce && 'tinymce' === s.mode ) 460 tinymce.execCommand('WP_Link'); 461 else 462 wpLink.open(); 463 }; 464 465 api.unlink = function() { 466 if ( s.has_tinymce && 'tinymce' === s.mode ) 467 tinymce.execCommand('unlink'); 468 }; 469 470 api.atd = function() { 471 if ( s.has_tinymce && 'tinymce' === s.mode ) 472 tinymce.execCommand('mceWritingImprovementTool'); 473 }; 474 475 api.help = function() { 476 if ( s.has_tinymce && 'tinymce' === s.mode ) 477 tinymce.execCommand('WP_Help'); 478 }; 479 480 api.blockquote = function() { 481 if ( s.has_tinymce && 'tinymce' === s.mode ) 482 tinymce.execCommand('mceBlockQuote'); 483 }; 484 485 api.medialib = function() { 486 if ( typeof wp !== 'undefined' && wp.media && wp.media.editor ) 487 wp.media.editor.open(s.editor_id); 488 }; 489 490 api.refresh_buttons = function( fade ) { 491 fade = fade || false; 492 427 api.refreshButtons = function( fade ) { 493 428 if ( s.mode === 'html' ) { 494 429 $('#wp-fullscreen-mode-bar').removeClass('wp-tmce-mode').addClass('wp-html-mode'); 495 430 496 if ( fade ) 431 if ( fade ) { 497 432 $('#wp-fullscreen-button-bar').fadeOut( 150, function(){ 498 433 $(this).addClass('wp-html-mode').fadeIn( 150 ); 499 434 }); 500 else435 } else { 501 436 $('#wp-fullscreen-button-bar').addClass('wp-html-mode'); 502 437 } 503 438 } else if ( s.mode === 'tinymce' ) { 504 439 $('#wp-fullscreen-mode-bar').removeClass('wp-html-mode').addClass('wp-tmce-mode'); 505 440 506 if ( fade ) 441 if ( fade ) { 507 442 $('#wp-fullscreen-button-bar').fadeOut( 150, function(){ 508 443 $(this).removeClass('wp-html-mode').fadeIn( 150 ); 509 444 }); 510 else445 } else { 511 446 $('#wp-fullscreen-button-bar').removeClass('wp-html-mode'); 447 } 512 448 } 513 449 }; … … 520 456 api.ui = { 521 457 init: function() { 522 var topbar = $('#fullscreen-topbar'), txtarea = $('#wp_mce_fullscreen'), last = 0; 523 524 s.toolbars = topbar.add( $('#wp-fullscreen-status') ); 525 s.element = $('#fullscreen-fader'); 526 s.textarea_obj = txtarea[0]; 527 s.has_tinymce = typeof(tinymce) != 'undefined'; 528 529 if ( !s.has_tinymce ) 458 var toolbar, last = 0; 459 460 s.toolbar = toolbar = $('#fullscreen-topbar'); 461 s.$fullscreenFader = $('#fullscreen-fader'); 462 s.hasTinymce = typeof tinymce !== 'undefined'; 463 464 if ( ! s.hasTinymce ) 530 465 $('#wp-fullscreen-mode-bar').hide(); 531 466 532 if ( wptitlehint && $('#wp-fullscreen-title').length ) 533 wptitlehint('wp-fullscreen-title'); 534 535 $(document).keyup(function(e){ 467 $document.keyup( function(e) { 536 468 var c = e.keyCode || e.charCode, a, data; 537 469 538 if ( !fullscreen.settings.visible ) 539 return true; 540 541 if ( navigator.platform && navigator.platform.indexOf('Mac') != -1 ) 470 if ( ! s.visible ) { 471 return; 472 } 473 474 if ( navigator.platform && navigator.platform.indexOf('Mac') !== -1 ) { 542 475 a = e.ctrlKey; // Ctrl key for Mac 543 else476 } else { 544 477 a = e.altKey; // Alt key for Win & Linux 478 } 545 479 546 480 if ( 27 == c ) { // Esc … … 556 490 }; 557 491 558 if ( ! jQuery(document).triggerHandler( 'wp_CloseOnEscape', [data] ) )492 if ( ! $(document).triggerHandler( 'wp_CloseOnEscape', [data] ) ) { 559 493 fullscreen.off(); 494 } 560 495 } 561 496 562 497 if ( a && (61 == c || 107 == c || 187 == c) ) { // + 563 api.dfw _width(25);498 api.dfwWidth( 25 ); 564 499 e.preventDefault(); 565 500 } 566 501 567 502 if ( a && (45 == c || 109 == c || 189 == c) ) { // - 568 api.dfw _width(-25);503 api.dfwWidth( -25 ); 569 504 e.preventDefault(); 570 505 } 571 506 572 507 if ( a && 48 == c ) { // 0 573 api.dfw _width(0);508 api.dfwWidth( 0 ); 574 509 e.preventDefault(); 575 510 } 576 511 }); 577 512 578 // word count in Text mode 579 if ( typeof(wpWordCount) != 'undefined' ) { 580 581 txtarea.keyup( function(e) { 582 var k = e.keyCode || e.charCode; 583 584 if ( k == last ) 585 return true; 586 587 if ( 13 == k || 8 == last || 46 == last ) 588 $(document).triggerHandler('wpcountwords', [ txtarea.val() ]); 589 590 last = k; 591 return true; 592 }); 593 } 594 595 topbar.mouseenter(function(){ 596 s.toolbars.addClass('fullscreen-make-sticky'); 597 $( document ).unbind( '.fullscreen' ); 598 clearTimeout( s.timer ); 599 s.timer = 0; 600 }).mouseleave(function(){ 601 s.toolbars.removeClass('fullscreen-make-sticky'); 602 603 if ( s.visible ) 604 $( document ).bind( 'mousemove.fullscreen', function(e) { bounder( 'showToolbar', 'hideToolbar', 2000, e ); } ); 513 toolbar.on( 'mouseenter', function() { 514 toggleUI('show'); 515 }).on( 'mouseleave', function() { 516 toggleUI('hide'); 517 }); 518 519 // Bind buttons 520 $('#wp-fullscreen-buttons').on( 'click.wp-fullscreen', function( event ) { 521 var command = event.target.id && event.target.id.substr(6); 522 523 if ( s.editor && 'tinymce' === s.mode ) { 524 switch( command ) { 525 case 'bold': 526 s.editor.execCommand('Bold'); 527 break; 528 case 'italic': 529 s.editor.execCommand('Italic'); 530 break; 531 case 'bullist': 532 s.editor.execCommand('InsertUnorderedList'); 533 break; 534 case 'numlist': 535 s.editor.execCommand('InsertOrderedList'); 536 break; 537 case 'link': 538 s.editor.execCommand('WP_Link'); 539 break; 540 case 'unlink': 541 s.editor.execCommand('unlink'); 542 break; 543 case 'image': 544 s.editor.execCommand('mceImage'); 545 break; 546 case 'help': 547 s.editor.execCommand('WP_Help'); 548 break; 549 case 'blockquote': 550 s.editor.execCommand('mceBlockQuote'); 551 break; 552 } 553 } else if ( command === 'link' && window.wpLink ) { 554 window.wpLink.open(); 555 } 556 557 if ( command === 'wp-media-library' && typeof wp !== 'undefined' && wp.media && wp.media.editor ) { 558 wp.media.editor.open( s.id ); 559 } 605 560 }); 606 561 }, 607 562 608 563 fade: function( before, during, after ) { 609 if ( ! s. element )564 if ( ! s.$fullscreenFader ) { 610 565 api.ui.init(); 566 } 611 567 612 568 // If any callback bound to before returns false, bail. 613 if ( before && ! ps.publish( before ) ) 569 if ( before && ! ps.publish( before ) ) { 614 570 return; 615 616 api.fade.In( s.element, 600, function() { 617 if ( during ) 571 } 572 573 api.fade.In( s.$fullscreenFader, 200, function() { 574 if ( during ) { 618 575 ps.publish( during ); 619 620 api.fade.Out( s.element, 600, function() { 621 if ( after ) 576 } 577 578 api.fade.Out( s.$fullscreenFader, 200, function() { 579 if ( after ) { 622 580 ps.publish( after ); 581 } 623 582 }); 624 583 }); … … 627 586 628 587 api.fade = { 629 transitionend: 'transitionend webkitTransitionEnd oTransitionEnd',630 631 588 // Sensitivity to allow browsers to render the blank element before animating. 632 589 sensitivity: 100, … … 645 602 646 603 element.show(); 647 element.first().one( t his.transitionend, function() {604 element.first().one( transitionend, function() { 648 605 callback(); 649 606 }); 607 650 608 setTimeout( function() { element.addClass( 'fade-trigger' ); }, this.sensitivity ); 651 609 } else { 652 if ( stop ) 610 if ( stop ) { 653 611 element.stop(); 612 } 654 613 655 614 element.css( 'opacity', 1 ); 656 615 element.first().fadeIn( speed, callback ); 657 616 658 if ( element.length > 1 ) 617 if ( element.length > 1 ) { 659 618 element.not(':first').fadeIn( speed ); 619 } 660 620 } 661 621 … … 669 629 stop = stop || false; 670 630 671 if ( ! element.is(':visible') ) 631 if ( ! element.is(':visible') ) { 672 632 return element; 633 } 673 634 674 635 if ( api.fade.transitions ) { 675 element.first().one( api.fade.transitionend, function() {676 if ( element.hasClass('fade-trigger') ) 636 element.first().one( transitionend, function() { 637 if ( element.hasClass('fade-trigger') ) { 677 638 return; 639 } 678 640 679 641 element.hide(); … … 682 644 setTimeout( function() { element.removeClass( 'fade-trigger' ); }, this.sensitivity ); 683 645 } else { 684 if ( stop ) 646 if ( stop ) { 685 647 element.stop(); 648 } 686 649 687 650 element.first().fadeOut( speed, callback ); 688 651 689 if ( element.length > 1 ) 652 if ( element.length > 1 ) { 690 653 element.not(':first').fadeOut( speed ); 654 } 691 655 } 692 656 … … 694 658 }, 695 659 696 transitions: (function() { // Check if the browser supports CSS 3.0 transitions 697 var s = document.documentElement.style; 698 699 return ( typeof ( s.WebkitTransition ) == 'string' || 700 typeof ( s.MozTransition ) == 'string' || 701 typeof ( s.OTransition ) == 'string' || 702 typeof ( s.transition ) == 'string' ); 660 // Check if the browser supports CSS 3.0 transitions 661 transitions: ( function() { 662 var style = document.documentElement.style; 663 664 return ( typeof style.WebkitTransition === 'string' || 665 typeof style.MozTransition === 'string' || 666 typeof style.OTransition === 'string' || 667 typeof style.transition === 'string' ); 703 668 })() 704 669 }; … … 709 674 * Automatically updates textarea height. 710 675 */ 711 712 676 api.bind_resize = function() { 713 $(s.textarea_obj).bind('keypress.grow click.grow paste.grow', function(){714 setTimeout( api.resize_textarea, 200);677 s.$dfwTextarea.on( 'keydown.wp-dfw-resize click.wp-dfw-resize paste.wp-dfw-resize', function(e) { 678 api.resizeTextarea(e); 715 679 }); 716 680 }; 717 681 718 api.oldheight = 0; 719 api.resize_textarea = function() { 720 var txt = s.textarea_obj, newheight; 721 722 newheight = txt.scrollHeight > 300 ? txt.scrollHeight : 300; 723 724 if ( newheight != api.oldheight ) { 725 txt.style.height = newheight + 'px'; 726 api.oldheight = newheight; 727 } 728 }; 729 730 })(jQuery); 682 api.resizeTextarea = function( event ) { 683 var node = s.$dfwTextarea[0]; 684 685 if ( node.scrollHeight > node.clientHeight ) { 686 node.style.height = node.scrollHeight + 50 + 'px'; 687 } 688 }; 689 690 // Export 691 window.wp = window.wp || {}; 692 window.wp.editor = window.wp.editor || {}; 693 window.wp.editor.fullscreen = api; 694 695 })( jQuery, window ); -
trunk/src/wp-includes/class-wp-editor.php
r26315 r26876 190 190 if ( self::$this_tinymce ) { 191 191 192 if ( empty(self::$first_init) ) { 193 self::$baseurl = includes_url('js/tinymce'); 194 self::$mce_locale = $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1 192 if ( empty( self::$first_init ) ) { 193 self::$baseurl = includes_url( 'js/tinymce' ); 194 $mce_locale = get_locale(); 195 196 if ( empty( $mce_locale ) || 'en' == substr( $mce_locale, 0, 2 ) ) { 197 $mce_locale = 'en'; 198 } 199 200 self::$mce_locale = $mce_locale; 195 201 $no_captions = (bool) apply_filters( 'disable_captions', '' ); 196 $plugins = array( 'inlinepopups', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' );197 202 $first_run = true; 198 203 $ext_plugins = ''; 199 204 200 205 if ( $set['teeny'] ) { 201 self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs' ), $editor_id );206 self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array( 'fullscreen', 'link', 'image', 'wordpress', 'wplink' ), $editor_id ); 202 207 } else { 203 /* 204 The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'. 205 It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin. 206 The url should be absolute and should include the js file name to be loaded. Example: 207 array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' ) 208 If the plugin uses a button, it should be added with one of the "$mce_buttons" filters. 209 */ 210 $mce_external_plugins = apply_filters('mce_external_plugins', array()); 211 212 if ( ! empty($mce_external_plugins) ) { 213 214 /* 215 The following filter loads external language files for TinyMCE plugins. 216 It takes an associative array 'plugin_name' => 'path', where path is the 217 include path to the file. The language file should follow the same format as 218 /tinymce/langs/wp-langs.php and should define a variable $strings that 219 holds all translated strings. 220 When this filter is not used, the function will try to load {mce_locale}.js. 221 If that is not found, en.js will be tried next. 222 */ 223 $mce_external_languages = apply_filters('mce_external_languages', array()); 208 /** 209 * TinyMCE external plugins filter 210 * 211 * Takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'. 212 * The url should be absolute and should include the js file name to be loaded. 213 * Example: 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js'. 214 * If the plugin adds a button, it should be added with one of the "$mce_buttons" filters. 215 */ 216 $mce_external_plugins = apply_filters( 'mce_external_plugins', array() ); 217 218 /** 219 * TinyMCE default plugins filter 220 * 221 * Specifies which of the default plugins that are included in WordPress should be added to 222 * the TinyMCE instance. 223 */ 224 $plugins = array_unique( apply_filters( 'tiny_mce_plugins', array( 225 'charmap', 226 'link', 227 'media', 228 'paste', 229 'tabfocus', 230 'textcolor', 231 'image', 232 'fullscreen', 233 'wordpress', 234 'wpeditimage', 235 'wpgallery', 236 'wplink', 237 ) ) ); 238 239 if ( ! empty( $mce_external_plugins ) ) { 240 /** 241 * This filter loads translations for external TinyMCE 3.x plugins. 242 * 243 * Takes an associative array 'plugin_name' => 'path', where path is the 244 * include path to the file. The language file should follow the same format as 245 * wp_mce_translation() and should define a variable $strings that 246 * holds all translated strings. 247 */ 248 $mce_external_languages = apply_filters( 'mce_external_languages', array() ); 224 249 225 250 $loaded_langs = array(); 226 251 $strings = ''; 227 252 228 if ( ! empty( $mce_external_languages) ) {253 if ( ! empty( $mce_external_languages ) ) { 229 254 foreach ( $mce_external_languages as $name => $path ) { 230 if ( @is_file( $path) && @is_readable($path) ) {231 include_once( $path);255 if ( @is_file( $path ) && @is_readable( $path ) ) { 256 include_once( $path ); 232 257 $ext_plugins .= $strings . "\n"; 233 258 $loaded_langs[] = $name; … … 237 262 238 263 foreach ( $mce_external_plugins as $name => $url ) { 264 if ( in_array( $name, $plugins, true ) ) { 265 unset( $mce_external_plugins[ $name ] ); 266 continue; 267 } 239 268 240 269 $url = set_url_scheme( $url ); 241 242 $plugins[] = '-' . $name; 243 244 $plugurl = dirname($url); 245 $strings = $str1 = $str2 = ''; 246 if ( ! in_array($name, $loaded_langs) ) { 247 $path = str_replace( content_url(), '', $plugurl ); 248 $path = WP_CONTENT_DIR . $path . '/langs/'; 249 250 if ( function_exists('realpath') ) 251 $path = trailingslashit( realpath($path) ); 252 253 if ( @is_file($path . $mce_locale . '.js') ) 254 $strings .= @file_get_contents($path . $mce_locale . '.js') . "\n"; 255 256 if ( @is_file($path . $mce_locale . '_dlg.js') ) 257 $strings .= @file_get_contents($path . $mce_locale . '_dlg.js') . "\n"; 258 259 if ( 'en' != $mce_locale && empty($strings) ) { 260 if ( @is_file($path . 'en.js') ) { 261 $str1 = @file_get_contents($path . 'en.js'); 262 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str1, 1 ) . "\n"; 263 } 264 265 if ( @is_file($path . 'en_dlg.js') ) { 266 $str2 = @file_get_contents($path . 'en_dlg.js'); 267 $strings .= preg_replace( '/([\'"])en\./', '$1' . $mce_locale . '.', $str2, 1 ) . "\n"; 268 } 269 } 270 271 if ( ! empty($strings) ) 272 $ext_plugins .= "\n" . $strings . "\n"; 270 $mce_external_plugins[ $name ] = $url; 271 $plugurl = dirname( $url ); 272 273 if ( in_array( $name, $loaded_langs ) ) { 274 $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n"; 273 275 } 274 275 $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";276 $ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";277 276 } 278 277 } 279 280 $plugins = array_unique( apply_filters('tiny_mce_plugins', $plugins) );281 278 } 282 279 … … 287 284 self::$ext_plugins = $ext_plugins; 288 285 289 if ( in_array( 'spellchecker', $plugins ) ) {290 /*291 translators: These languages show up in the spellchecker drop-down menu, in the order specified, and with the first292 language listed being the default language. They must be comma-separated and take the format of name=code, where name293 is the language name (which you may internationalize), and code is a valid ISO 639 language code. Please test the294 spellchecker with your values.295 */296 $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' );297 298 /*299 The following filter allows localization scripts to change the languages displayed in the spellchecker's drop-down menu.300 By default it uses Google's spellchecker API, but can be configured to use PSpell/ASpell if installed on the server.301 The + sign marks the default language. More: http://www.tinymce.com/wiki.php/Plugin:spellchecker.302 */303 $mce_spellchecker_languages = apply_filters( 'mce_spellchecker_languages', '+' . $mce_spellchecker_languages );304 }305 306 286 self::$first_init = array( 307 'mode' => 'exact', 308 'width' => '100%', 309 'theme' => 'advanced', 310 'skin' => 'wp_theme', 287 'theme' => 'modern', 288 'skin' => 'lightgray', 311 289 'language' => self::$mce_locale, 312 'theme_advanced_toolbar_location' => 'top', 313 'theme_advanced_toolbar_align' => 'left', 314 'theme_advanced_statusbar_location' => 'bottom', 315 'theme_advanced_resizing' => true, 316 'theme_advanced_resize_horizontal' => false, 317 'dialog_type' => 'modal', 290 'resize' => 'vertical', 318 291 'formats' => "{ 319 alignleft 320 {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign :'left'}},321 {selector : 'img,table', classes: 'alignleft'}292 alignleft: [ 293 {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign:'left'}}, 294 {selector: 'img,table,dl.wp-caption', classes: 'alignleft'} 322 295 ], 323 aligncenter 324 {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign :'center'}},325 {selector : 'img,table', classes: 'aligncenter'}296 aligncenter: [ 297 {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign:'center'}}, 298 {selector: 'img,table,dl.wp-caption', classes: 'aligncenter'} 326 299 ], 327 alignright 328 {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles : {textAlign :'right'}},329 {selector : 'img,table', classes: 'alignright'}300 alignright: [ 301 {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li', styles: {textAlign:'right'}}, 302 {selector: 'img,table,dl.wp-caption', classes: 'alignright'} 330 303 ], 331 strikethrough : {inline: 'del'}304 strikethrough: {inline: 'del'} 332 305 }", 333 306 'relative_urls' => false, 334 307 'remove_script_host' => false, 335 308 'convert_urls' => false, 336 'remove_linebreaks' => true, 337 'gecko_spellcheck' => true, 309 'browser_spellcheck' => true, 338 310 'fix_list_elements' => true, 311 'entities' => '38,amp,60,lt,62,gt', 312 'entity_encoding' => 'raw', 313 'menubar' => false, 314 'object_resizing' => false, 339 315 'keep_styles' => false, 340 'entities' => '38,amp,60,lt,62,gt',341 'accessibility_focus' => true,342 'media_strict' => false,343 316 'paste_remove_styles' => true, 344 'paste_remove_spans' => true, 345 'paste_strip_class_attributes' => 'all', 346 'paste_text_use_dialog' => true, 347 'webkit_fake_resize' => false, 348 'preview_styles' => 'font-family font-weight text-decoration text-transform', 349 'schema' => 'html5', 317 318 // limit the preview styles in the menu/toolbar 319 // 'preview_styles' => 'font-family font-weight font-style text-decoration text-transform color background-color border', 320 350 321 'wpeditimage_disable_captions' => $no_captions, 351 'wp_fullscreen_content_css' => self::$baseurl . '/plugins/wpfullscreen/css/wp-fullscreen.css', 352 'plugins' => implode( ',', $plugins ) 322 'plugins' => implode( ',', $plugins ), 353 323 ); 354 324 355 if ( in_array( 'spellchecker', $plugins ) ) { 325 if ( ! empty( $mce_external_plugins ) ) { 326 self::$first_init['external_plugins'] = json_encode( $mce_external_plugins ); 327 } 328 329 if ( in_array( 'spellchecker', $plugins, true ) ) { 356 330 self::$first_init['spellchecker_rpc_url'] = self::$baseurl . '/plugins/spellchecker/rpc.php'; 357 self::$first_init['spellchecker_language s'] = $mce_spellchecker_languages;331 self::$first_init['spellchecker_language'] = self::$mce_locale; 358 332 } 333 334 // WordPress default stylesheet 335 $mce_css = array( self::$baseurl . '/skins/wordpress/wp-content.css' ); 359 336 360 337 // load editor_style.css if the current theme supports it … … 362 339 $editor_styles = $GLOBALS['editor_styles']; 363 340 364 $mce_css = array();365 341 $editor_styles = array_unique( array_filter( $editor_styles ) ); 366 342 $style_uri = get_stylesheet_directory_uri(); … … 390 366 $mce_css[] = "$style_uri/$file"; 391 367 } 392 393 $mce_css = implode( ',', $mce_css );394 } else {395 $mce_css = '';396 368 } 397 369 398 $mce_css = trim( apply_filters( 'mce_css', $mce_css), ' ,' );370 $mce_css = trim( apply_filters( 'mce_css', implode( ',', $mce_css ) ), ' ,' ); 399 371 400 372 if ( ! empty($mce_css) ) … … 403 375 404 376 if ( $set['teeny'] ) { 405 $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 );377 $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 ); 406 378 $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array(); 407 379 } else { 408 $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);409 $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);380 $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); 381 $mce_buttons_2 = apply_filters('mce_buttons_2', array( 'formatselect', 'underline', 'alignjustify', 'forecolor', 'pastetext', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' ), $editor_id); 410 382 $mce_buttons_3 = apply_filters('mce_buttons_3', array(), $editor_id); 411 383 $mce_buttons_4 = apply_filters('mce_buttons_4', array(), $editor_id); … … 443 415 444 416 $mceInit = array ( 445 ' elements' => $editor_id,417 'selector' => "#$editor_id", 446 418 'wpautop' => (bool) $set['wpautop'], 447 'remove_linebreaks' => (bool) $set['wpautop'], 448 'apply_source_formatting' => (bool) !$set['wpautop'], 449 'theme_advanced_buttons1' => implode($mce_buttons, ','), 450 'theme_advanced_buttons2' => implode($mce_buttons_2, ','), 451 'theme_advanced_buttons3' => implode($mce_buttons_3, ','), 452 'theme_advanced_buttons4' => implode($mce_buttons_4, ','), 419 'indent' => ! $set['wpautop'], 420 'toolbar1' => implode($mce_buttons, ','), 421 'toolbar2' => implode($mce_buttons_2, ','), 422 'toolbar3' => implode($mce_buttons_3, ','), 423 'toolbar4' => implode($mce_buttons_4, ','), 453 424 'tabfocus_elements' => $set['tabfocus_elements'], 454 425 'body_class' => $body_class 455 426 ); 456 427 457 // The main editor doesn't use the TinyMCE resizing cookie.458 $mceInit['theme_advanced_resizing_use_cookie'] = 'content' !== $editor_id || empty( $set['editor_height'] );459 460 428 if ( $first_run ) 461 $mceInit = array_merge( self::$first_init, $mceInit);462 463 if ( is_array( $set['tinymce']) )464 $mceInit = array_merge( $mceInit, $set['tinymce']);429 $mceInit = array_merge( self::$first_init, $mceInit ); 430 431 if ( is_array( $set['tinymce'] ) ) 432 $mceInit = array_merge( $mceInit, $set['tinymce'] ); 465 433 466 434 // For people who really REALLY know what they're doing with TinyMCE … … 469 437 // Best is to use the default cleanup by not specifying valid_elements, as TinyMCE contains full set of XHTML 1.0. 470 438 if ( $set['teeny'] ) { 471 $mceInit = apply_filters( 'teeny_mce_before_init', $mceInit, $editor_id);439 $mceInit = apply_filters( 'teeny_mce_before_init', $mceInit, $editor_id ); 472 440 } else { 473 $mceInit = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id);474 } 475 476 if ( empty( $mceInit['theme_advanced_buttons3']) && !empty($mceInit['theme_advanced_buttons4']) ) {477 $mceInit['t heme_advanced_buttons3'] = $mceInit['theme_advanced_buttons4'];478 $mceInit['t heme_advanced_buttons4'] = '';441 $mceInit = apply_filters( 'tiny_mce_before_init', $mceInit, $editor_id ); 442 } 443 444 if ( empty( $mceInit['toolbar3'] ) && ! empty( $mceInit['toolbar4'] ) ) { 445 $mceInit['toolbar3'] = $mceInit['toolbar4']; 446 $mceInit['toolbar4'] = ''; 479 447 } 480 448 … … 512 480 if ( in_array('wplink', self::$plugins, true) || in_array('link', self::$qt_buttons, true) ) { 513 481 wp_enqueue_script('wplink'); 514 wp_enqueue_script('wpdialogs -popup');482 wp_enqueue_script('wpdialogs'); 515 483 wp_enqueue_style('wp-jquery-ui-dialog'); 516 484 } … … 520 488 521 489 if ( self::$has_medialib ) { 522 add_thickbox();490 // add_thickbox(); // ? 523 491 wp_enqueue_script('media-upload'); 524 492 } 493 } 494 495 public static function wp_mce_translation() { 496 497 $mce_translation = array( 498 // Default TinyMCE strings 499 'Cut' => __('Cut'), 500 'Header 2' => __('Header 2'), 501 '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.'), 502 'Div' => __('Div'), 503 'Paste' => __('Paste'), 504 'Close' => __('Close'), 505 'Pre' => __('Pre'), 506 'Align right' => __('Align right'), 507 'New document' => __('New document'), 508 'Blockquote' => __('Blockquote'), 509 'Numbered list' => __('Numbered list'), 510 'Increase indent' => __('Increase indent'), 511 'Formats' => __('Formats'), 512 'Headers' => __('Headers'), 513 'Select all' => __('Select all'), 514 'Header 3' => __('Header 3'), 515 'Blocks' => __('Blocks'), 516 'Undo' => __('Undo'), 517 'Strikethrough' => __('Strikethrough'), 518 'Bullet list' => __('Bullet list'), 519 'Header 1' => __('Header 1'), 520 'Superscript' => __('Superscript'), 521 'Clear formatting' => __('Clear formatting'), 522 'Subscript' => __('Subscript'), 523 'Header 6' => __('Header 6'), 524 'Redo' => __('Redo'), 525 'Paragraph' => __('Paragraph'), 526 'Ok' => __('Ok'), 527 'Bold' => __('Bold'), 528 'Code' => __('Code'), 529 'Italic' => __('Italic'), 530 'Align center' => __('Align center'), 531 'Header 5' => __('Header 5'), 532 'Decrease indent' => __('Decrease indent'), 533 'Header 4' => __('Header 4'), 534 '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.'), 535 'Underline' => __('Underline'), 536 'Cancel' => __('Cancel'), 537 'Justify' => __('Justify'), 538 'Inline' => __('Inline'), 539 'Copy' => __('Copy'), 540 'Align left' => __('Align left'), 541 'Visual aids' => __('Visual aids'), 542 'Lower Greek' => __('Lower Greek'), 543 'Square' => __('Square'), 544 'Default' => __('Default'), 545 'Lower Alpha' => __('Lower Alpha'), 546 'Circle' => __('Circle'), 547 'Disc' => __('Disc'), 548 'Upper Alpha' => __('Upper Alpha'), 549 'Upper Roman' => __('Upper Roman'), 550 'Lower Roman' => __('Lower Roman'), 551 'Name' => __('Name'), 552 'Anchor' => __('Anchor'), 553 'You have unsaved changes are you sure you want to navigate away?' => __('You have unsaved changes are you sure you want to navigate away?'), 554 'Restore last draft' => __('Restore last draft'), 555 'Special character' => __('Special character'), 556 'Source code' => __('Source code'), 557 'Right to left' => __('Right to left'), 558 'Left to right' => __('Left to right'), 559 'Emoticons' => __('Emoticons'), 560 'Robots' => __('Robots'), 561 'Document properties' => __('Document properties'), 562 'Title' => __('Title'), 563 'Keywords' => __('Keywords'), 564 'Encoding' => __('Encoding'), 565 'Description' => __('Description'), 566 'Author' => __('Author'), 567 'Fullscreen' => __('Fullscreen'), 568 'Horizontal line' => __('Horizontal line'), 569 'Horizontal space' => __('Horizontal space'), 570 'Insert/edit image' => __('Insert/edit image'), 571 'General' => __('General'), 572 'Advanced' => __('Advanced'), 573 'Source' => __('Source'), 574 'Border' => __('Border'), 575 'Constrain proportions' => __('Constrain proportions'), 576 'Vertical space' => __('Vertical space'), 577 'Image description' => __('Image description'), 578 'Style' => __('Style'), 579 'Dimensions' => __('Dimensions'), 580 'Insert image' => __('Insert image'), 581 'Insert date/time' => __('Insert date/time'), 582 'Remove link' => __('Remove link'), 583 'Url' => __('Url'), 584 'Text to display' => __('Text to display'), 585 'Anchors' => __('Anchors'), 586 'Insert link' => __('Insert link'), 587 'New window' => __('New window'), 588 'None' => __('None'), 589 'Target' => __('Target'), 590 'Insert/edit link' => __('Insert/edit link'), 591 'Insert/edit video' => __('Insert/edit video'), 592 'Poster' => __('Poster'), 593 'Alternative source' => __('Alternative source'), 594 'Paste your embed code below:' => __('Paste your embed code below:'), 595 'Insert video' => __('Insert video'), 596 'Embed' => __('Embed'), 597 'Nonbreaking space' => __('Nonbreaking space'), 598 'Page break' => __('Page break'), 599 'Paste as text' => __('Paste as text'), 600 'Preview' => __('Preview'), 601 'Print' => __('Print'), 602 'Save' => __('Save'), 603 'Could not find the specified string.' => __('Could not find the specified string.'), 604 'Replace' => __('Replace'), 605 'Next' => __('Next'), 606 'Whole words' => __('Whole words'), 607 'Find and replace' => __('Find and replace'), 608 'Replace with' => __('Replace with'), 609 'Find' => __('Find'), 610 'Replace all' => __('Replace all'), 611 'Match case' => __('Match case'), 612 'Prev' => __('Prev'), 613 'Spellcheck' => __('Spellcheck'), 614 'Finish' => __('Finish'), 615 'Ignore all' => __('Ignore all'), 616 'Ignore' => __('Ignore'), 617 'Insert row before' => __('Insert row before'), 618 'Rows' => __('Rows'), 619 'Height' => __('Height'), 620 'Paste row after' => __('Paste row after'), 621 'Alignment' => __('Alignment'), 622 'Column group' => __('Column group'), 623 'Row' => __('Row'), 624 'Insert column before' => __('Insert column before'), 625 'Split cell' => __('Split cell'), 626 'Cell padding' => __('Cell padding'), 627 'Cell spacing' => __('Cell spacing'), 628 'Row type' => __('Row type'), 629 'Insert table' => __('Insert table'), 630 'Body' => __('Body'), 631 'Caption' => __('Caption'), 632 'Footer' => __('Footer'), 633 'Delete row' => __('Delete row'), 634 'Paste row before' => __('Paste row before'), 635 'Scope' => __('Scope'), 636 'Delete table' => __('Delete table'), 637 'Header cell' => __('Header cell'), 638 'Column' => __('Column'), 639 'Cell' => __('Cell'), 640 'Header' => __('Header'), 641 'Cell type' => __('Cell type'), 642 'Copy row' => __('Copy row'), 643 'Row properties' => __('Row properties'), 644 'Table properties' => __('Table properties'), 645 'Row group' => __('Row group'), 646 'Right' => __('Right'), 647 'Insert column after' => __('Insert column after'), 648 'Cols' => __('Cols'), 649 'Insert row after' => __('Insert row after'), 650 'Width' => __('Width'), 651 'Cell properties' => __('Cell properties'), 652 'Left' => __('Left'), 653 'Cut row' => __('Cut row'), 654 'Delete column' => __('Delete column'), 655 'Center' => __('Center'), 656 'Merge cells' => __('Merge cells'), 657 'Insert template' => __('Insert template'), 658 'Templates' => __('Templates'), 659 'Background color' => __('Background color'), 660 'Text color' => __('Text color'), 661 'Show blocks' => __('Show blocks'), 662 'Show invisible characters' => __('Show invisible characters'), 663 'Words: {0}' => __('Words: {0}'), 664 'Insert' => __('Insert'), 665 'File' => __('File'), 666 'Edit' => __('Edit'), 667 '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'), 668 'Tools' => __('Tools'), 669 'View' => __('View'), 670 'Table' => __('Table'), 671 'Format' => __('Format'), 672 673 // WordPress strings 674 'Help' => __('Help'), 675 'Toolbar Toggle' => __('Toolbar Toggle'), 676 'Insert Read More tag' => __('Insert Read More tag'), 677 'Distraction Free Writing' => __('Distraction Free Writing'), 678 ); 679 680 $baseurl = self::$baseurl; 681 $mce_locale = self::$mce_locale; 682 683 $mce_translation = apply_filters( 'wp_mce_translation', $mce_translation, $mce_locale ); 684 685 foreach ( $mce_translation as $key => $value ) { 686 if ( strpos( $value, '&' ) !== false ) 687 $mce_translation[$key] = html_entity_decode( $value, ENT_QUOTES ); 688 } 689 690 return "tinymce.addI18n( '$mce_locale', " . json_encode( $mce_translation ) . ");\n" . 691 "tinymce.ScriptLoader.markDone( '$baseurl/langs/$mce_locale.js' );\n"; 525 692 } 526 693 … … 544 711 && false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'); 545 712 546 if ( $tmce_on && 'en' != self::$mce_locale )547 include_once(ABSPATH . WPINC . '/js/tinymce/langs/wp-langs.php');548 549 713 $mceInit = $qtInit = ''; 550 714 if ( $tmce_on ) { … … 570 734 $ref = array( 571 735 'plugins' => implode( ',', self::$plugins ), 572 'theme' => ' advanced',736 'theme' => 'modern', 573 737 'language' => self::$mce_locale 574 738 ); 575 739 576 $suffix = ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ? ' _src' : '';577 578 do_action( 'before_wp_tiny_mce', self::$mce_settings);579 ?>580 581 <script type="text/javascript">740 $suffix = ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ? '' : '.min'; 741 742 do_action( 'before_wp_tiny_mce', self::$mce_settings ); 743 ?> 744 745 <script type="text/javascript"> 582 746 tinyMCEPreInit = { 583 base : "<?php echo self::$baseurl; ?>", 584 suffix : "<?php echo $suffix; ?>", 585 query : "<?php echo $version; ?>", 586 mceInit : <?php echo $mceInit; ?>, 587 qtInit : <?php echo $qtInit; ?>, 588 ref : <?php echo self::_parse_init( $ref ); ?>, 589 load_ext : function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');} 747 baseURL: "<?php echo self::$baseurl; ?>", 748 suffix: "<?php echo $suffix; ?>", 749 mceInit: <?php echo $mceInit; ?>, 750 qtInit: <?php echo $qtInit; ?>, 751 ref: <?php echo self::_parse_init( $ref ); ?>, 752 load_ext: function(url,lang){var sl=tinymce.ScriptLoader;sl.markDone(url+'/langs/'+lang+'.js');sl.markDone(url+'/langs/'+lang+'_dlg.js');} 590 753 }; 591 </script>592 <?php754 </script> 755 <?php 593 756 594 757 $baseurl = self::$baseurl; … … 598 761 echo "<script type='text/javascript' src='{$baseurl}/wp-tinymce.php?c=1&$version'></script>\n"; 599 762 } else { 600 echo "<script type='text/javascript' src='{$baseurl}/tiny_mce.js?$version'></script>\n"; 601 echo "<script type='text/javascript' src='{$baseurl}/wp-tinymce-schema.js?$version'></script>\n"; 602 } 603 604 if ( 'en' != self::$mce_locale && isset($lang) ) 605 echo "<script type='text/javascript'>\n$lang\n</script>\n"; 606 else 763 echo "<script type='text/javascript' src='{$baseurl}/tinymce.js?$version'></script>\n"; 764 echo "<script type='text/javascript' src='{$baseurl}/plugins/compat3x/plugin{$suffix}.js?$version'></script>\n"; 765 } 766 767 if ( 'en' != self::$mce_locale ) 768 echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n"; 769 770 if ( self::$ext_plugins ) { 771 // Load the old-format English strings to prevent unsightly labels in old style popups 607 772 echo "<script type='text/javascript' src='{$baseurl}/langs/wp-langs-en.js?$version'></script>\n"; 608 } 609 610 $mce = ( self::$has_tinymce && wp_default_editor() == 'tinymce' ) || ! self::$has_quicktags; 611 ?> 612 613 <script type="text/javascript"> 614 var wpActiveEditor; 615 616 (function(){ 617 var init, ed, qt, first_init, DOM, el, i, mce = <?php echo (int) $mce; ?>; 618 619 if ( typeof(tinymce) == 'object' ) { 620 DOM = tinymce.DOM; 621 // mark wp_theme/ui.css as loaded 622 DOM.files[tinymce.baseURI.getURI() + '/themes/advanced/skins/wp_theme/ui.css'] = true; 623 624 DOM.events.add( DOM.select('.wp-editor-wrap'), 'mousedown', function(e){ 625 if ( this.id ) 626 wpActiveEditor = this.id.slice(3, -5); 627 }); 628 629 for ( ed in tinyMCEPreInit.mceInit ) { 630 if ( first_init ) { 631 init = tinyMCEPreInit.mceInit[ed] = tinymce.extend( {}, first_init, tinyMCEPreInit.mceInit[ed] ); 773 } 774 } 775 776 // Allow scripts to be added after tinymce.js has been loaded but before any editor instances are created. 777 do_action( 'wp_tiny_mce_init', self::$mce_settings ); 778 779 ?> 780 <script type="text/javascript"> 781 <?php 782 783 if ( self::$ext_plugins ) 784 echo self::$ext_plugins . "\n"; 785 786 if ( ! is_admin() ) 787 echo 'var ajaxurl = "' . admin_url( 'admin-ajax.php', 'relative' ) . '";'; 788 789 ?> 790 791 ( function() { 792 var init, edId, qtId, firstInit, 793 loadMCE = typeof getUserSetting !== 'undefined' ? getUserSetting( 'editor' ) === 'tinymce' : true; 794 795 if ( typeof quicktags !== 'undefined' ) { 796 for ( qtId in tinyMCEPreInit.qtInit ) { 797 try { quicktags( tinyMCEPreInit.qtInit[qtId] ); } catch(e){}; 798 } 799 } 800 801 if ( typeof tinymce !== 'undefined' ) { 802 for ( edId in tinyMCEPreInit.mceInit ) { 803 if ( firstInit ) { 804 init = tinyMCEPreInit.mceInit[edId] = tinymce.extend( {}, firstInit, tinyMCEPreInit.mceInit[edId] ); 632 805 } else { 633 init = first _init = tinyMCEPreInit.mceInit[ed];806 init = firstInit = tinyMCEPreInit.mceInit[edId]; 634 807 } 635 808 636 if ( mce ) 637 try { tinymce.init(init); } catch(e){} 638 } 639 } else { 640 if ( tinyMCEPreInit.qtInit ) { 641 for ( i in tinyMCEPreInit.qtInit ) { 642 el = tinyMCEPreInit.qtInit[i].id; 643 if ( el ) 644 document.getElementById('wp-'+el+'-wrap').onmousedown = function(){ wpActiveEditor = this.id.slice(3, -5); } 809 if ( ( loadMCE || ! tinyMCEPreInit.qtInit.hasOwnProperty( edId ) ) && ! init.wp_skip_init ) { 810 try { tinymce.init( init ); } catch(e){} 645 811 } 646 812 } 647 813 } 648 649 if ( typeof(QTags) == 'function' ) { 650 for ( qt in tinyMCEPreInit.qtInit ) { 651 try { quicktags( tinyMCEPreInit.qtInit[qt] ); } catch(e){} 652 } 653 } 654 })(); 655 <?php 656 657 if ( self::$ext_plugins ) 658 echo self::$ext_plugins . "\n"; 659 660 if ( ! $compressed && $tmce_on ) { 661 ?> 662 (function(){var t=tinyMCEPreInit,sl=tinymce.ScriptLoader,ln=t.ref.language,th=t.ref.theme,pl=t.ref.plugins;sl.markDone(t.base+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'.js');sl.markDone(t.base+'/themes/'+th+'/langs/'+ln+'_dlg.js');sl.markDone(t.base+'/themes/advanced/skins/wp_theme/ui.css');tinymce.each(pl.split(','),function(n){if(n&&n.charAt(0)!='-'){sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'.js');sl.markDone(t.base+'/plugins/'+n+'/langs/'+ln+'_dlg.js');}});})(); 663 <?php 664 } 665 666 if ( !is_admin() ) 667 echo 'var ajaxurl = "' . admin_url( 'admin-ajax.php', 'relative' ) . '";'; 668 669 ?> 814 }()); 815 670 816 </script> 671 817 <?php … … 677 823 self::wp_fullscreen_html(); 678 824 679 do_action( 'after_wp_tiny_mce', self::$mce_settings);825 do_action( 'after_wp_tiny_mce', self::$mce_settings ); 680 826 } 681 827 … … 684 830 $post = get_post(); 685 831 686 $width = isset( $content_width) && 800 > $content_width ? $content_width : 800;832 $width = isset( $content_width ) && 800 > $content_width ? $content_width : 800; 687 833 $width = $width + 22; // compensate for the padding and border 688 834 $dfw_width = get_user_setting( 'dfw_width', $width ); 689 $save = isset($post->post_status) && $post->post_status == 'publish' ? __('Update') : __('Save'); 690 ?> 691 <div id="wp-fullscreen-body"<?php if ( is_rtl() ) echo ' class="rtl"'; ?>> 692 <div id="fullscreen-topbar"> 693 <div id="wp-fullscreen-toolbar"> 694 <div id="wp-fullscreen-close"><a href="#" onclick="fullscreen.off();return false;"><?php _e('Exit fullscreen'); ?></a></div> 835 $save = isset( $post->post_status ) && $post->post_status == 'publish' ? __('Update') : __('Save'); 836 837 ?> 838 <div id="wp-fullscreen-body"<?php if ( is_rtl() ) echo ' class="rtl"'; ?> data-theme-width="<?php echo (int) $width; ?>" data-dfw-width="<?php echo (int) $dfw_width; ?>"> 839 <div id="fullscreen-topbar"> 840 <div id="wp-fullscreen-toolbar"> 841 <div id="wp-fullscreen-close"><a href="#" onclick="wp.editor.fullscreen.off();return false;"><?php _e('Exit fullscreen'); ?></a></div> 695 842 <div id="wp-fullscreen-central-toolbar" style="width:<?php echo $width; ?>px;"> 696 843 697 844 <div id="wp-fullscreen-mode-bar"><div id="wp-fullscreen-modes"> 698 <a href="#" onclick=" fullscreen.switchmode('tinymce');return false;"><?php _e( 'Visual' ); ?></a>699 <a href="#" onclick=" fullscreen.switchmode('html');return false;"><?php _ex( 'Text', 'Name for the Text editor tab (formerly HTML)' ); ?></a>845 <a href="#" onclick="wp.editor.fullscreen.switchmode('tinymce');return false;"><?php _e( 'Visual' ); ?></a> 846 <a href="#" onclick="wp.editor.fullscreen.switchmode('html');return false;"><?php _ex( 'Text', 'Name for the Text editor tab (formerly HTML)' ); ?></a> 700 847 </div></div> 701 848 702 <div id="wp-fullscreen-button-bar"><div id="wp-fullscreen-buttons" class=" wp_themeSkin">703 <?php849 <div id="wp-fullscreen-button-bar"><div id="wp-fullscreen-buttons" class="mce-toolbar"> 850 <?php 704 851 705 852 $buttons = array( 706 853 // format: title, onclick, show in both editors 707 'bold' => array( 'title' => __('Bold (Ctrl + B)'), 'onclick' => 'fullscreen.b();', 'both' => false ), 708 'italic' => array( 'title' => __('Italic (Ctrl + I)'), 'onclick' => 'fullscreen.i();', 'both' => false ), 709 '0' => 'separator', 710 'bullist' => array( 'title' => __('Unordered list (Alt + Shift + U)'), 'onclick' => 'fullscreen.ul();', 'both' => false ), 711 'numlist' => array( 'title' => __('Ordered list (Alt + Shift + O)'), 'onclick' => 'fullscreen.ol();', 'both' => false ), 712 '1' => 'separator', 713 'blockquote' => array( 'title' => __('Blockquote (Alt + Shift + Q)'), 'onclick' => 'fullscreen.blockquote();', 'both' => false ), 714 'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "fullscreen.medialib();", 'both' => true ), 715 '2' => 'separator', 716 'link' => array( 'title' => __('Insert/edit link (Alt + Shift + A)'), 'onclick' => 'fullscreen.link();', 'both' => true ), 717 'unlink' => array( 'title' => __('Unlink (Alt + Shift + S)'), 'onclick' => 'fullscreen.unlink();', 'both' => false ), 718 '3' => 'separator', 719 'help' => array( 'title' => __('Help (Alt + Shift + H)'), 'onclick' => 'fullscreen.help();', 'both' => false ) 854 'bold' => array( 'title' => __('Bold (Ctrl + B)'), 'both' => false ), 855 'italic' => array( 'title' => __('Italic (Ctrl + I)'), 'both' => false ), 856 'bullist' => array( 'title' => __('Unordered list (Alt + Shift + U)'), 'both' => false ), 857 'numlist' => array( 'title' => __('Ordered list (Alt + Shift + O)'), 'both' => false ), 858 'blockquote' => array( 'title' => __('Blockquote (Alt + Shift + Q)'), 'both' => false ), 859 'wp-media-library' => array( 'title' => __('Media library (Alt + Shift + M)'), 'both' => true ), 860 'image' => array( 'title' => __('Insert/edit image'), 'both' => false ), 861 'link' => array( 'title' => __('Insert/edit link (Alt + Shift + A)'), 'both' => true ), 862 'unlink' => array( 'title' => __('Unlink (Alt + Shift + S)'), 'both' => false ), 863 'help' => array( 'title' => __('Help (Alt + Shift + H)'), 'both' => false ), 720 864 ); 721 865 … … 723 867 724 868 foreach ( $buttons as $button => $args ) { 725 if ( 'separator' == $args ) { ?> 726 <div><span aria-orientation="vertical" role="separator" class="mceSeparator"></span></div> 727 <?php continue; 728 } ?> 729 730 <div<?php if ( $args['both'] ) { ?> class="wp-fullscreen-both"<?php } ?>> 731 <a title="<?php echo $args['title']; ?>" onclick="<?php echo $args['onclick']; ?>return false;" class="mceButton mceButtonEnabled mce_<?php echo $button; ?>" href="#" id="wp_fs_<?php echo $button; ?>" role="button" aria-pressed="false"> 732 <span class="mceIcon mce_<?php echo $button; ?>"></span> 733 </a> 869 if ( 'separator' == $args ) { 870 continue; 871 } 872 873 $onclick = ! empty( $args['onclick'] ) ? ' onclick="' . $args['onclick'] . '"' : ''; 874 ?> 875 876 <div class="mce-widget mce-btn<?php if ( $args['both'] ) { ?> wp-fullscreen-both<?php } ?>"> 877 <button type="button" role="presentation" title="<?php echo $args['title']; ?>"<?php echo $onclick; ?> id="wp_fs_<?php echo $button; ?>"> 878 <i class="mce-ico mce-i-<?php echo $button; ?>"></i> 879 </button> 734 880 </div> 735 <?php 736 } ?> 737 738 </div></div> 739 740 <div id="wp-fullscreen-save"> 741 <input type="button" class="button-primary right" value="<?php echo $save; ?>" onclick="fullscreen.save();" /> 742 <span class="spinner"></span> 743 <span class="fs-saved"><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span> 744 </div> 745 746 </div> 881 <?php 882 } 883 884 ?> 885 886 </div></div> 887 888 <div id="wp-fullscreen-save"> 889 <input type="button" class="button-primary right" value="<?php echo $save; ?>" onclick="wp.editor.fullscreen.save();" /> 890 <span class="spinner"></span> 891 <span class="wp-fullscreen-saved-message"><?php if ( $post->post_status == 'publish' ) _e('Updated.'); else _e('Saved.'); ?></span> 892 <span class="wp-fullscreen-error-message"><?php _e('Save failed.'); ?></span> 893 </div> 894 895 </div> 747 896 </div> 748 897 </div> 749 750 <div id="wp-fullscreen-wrap" style="width:<?php echo $dfw_width; ?>px;"> 751 <?php if ( post_type_supports($post->post_type, 'title') ) { ?> 752 <label id="wp-fullscreen-title-prompt-text" for="wp-fullscreen-title"><?php echo apply_filters( 'enter_title_here', __( 'Enter title here' ), $post ); ?></label> 753 <input type="text" id="wp-fullscreen-title" value="" autocomplete="off" /> 754 <?php } ?> 755 756 <div id="wp-fullscreen-container"> 757 <textarea id="wp_mce_fullscreen"></textarea> 758 </div> 759 760 <div id="wp-fullscreen-status"> 761 <div id="wp-fullscreen-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></div> 762 <div id="wp-fullscreen-tagline"><?php _e('Just write.'); ?></div> 763 </div> 898 <div id="wp-fullscreen-status"> 899 <div id="wp-fullscreen-count"><?php printf( __( 'Word count: %s' ), '<span class="word-count">0</span>' ); ?></div> 900 <div id="wp-fullscreen-tagline"><?php _e('Just write.'); ?></div> 764 901 </div> 765 902 </div> -
trunk/src/wp-includes/css/editor.css
r26819 r26876 1 2 1 /*------------------------------------------------------------------------------ 3 4 2 TinyMCE and Quicklinks toolbars 5 3 ------------------------------------------------------------------------------*/ 6 4 7 /* wp_theme/ui.css */ 8 .wp_themeSkin table, 9 .wp_themeSkin tbody, 10 .wp_themeSkin a, 11 .wp_themeSkin img, 12 .wp_themeSkin tr, 13 .wp_themeSkin div, 14 .wp_themeSkin td, 15 .wp_themeSkin iframe, 16 .wp_themeSkin span, 17 .wp_themeSkin *, 18 .wp_themeSkin .mceText { 5 .mce-panel { 19 6 border: 0; 20 margin: 0;21 padding: 0;22 white-space: nowrap;23 text-decoration: none;24 font-weight: normal;25 cursor: default;26 vertical-align: baseline;27 width: auto;28 border-collapse: separate;29 }30 31 .wp_themeSkin a:hover,32 .wp_themeSkin a:link,33 .wp_themeSkin a:visited,34 .wp_themeSkin a:active {35 text-decoration: none;36 font-weight: normal;37 cursor: default;38 }39 40 .wp_themeSkin table td {41 vertical-align: middle;42 }43 44 .wp_themeSkin *,45 .wp_themeSkin a:hover,46 .wp_themeSkin a:link,47 .wp_themeSkin a:visited,48 .wp_themeSkin a:active {49 color: #555;50 }51 52 /* These are part of TinyMCE, used in TinyMCE Advanced, but not WordPress. These are not updated for 3.8's design. */53 .wp_themeSkin span.mce_sup,54 .wp_themeSkin span.mce_sub,55 .wp_themeSkin span.mce_media,56 .wp_themeSkin span.mce_styleprops,57 .wp_themeSkin span.mce_search,58 .wp_themeSkin span.mce_emotions,59 .wp_themeSkin span.mce_print,60 .wp_themeSkin span.mce_attribs,61 .wp_themeSkin span.mce_hr,62 .wp_themeSkin span.mce_cut,63 .wp_themeSkin span.mce_copy,64 .wp_themeSkin span.mce_paste,65 .wp_themeSkin span.mce_cite,66 .wp_themeSkin span.mce_visualchars,67 .wp_themeSkin span.mce_advhr,68 .wp_themeSkin span.mce_insertdate,69 .wp_themeSkin span.mce_anchor,70 .wp_themeSkin span.mce_visualaid,71 .wp_themeSkin span.mce_cleanup,72 .wp_themeSkin span.mce_table,73 .wp_themeSkin span.mce_row_props,74 .wp_themeSkin span.mce_cell_props,75 .wp_themeSkin span.mce_row_before,76 .wp_themeSkin span.mce_row_after,77 .wp_themeSkin span.mce_delete_row,78 .wp_themeSkin span.mce_col_before,79 .wp_themeSkin span.mce_col_after,80 .wp_themeSkin span.mce_delete_col,81 .wp_themeSkin span.mce_split_cells,82 .wp_themeSkin span.mce_merge_cells,83 .wp_themeSkin span.mce_delete_table,84 .wp_themeSkin span.mce_ins,85 .wp_themeSkin span.mce_abbr,86 .wp_themeSkin span.mce_acronym,87 .wp_themeSkin span.mce_del,88 .wp_themeSkin span.mce_replace,89 .wp_themeSkin span.mce_code,90 .wp_themeSkin span.mce_nonbreaking,91 .wp_themeSkin span.mce_inserttime,92 .wp_themeSkin span.mce_insertlayer,93 .wp_themeSkin span.mce_moveforward,94 .wp_themeSkin span.mce_movebackward,95 .wp_themeSkin span.mce_absolute {96 -moz-transition: none;97 -webkit-transition: none;98 transition: none;99 background: url("../js/tinymce/themes/advanced/img/icons.gif") no-repeat 20px 20px;100 }101 102 /* No @font-face support */103 .no-font-face .wp_themeSkin span.mce_undo,104 .no-font-face .wp_themeSkin span.mce_redo,105 .no-font-face .wp_themeSkin span.mce_bullist,106 .no-font-face .wp_themeSkin span.mce_numlist,107 .no-font-face .wp_themeSkin span.mce_blockquote,108 .no-font-face .wp_themeSkin span.mce_charmap,109 .no-font-face .wp_themeSkin span.mce_bold,110 .no-font-face .wp_themeSkin span.mce_italic,111 .no-font-face .wp_themeSkin span.mce_underline,112 .no-font-face .wp_themeSkin span.mce_justifyleft,113 .no-font-face .wp_themeSkin span.mce_justifyright,114 .no-font-face .wp_themeSkin span.mce_justifycenter,115 .no-font-face .wp_themeSkin span.mce_justifyfull,116 .no-font-face .wp_themeSkin span.mce_indent,117 .no-font-face .wp_themeSkin span.mce_outdent,118 .no-font-face .wp_themeSkin span.mce_link,119 .no-font-face .wp_themeSkin span.mce_unlink,120 .no-font-face .wp_themeSkin span.mce_help,121 .no-font-face .wp_themeSkin span.mce_removeformat,122 .no-font-face .wp_themeSkin span.mce_fullscreen,123 .no-font-face .wp_themeSkin span.mce_wp_fullscreen,124 .no-font-face .wp_themeSkin span.mce_media,125 .no-font-face .wp_themeSkin span.mce_pastetext,126 .no-font-face .wp_themeSkin span.mce_pasteword,127 .no-font-face .wp_themeSkin span.mce_wp_help,128 .no-font-face .wp_themeSkin span.mce_wp_adv,129 .no-font-face .wp_themeSkin span.mce_wp_more,130 .no-font-face .wp_themeSkin span.mce_strikethrough,131 .no-font-face .wp_themeSkin span.mce_spellchecker,132 .no-font-face .wp_themeSkin span.mce_forecolor,133 .no-font-face .wp_themeSkin .mce_forecolorpicker,134 .no-font-face .wp_themeSkin .mceSplitButton .mce_spellchecker span.mce_spellchecker,135 .no-font-face .wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor,136 .no-font-face .wp_themeSkin .mceSplitButton span.mce_numlist,137 .no-font-face .wp_themeSkin .mceSplitButton span.mce_bullist {138 -moz-transition: none;139 -webkit-transition: none;140 transition: none;141 background-image: url('../images/wpicons.png?ver=20120720');142 }143 144 /* Theme */145 .no-font-face .wp_themeSkin span.mce_undo {background-position:-500px -20px}146 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_undo,147 .no-font-face .wp_themeSkin .mceButtonActive span.mce_undo {background-position:-500px 0}148 149 .no-font-face .wp_themeSkin span.mce_redo {background-position:-480px -20px}150 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_redo,151 .no-font-face .wp_themeSkin .mceButtonActive span.mce_redo {background-position:-480px 0}152 153 .no-font-face .wp_themeSkin span.mce_bullist {background-position:-40px -20px}154 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_bullist,155 .no-font-face .wp_themeSkin .mceButtonActive span.mce_bullist,156 .no-font-face .wp_themeSkin .mceSplitButton:hover span.mce_bullist {background-position:-40px 0}157 158 .no-font-face .wp_themeSkin span.mce_numlist {background-position:-60px -20px}159 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_numlist,160 .no-font-face .wp_themeSkin .mceButtonActive span.mce_numlist,161 .no-font-face .wp_themeSkin .mceSplitButton:hover span.mce_numlist {background-position:-60px 0}162 163 .no-font-face .wp_themeSkin span.mce_blockquote {background-position:-80px -20px}164 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_blockquote,165 .no-font-face .wp_themeSkin .mceButtonActive span.mce_blockquote {background-position:-80px 0}166 167 .no-font-face .wp_themeSkin span.mce_charmap {background-position:-420px -20px}168 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_charmap,169 .no-font-face .wp_themeSkin .mceButtonActive span.mce_charmap {background-position:-420px 0}170 171 .no-font-face .wp_themeSkin span.mce_bold {background-position:0 -20px}172 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_bold,173 .no-font-face .wp_themeSkin .mceButtonActive span.mce_bold {background-position:0 0}174 175 .no-font-face .wp_themeSkin span.mce_italic {background-position:-20px -20px}176 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_italic,177 .no-font-face .wp_themeSkin .mceButtonActive span.mce_italic {background-position:-20px 0}178 179 .no-font-face .wp_themeSkin span.mce_underline {background-position:-280px -20px}180 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_underline,181 .no-font-face .wp_themeSkin .mceButtonActive span.mce_underline {background-position:-280px 0}182 183 .no-font-face .wp_themeSkin span.mce_justifyleft {background-position:-100px -20px}184 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyleft,185 .no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyleft {background-position:-100px 0}186 187 .no-font-face .wp_themeSkin span.mce_justifyright {background-position:-140px -20px}188 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyright,189 .no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyright {background-position:-140px 0}190 191 .no-font-face .wp_themeSkin span.mce_justifycenter {background-position:-120px -20px}192 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifycenter,193 .no-font-face .wp_themeSkin .mceButtonActive span.mce_justifycenter {background-position:-120px 0}194 195 .no-font-face .wp_themeSkin span.mce_justifyfull {background-position:-300px -20px}196 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_justifyfull,197 .no-font-face .wp_themeSkin .mceButtonActive span.mce_justifyfull {background-position:-300px 0}198 199 .no-font-face .wp_themeSkin span.mce_indent {background-position:-460px -20px}200 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_indent,201 .no-font-face .wp_themeSkin .mceButtonActive span.mce_indent {background-position:-460px 0}202 203 .no-font-face .wp_themeSkin span.mce_outdent {background-position:-440px -20px}204 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_outdent,205 .no-font-face .wp_themeSkin .mceButtonActive span.mce_outdent {background-position:-440px 0}206 207 .no-font-face .wp_themeSkin span.mce_link {background-position:-160px -20px}208 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_link,209 .no-font-face .wp_themeSkin .mceButtonActive span.mce_link {background-position:-160px 0}210 211 .no-font-face .wp_themeSkin span.mce_unlink {background-position:-180px -20px}212 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_unlink,213 .no-font-face .wp_themeSkin .mceButtonActive span.mce_unlink {background-position:-180px 0}214 215 .no-font-face .wp_themeSkin span.mce_help {background-position:-520px -20px}216 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_help,217 .no-font-face .wp_themeSkin .mceButtonActive span.mce_help {background-position:-520px 0}218 219 .no-font-face .wp_themeSkin span.mce_removeformat {background-position:-380px -20px}220 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_removeformat,221 .no-font-face .wp_themeSkin .mceButtonActive span.mce_removeformat {background-position:-380px 0}222 223 .no-font-face .wp_themeSkin span.mce_strikethrough {background-position:-540px -20px;}224 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_strikethrough,225 .no-font-face .wp_themeSkin .mceButtonActive span.mce_strikethrough {background-position:-540px 0}226 227 .no-font-face .wp_themeSkin .mceSplitButton .mce_forecolor span.mce_forecolor {background-position:-320px -20px}228 .no-font-face .wp_themeSkin .mceSplitButtonEnabled:hover span.mce_forecolor,229 .no-font-face .wp_themeSkin .mceSplitButtonSelected span.mce_forecolor {background-position:-320px 0}230 231 .no-font-face .wp_themeSkin .mce_forecolorpicker {background-position:-320px -20px}232 233 /* Plugins in WP */234 .no-font-face .wp_themeSkin span.mce_fullscreen {background-position:-240px -20px}235 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_fullscreen,236 .no-font-face .wp_themeSkin .mceButtonActive span.mce_fullscreen {background-position:-240px 0}237 238 .no-font-face .wp_themeSkin span.mce_wp_fullscreen {background-position:-240px -20px}239 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_fullscreen,240 .no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_fullscreen {background-position:-240px 0}241 242 .no-font-face .wp_themeSkin span.mce_media {background-position:-400px -20px}243 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_media,244 .no-font-face .wp_themeSkin .mceButtonActive span.mce_media {background-position:-400px 0}245 246 .no-font-face .wp_themeSkin span.mce_pastetext {background-position:-340px -20px}247 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_pastetext,248 .no-font-face .wp_themeSkin .mceButtonActive span.mce_pastetext {background-position:-340px 0}249 250 .no-font-face .wp_themeSkin span.mce_pasteword {background-position:-360px -20px}251 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_pasteword,252 .no-font-face .wp_themeSkin .mceButtonActive span.mce_pasteword {background-position:-360px 0}253 254 .no-font-face .wp_themeSkin span.mce_spellchecker {background-position:-220px -20px}255 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_spellchecker,256 .no-font-face .wp_themeSkin .mceSplitButtonEnabled:hover span.mce_spellchecker,257 .no-font-face .wp_themeSkin .mceButtonActive span.mce_spellchecker,258 .no-font-face .wp_themeSkin .mceSplitButtonSelected span.mce_spellchecker {background-position:-220px 0}259 260 .no-font-face .wp_themeSkin span.mce_wp_help {background-position:-520px -20px}261 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_help,262 .no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_help {background-position:-520px 0}263 264 .no-font-face .wp_themeSkin span.mce_wp_adv {background-position:-260px -20px}265 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_adv,266 .no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_adv {background-position:-260px 0}267 268 .no-font-face .wp_themeSkin span.mce_wp_more {background-position:-200px -20px}269 .no-font-face .wp_themeSkin .mceButtonEnabled:hover span.mce_wp_more,270 .no-font-face .wp_themeSkin .mceButtonActive span.mce_wp_more {background-position:-200px 0}271 272 .no-font-face .mceIcon:before {273 display: none !important;274 }275 /* End no @font-face */276 277 /* Containers */278 .wp_themeSkin table {}279 280 .wp_themeSkin iframe {281 display: block;282 }283 284 .wp_themeSkin #mce_fullscreen_ifr {285 background-color: #fff;286 }287 288 .wp_themeSkin .mceToolbar {289 padding: 1px;290 }291 292 /* External */293 .wp_themeSkin .mceExternalToolbar {294 position: absolute;295 border-bottom: 0;296 display: none;297 }298 299 .wp_themeSkin .mceExternalToolbar td.mceToolbar {300 padding-right: 13px;301 }302 303 .wp_themeSkin .mceExternalClose {304 position: absolute;305 top: 3px;306 right: 3px;307 width: 7px;308 height: 7px;309 background: url("../js/tinymce/themes/advanced/img/icons.gif") -820px 0;310 }311 312 /* Layout */313 .wp_themeSkin table.mceToolbar,314 .wp_themeSkin tr.mceFirst .mceToolbar tr td,315 .wp_themeSkin tr.mceLast .mceToolbar tr td {316 border: 0;317 margin: 0;318 padding: 0;319 }320 321 .wp_themeSkin table.mceLayout {322 border: 0;323 }324 325 .wp_themeSkin .mceStatusbar {326 7 background: #fff; 8 } 9 10 .mce-toolbar-grp { 11 border-bottom: 1px solid #dedede; 12 background: #f5f5f5; 13 } 14 15 .mce-toolbar { 16 padding: 1px 3px; 17 } 18 19 .mce-statusbar { 327 20 border-top: 1px solid #eee; 328 color: #000; 329 display: block; 330 font-family: sans-serif; 331 font-size: 12px; 332 height: 20px; 333 line-height: 16px; 334 padding: 0 0 0 8px; 335 overflow: visible; 336 } 337 338 .wp_themeSkin .mceStatusbar * { 339 color: #555; 340 } 341 342 .wp_themeSkin .mceStatusbar div { 343 float: left; 344 padding: 2px; 345 } 346 347 .wp_themeSkin .mceStatusbar a.mceResize { 348 display: block; 349 float: right; 350 background: url("../js/tinymce/themes/advanced/img/icons.gif") -800px 0; 351 width: 20px; 352 height: 20px; 353 cursor: se-resize; 354 } 355 356 .wp_themeSkin .mceStatusbar a:hover { 357 text-decoration: underline; 358 } 359 360 .wp_themeSkin table.mceToolbar { 361 margin: 0 6px 2px; 362 } 363 364 .wp_themeSkin table.mceToolbar :active, 365 .wp_themeSkin table.mceToolbar :focus, 366 .wp_themeSkin table.mceToolbar:focus, 367 .wp_themeSkin span.mceSeparator:focus { 368 outline: none; 369 } 370 371 .wp_themeSkin #content_toolbar1 { 372 margin-top: 2px; 373 } 374 375 .wp_themeSkin .mceToolbar .mceToolbarEndListBox span { 376 display: none; 377 } 378 379 .wp_themeSkin span.mceIcon, 380 .wp_themeSkin img.mceIcon { 381 display: block; 382 width: 20px; 383 height: 20px; 384 } 385 386 a .mceIcon, .mceAction { 387 text-align: center; 388 font: normal 20px/1 'dashicons' !important; 389 speak: none; 390 -webkit-font-smoothing: antialiased; 391 -moz-osx-font-smoothing: grayscale; 392 } 393 394 .mceAction { 395 line-height:16px; 396 } 397 398 /* Button */ 399 .wp_themeSkin .mceButton { 400 display: block; 401 width: 20px; 402 height: 20px; 403 cursor: default; 404 padding: 1px 2px; 405 margin: 1px; 21 } 22 23 .mce-path { 24 padding: 0 8px 1px; 25 } 26 27 .mce-path-item { 28 line-height: 1; 29 } 30 31 .mce-toolbar .mce-btn { 32 border-color: transparent; 33 background: transparent; 34 box-shadow: none; 35 } 36 37 #wp-fullscreen-buttons .mce-btn, 38 .mce-toolbar .mce-btn-group .mce-btn { 39 border: 1px solid transparent; 40 margin: 0 1px; 406 41 -webkit-border-radius: 2px; 407 42 border-radius: 2px; 408 43 } 409 44 410 .wp_themeSkin a.mceButtonEnabled:hover { 411 background-image: inherit 0 -10px; 412 } 413 414 .wp_themeSkin .mceOldBoxModel a.mceButton span, .wp_themeSkin .mceOldBoxModel a.mceButton img { 415 margin: 0 0 0 1px; 416 } 417 418 .wp_themeSkin .mceButtonDisabled .mceIcon { 419 opacity: 0.2; 420 filter: alpha(opacity=20); 421 } 422 423 /* Separator */ 424 .wp_themeSkin .mceSeparator { 425 display: none; 426 } 427 428 /* ListBox */ 429 .wp_themeSkin .mceListBox, 430 .wp_themeSkin .mceListBox a { 431 display: block; 432 } 433 434 .wp_themeSkin .mceListBox .mceText { 435 padding: 1px 4px 1px 5px; 436 width: 70px; 437 text-align: left; 438 text-decoration: none; 439 -webkit-border-bottom-left-radius: 2px; 440 -webkit-border-top-left-radius: 2px; 441 border-bottom-left-radius: 2px; 442 border-top-left-radius: 2px; 443 font-family: sans-serif; 444 font-size: 12px; 445 height: 20px; 446 line-height: 20px; 447 overflow: hidden; 448 } 449 450 .wp_themeSkin .mceListBox { 451 margin: 1px; 452 direction: ltr; 453 background-color: #fff; 454 border: 1px solid #ddd; 455 -webkit-box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2); 456 box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2); 457 } 458 459 .wp_themeSkin .mceListBox .mceOpen { 460 width: 12px; 461 height: 20px; 462 border-collapse: separate; 463 padding: 1px; 464 -webkit-border-bottom-left-radius: 0; 465 -webkit-border-top-left-radius: 0; 466 border-bottom-left-radius: 0; 467 border-top-left-radius: 0; 468 } 469 470 .wp_themeSkin .mceListBox .mceFirst a { 471 border-style: solid; 472 border-width: 1px; 473 border-bottom-right-radius: 2px; 474 border-top-right-radius: 2px; 475 } 476 477 .wp_themeSkin .mceListBoxMenu .mce_formatPreview { 478 line-height: normal; 479 } 480 481 .wp_themeSkin .mceListBox .mceOpen, 482 .wp_themeSkin .mceListBoxHover .mceOpen, 483 .wp_themeSkin .mceListBoxSelected .mceOpen, 484 .wp_themeSkin table.mceListBoxEnabled .mceOpen { 485 background-image: url("../images/down_arrow.gif"); 486 background-position: 3px 1px; 487 background-repeat: no-repeat; 488 } 489 490 .wp_themeSkin .mceListBoxDisabled .mceText { 491 color: gray; 492 } 493 494 .wp_themeSkin .mceListBoxMenu { 495 overflow: auto; 496 overflow-x: hidden; 497 } 498 499 .wp_themeSkin .mceOldBoxModel .mceListBox .mceText { 500 height: 22px; 501 } 502 503 .wp_themeSkin select.mceListBox { 504 font-family: sans-serif; 505 font-size: 12px; 506 border-color: #b2b2b2; 507 background-color: #fff; 508 } 509 510 /* SplitButton */ 511 .wp_themeSkin .mceSplitButton a, 512 .wp_themeSkin .mceSplitButton span { 513 display: block; 514 height: 20px; 515 } 516 517 .wp_themeSkin .mceSplitButton { 518 display: block; 519 direction: ltr; 520 } 521 522 .wp_themeSkin table.mceSplitButton td { 523 padding: 2px; 524 -webkit-border-radius: 2px; 525 border-radius: 2px; 526 } 527 528 .wp_themeSkin table.mceSplitButton:hover td { 529 background-image: inherit 0 -10px; 530 } 531 532 .wp_themeSkin .mceSplitButton a.mceAction { 533 height: 20px; 534 width: 20px; 535 padding: 1px 2px; 536 border-right: 0 none; 537 } 538 539 .wp_themeSkin .mceSplitButton span.mceAction { 540 background-image: url("../js/tinymce/themes/advanced/img/icons.gif"); 541 background-repeat: no-repeat; 542 background-color: transparent; 543 width: 20px; 544 } 545 546 .wp_themeSkin .mceSplitButton span.mceAction.mce_bullist, 547 .wp_themeSkin .mceSplitButton span.mceAction.mce_numlist { 548 background-image: none; 549 } 550 551 .wp_themeSkin .mceSplitButton a.mceOpen { 552 width: 11px; 553 height: 20px; 554 background-position: 0px 2px; 555 background-repeat: no-repeat; 556 padding: 1px 0; 557 } 558 559 .wp_themeSkin .mceSplitButton span.mceOpen { 560 display: none; 561 } 562 563 .wp_themeSkin .mceSplitButtonDisabled .mceAction { 564 opacity: 0.3; 565 filter: alpha(opacity=30); 566 } 567 568 .wp_themeSkin .mceListBox a.mceText, 569 .wp_themeSkin .mceSplitButton a.mceAction { 570 -webkit-border-bottom-left-radius: 2px; 571 -webkit-border-top-left-radius: 2px; 572 border-bottom-left-radius: 2px; 573 border-top-left-radius: 2px; 574 } 575 576 .wp_themeSkin .mceSplitButton a.mceOpen, 577 .wp_themeSkin .mceListBox a.mceOpen { 578 -webkit-border-bottom-right-radius: 2px; 579 -webkit-border-top-right-radius: 2px; 580 border-bottom-right-radius: 2px; 581 border-top-right-radius: 2px; 582 } 583 584 /* ColorSplitButton */ 585 .wp_themeSkin div.mceColorSplitMenu table { 586 background-color: #ebebeb; 587 border-color: #bbb; 588 } 589 590 .wp_themeSkin .mceColorSplitMenu td { 591 padding: 2px; 592 } 593 594 .wp_themeSkin .mceColorSplitMenu a { 595 display: block; 596 width: 9px; 597 height: 9px; 598 overflow: hidden; 599 border-color: #B2B2B2; 600 } 601 602 .wp_themeSkin .mceColorSplitMenu td.mceMoreColors { 603 padding: 1px 3px 1px 1px; 604 } 605 606 .wp_themeSkin .mceColorSplitMenu a.mceMoreColors { 607 width: 100%; 608 height: auto; 609 text-align: center; 610 font-family: "Open Sans", sans-serif; 611 font-size: 11px; 612 line-height: 20px; 613 border-color: #fff; 614 } 615 616 .wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover {} 617 .wp_themeSkin a.mceMoreColors:hover {} 618 .wp_themeSkin .mceColorPreview { 619 margin: -5px 0 0 2px; 620 width: 16px; 621 height: 4px; 622 overflow: hidden; 623 } 624 625 /* Menu */ 626 .wp_themeSkin .mceMenu { 627 position: absolute; 628 left: 0; 629 top: 0; 630 z-index: 1000; 631 border-color: #ddd; 632 direction: ltr; 633 } 634 635 .wp_themeSkin .mceNoIcons span.mceIcon { 636 width: 0; 637 } 638 639 .wp_themeSkin .mceNoIcons a .mceText { 640 padding-left: 10px; 641 } 642 643 .wp_themeSkin .mceMenu table { 644 background-color: #ebeaeb; 645 } 646 647 .wp_themeSkin .mceMenu a, 648 .wp_themeSkin .mceMenu span, 649 .wp_themeSkin .mceMenu { 650 display: block; 651 } 652 653 .wp_themeSkin .mceMenu td { 654 height: 20px;overflow: hidden; 655 } 656 657 .wp_themeSkin .mceMenu a { 658 position: relative; 659 padding: 3px 0 4px 0; 660 text-decoration: none !important; 661 } 662 663 .wp_themeSkin .mceMenu .mceText { 664 position: relative; 665 display: block; 666 font-family: "Open Sans", sans-serif; 667 cursor: default; 668 margin: 0; 669 padding: 0 25px; 670 color: #000; 671 } 672 673 .wp_themeSkin .mceMenu span.mceText, .wp_themeSkin .mceMenu .mcePreview { 674 font-size: 12px; 675 } 676 677 .wp_themeSkin .mceMenu pre.mceText { 678 font-family: Monospace; 679 } 680 681 .wp_themeSkin .mceMenu .mceIcon { 682 position: absolute; 683 top: 0; 684 left: 0; 685 width: 22px; 686 } 687 688 .wp_themeSkin .mceMenu .mceMenuItemEnabled a:hover, 689 .wp_themeSkin .mceMenu .mceMenuItemActive { 690 background-color: #f5f5f5; 691 } 692 693 .wp_themeSkin td.mceMenuItemSeparator { 694 height: 1px; 695 background-color: #aaa; 696 } 697 698 .wp_themeSkin .mceMenuItemTitle a { 699 border-top: 0; 700 border-right: 0; 701 border-left: 0; 702 border-bottom: 1px solid #aaa; 703 text-decoration: none !important; 704 background-color: #ccc; 705 } 706 707 .wp_themeSkin .mceMenuItemTitle span.mceText { 708 font-weight: bold; 709 padding-left: 4px; 710 color: #000; 711 } 712 713 .wp_themeSkin .mceMenuItemSelected .mceIcon { 714 background: url("../js/tinymce/themes/advanced/skins/default/img/menu_check.gif"); 715 color: #888; 716 } 717 718 .wp_themeSkin .mceNoIcons .mceMenuItemSelected a { 719 background: url("../js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif") no-repeat -6px center; 720 } 721 722 .wp_themeSkin .mceMenu span.mceMenuLine { 723 display: none; 724 } 725 726 .wp_themeSkin .mceMenuItemSub a { 727 background: url("../js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif") no-repeat top right; 728 } 729 730 /* Progress,Resize */ 731 .wp_themeSkin .mceBlocker { 732 position: absolute; 733 left: 0; 734 top: 0; 735 z-index: 1000; 736 opacity: 0.5; 737 filter: alpha(opacity=50); 738 background: #FFF; 739 } 740 741 .wp_themeSkin .mceProgress { 742 position: absolute; 743 left: 0; 744 top: 0; 745 z-index: 1001; 746 background: url("../js/tinymce/themes/advanced/skins/default/img/progress.gif") no-repeat; 747 width: 32px; 748 height: 32px; 749 margin: -16px 0 0 -16px; 750 } 751 752 .wp_themeSkin .mcePlaceHolder { 753 border: 1px dotted gray; 754 } 755 756 /* Rtl */ 757 .mceRtl .mceListBox .mceText { 758 text-align: right; 759 padding: 0 4px 0 0; 760 } 761 762 .mceRtl .mceMenuItem .mceText { 763 text-align: right; 764 } 765 766 /* Formats */ 767 .wp_themeSkin .mce_p span.mceText {} 768 .wp_themeSkin .mce_address span.mceText { 769 font-style: italic; 770 } 771 772 .wp_themeSkin .mce_pre span.mceText { 773 font-family: monospace; 774 } 775 776 .wp_themeSkin .mce_h1 span.mceText { 777 font-weight: bolder; 778 font-size: 18px; 779 } 780 781 .wp_themeSkin .mce_h2 span.mceText { 782 font-weight: bolder; 783 font-size: 14px; 784 } 785 786 .wp_themeSkin .mce_h3 span.mceText { 787 font-weight: bolder; 788 font-size: 12px; 789 } 790 791 .wp_themeSkin .mce_h4 span.mceText { 792 font-weight: bolder; 793 font-size: 11px; 794 } 795 796 .wp_themeSkin .mce_h5 span.mceText { 797 font-weight: bolder; 798 font-size: 11px; 799 } 800 801 .wp_themeSkin .mce_h6 span.mceText { 802 font-weight: bolder; 803 font-size: 10px; 804 } 805 806 span.mce_bold:before { 807 content: '\f200'; 808 } 809 810 span.mce_italic:before { 811 content: '\f201'; 812 } 813 814 span.mce_bullist:before { 815 content: '\f203'; 816 } 817 818 span.mce_numlist:before { 819 content: '\f204'; 820 } 821 822 span.mce_blockquote:before { 823 content: '\f205'; 824 } 825 826 span.mce_justifyleft:before { 827 content: '\f206'; 828 } 829 830 span.mce_justifycenter:before { 831 content: '\f207'; 832 } 833 834 span.mce_justifyright:before { 835 content: '\f208'; 836 } 837 838 span.mce_link:before { 839 content: '\f103'; 840 } 841 842 span.mce_unlink:before { 843 content: '\f225'; 844 } 845 846 span.mce_wp_more:before { 847 content: '\f209'; 848 } 849 850 span.mce_strikethrough:before { 851 content: '\f224'; 852 } 853 854 span.mce_spellchecker { 855 font-size: 20px; 856 background: none !important; 857 margin-top: 2px; 858 } 859 860 span.mce_spellchecker:before { 861 content: '\f210'; 862 } 863 864 span.mce_fullscreen:before, 865 span.mce_wp_fullscreen:before { 866 content: '\f211'; 867 } 868 869 span.mce_wp_adv:before { 870 content: '\f212'; 871 } 872 span.mce_underline:before { 873 content: '\f213'; 874 } 875 876 span.mce_justifyfull:before { 877 content: '\f214'; 878 } 879 880 span.mce_forecolor { 881 background: none !important; 882 } 883 884 span.mce_forecolor:before { 885 content: '\f215'; 886 } 887 888 span.mce_pastetext:before { 889 content: '\f217'; 890 } 891 892 span.mce_pasteword:before { 893 content: '\f216'; 894 } 895 896 span.mce_removeformat:before { 897 content: '\f218'; 898 } 899 900 span.mce_charmap:before { 901 content: '\f220'; 902 } 903 904 span.mce_outdent:before { 905 content: '\f221'; 906 } 907 908 span.mce_indent:before { 909 content: '\f222'; 910 } 911 912 span.mce_undo:before { 913 content: '\f171'; 914 } 915 916 span.mce_redo:before { 917 content: '\f172'; 918 } 919 920 span.mce_help:before, 921 span.mce_wp_help:before { 922 content: '\f223'; 923 } 924 925 span.mce_image:before { 926 content: '\f104'; 927 } 928 929 span.mce_ltr:before { 930 content: '\f320'; 931 } 932 933 /* Default icons */ 934 .wp_themeSkin span.mce_cleanup {background-position:-380px -20px} 935 .wp_themeSkin span.mce_anchor {background-position:-200px 0} 936 .wp_themeSkin span.mce_sub {background-position:-600px 0} 937 .wp_themeSkin span.mce_sup {background-position:-620px 0} 938 .wp_themeSkin span.mce_newdocument {background-position:-520px 0} 939 .wp_themeSkin span.mce_image {background-position:-380px 0} 940 .wp_themeSkin span.mce_code {background-position:-260px 0} 941 .wp_themeSkin span.mce_hr {background-position:-360px 0} 942 .wp_themeSkin span.mce_visualaid {background-position:-660px 0} 943 .wp_themeSkin span.mce_paste {background-position:-560px 0} 944 .wp_themeSkin span.mce_copy {background-position:-700px 0} 945 .wp_themeSkin span.mce_cut {background-position:-680px 0} 946 .wp_themeSkin .mce_backcolor span.mceAction {background-position:-760px 0} 947 .wp_themeSkin .mce_backcolorpicker {background-position:-760px 0} 948 949 /* Plugins */ 950 .wp_themeSkin span.mce_advhr {background-position:-0px -20px} 951 .wp_themeSkin span.mce_ltr {background-position:-20px -20px} 952 .wp_themeSkin span.mce_rtl {background-position:-40px -20px} 953 .wp_themeSkin span.mce_emotions {background-position:-60px -20px} 954 .wp_themeSkin span.mce_fullpage {background-position:-80px -20px} 955 .wp_themeSkin span.mce_iespell {background-position:-120px -20px} 956 .wp_themeSkin span.mce_insertdate {background-position:-140px -20px} 957 .wp_themeSkin span.mce_inserttime {background-position:-160px -20px} 958 .wp_themeSkin span.mce_absolute {background-position:-180px -20px} 959 .wp_themeSkin span.mce_backward {background-position:-200px -20px} 960 .wp_themeSkin span.mce_forward {background-position:-220px -20px} 961 .wp_themeSkin span.mce_insert_layer {background-position:-240px -20px} 962 .wp_themeSkin span.mce_insertlayer {background-position:-260px -20px} 963 .wp_themeSkin span.mce_movebackward {background-position:-280px -20px} 964 .wp_themeSkin span.mce_moveforward {background-position:-300px -20px} 965 .wp_themeSkin span.mce_media {background-position:-320px -20px} 966 .wp_themeSkin span.mce_nonbreaking {background-position:-340px -20px} 967 .wp_themeSkin span.mce_selectall {background-position:-400px -20px} 968 .wp_themeSkin span.mce_preview {background-position:-420px -20px} 969 .wp_themeSkin span.mce_print {background-position:-440px -20px} 970 .wp_themeSkin span.mce_cancel {background-position:-460px -20px} 971 .wp_themeSkin span.mce_save {background-position:-480px -20px} 972 .wp_themeSkin span.mce_replace {background-position:-500px -20px} 973 .wp_themeSkin span.mce_search {background-position:-520px -20px} 974 .wp_themeSkin span.mce_styleprops {background-position:-560px -20px} 975 .wp_themeSkin span.mce_table {background-position:-580px -20px} 976 .wp_themeSkin span.mce_cell_props {background-position:-600px -20px} 977 .wp_themeSkin span.mce_delete_table {background-position:-620px -20px} 978 .wp_themeSkin span.mce_delete_col {background-position:-640px -20px} 979 .wp_themeSkin span.mce_delete_row {background-position:-660px -20px} 980 .wp_themeSkin span.mce_col_after {background-position:-680px -20px} 981 .wp_themeSkin span.mce_col_before {background-position:-700px -20px} 982 .wp_themeSkin span.mce_row_after {background-position:-720px -20px} 983 .wp_themeSkin span.mce_row_before {background-position:-740px -20px} 984 .wp_themeSkin span.mce_merge_cells {background-position:-760px -20px} 985 .wp_themeSkin span.mce_table_props {background-position:-980px -20px} 986 .wp_themeSkin span.mce_row_props {background-position:-780px -20px} 987 .wp_themeSkin span.mce_split_cells {background-position:-800px -20px} 988 .wp_themeSkin span.mce_template {background-position:-820px -20px} 989 .wp_themeSkin span.mce_visualchars {background-position:-840px -20px} 990 .wp_themeSkin span.mce_abbr {background-position:-860px -20px} 991 .wp_themeSkin span.mce_acronym {background-position:-880px -20px} 992 .wp_themeSkin span.mce_attribs {background-position:-900px -20px} 993 .wp_themeSkin span.mce_cite {background-position:-920px -20px} 994 .wp_themeSkin span.mce_del {background-position:-940px -20px} 995 .wp_themeSkin span.mce_ins {background-position:-960px -20px} 996 .wp_themeSkin span.mce_pagebreak {background-position:0 -40px} 997 .wp_themeSkin span.mce_restoredraft {background-position:-20px -40px} 998 .wp_themeSkin span.mce_visualblocks {background-position: -40px -40px} 999 1000 /* border */ 1001 .wp_themeSkin .mceExternalToolbar, 1002 .wp_themeSkin .mceButton, 1003 .wp_themeSkin a.mceButtonEnabled:hover, 1004 .wp_themeSkin a.mceButtonActive, 1005 .wp_themeSkin a.mceButtonSelected, 1006 .wp_themeSkin .mceListBox .mceText, 1007 .wp_themeSkin .mceListBox .mceOpen, 1008 .wp_themeSkin select.mceListBox, 1009 .wp_themeSkin .mceSplitButton a.mceAction, 1010 .wp_themeSkin .mceSplitButton a.mceOpen, 1011 .wp_themeSkin .mceSplitButton a.mceOpen:hover, 1012 .wp_themeSkin .mceSplitButtonSelected a.mceOpen, 1013 .wp_themeSkin table.mceSplitButtonEnabled:hover a.mceAction, 1014 .wp_themeSkin .mceSplitButton a.mceAction:hover, 1015 .wp_themeSkin div.mceColorSplitMenu table, 1016 .wp_themeSkin .mceColorSplitMenu a, 1017 .wp_themeSkin .mceColorSplitMenu a.mceMoreColors, 1018 .wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover, 1019 .wp_themeSkin a.mceMoreColors:hover, 1020 .wp_themeSkin .mceMenu { 1021 border-style: solid; 1022 border-width: 1px; 1023 } 1024 1025 .wp_themeSkin .mceListBox .mceText { 1026 border-right: 0 none; 1027 } 1028 1029 .wp_themeSkin iframe { 1030 background: transparent; 1031 } 1032 1033 .wp_themeSkin .mceButton { 1034 border-color: transparent; 1035 } 1036 1037 .wp_themeSkin .mceListBox .mceText, 1038 .wp_themeSkin .mceListBox .mceOpen { 1039 border-color: transparent; 1040 } 1041 1042 .wp_themeSkin a.mceButtonEnabled:hover, 1043 .wp_themeSkin table.mceSplitButton:hover { 45 #wp-fullscreen-buttons .mce-btn:hover, 46 .mce-toolbar .mce-btn-group .mce-btn:hover, 47 .mce-toolbar .mce-btn-group .mce-btn.mce-active { 48 box-shadow: 0 0 transparent; 1044 49 border-color: #bbb; 1045 50 background: #eee; 1046 51 background-image: -webkit-gradient(linear, left bottom, left top, from(#e5e5e5), to(#fff)); 1047 52 background-image: -webkit-linear-gradient(bottom, #e5e5e5, #fff); 1048 background-image: -moz-linear-gradient(bottom, #e5e5e5, #fff);1049 background-image: -o-linear-gradient(bottom, #e5e5e5, #fff);1050 53 background-image: linear-gradient(to top, #e5e5e5, #fff); 1051 54 } 1052 55 1053 .wp_themeSkin a.mceButton:active, 1054 .wp_themeSkin a.mceButtonEnabled:active, 1055 .wp_themeSkin a.mceButtonSelected:active, 1056 .wp_themeSkin a.mceButtonActive, 1057 .wp_themeSkin a.mceButtonActive:active, 1058 .wp_themeSkin a.mceButtonActive:hover, 1059 .wp_themeSkin .mceSplitButtonSelected table, 1060 .wp_themeSkin .mceSplitButtonSelected table:hover { 1061 outline: none; 1062 border-color: #999 #ccc #ccc #999; 1063 background: #eee; 1064 background-image: -webkit-gradient(linear, left bottom, left top, from(#f6f6f6), to(#e3e3e3)); 1065 background-image: -webkit-linear-gradient(bottom, #f6f6f6, #e3e3e3); 1066 background-image: -moz-linear-gradient(bottom, #f6f6f6, #e3e3e3); 1067 background-image: -o-linear-gradient(bottom, #f6f6f6, #e3e3e3); 1068 background-image: linear-gradient(to top, #f6f6f6, #e3e3e3); 1069 } 1070 1071 .wp_themeSkin .mceSplitButtonSelected table a.mceOpen, 1072 .wp_themeSkin .mceSplitButtonSelected table a.mceAction { 1073 border-color: #999 #ccc #ccc #999; 1074 } 1075 1076 .wp_themeSkin .mceButtonDisabled { 56 .mce-toolbar .mce-btn-group .mce-disabled.mce-btn:hover { 1077 57 border-color: transparent; 1078 } 1079 1080 .wp_themeSkin .mceListBox .mceOpen { 1081 border-left: 0; 1082 } 1083 1084 .wp_themeSkin .mceListBoxEnabled:hover, 1085 .wp_themeSkin .mceListBoxEnabled:active, 1086 .wp_themeSkin .mceListBoxHover, 1087 .wp_themeSkin .mceListBoxHover:active, 1088 .wp_themeSkin .mceListBoxSelected { 1089 -webkit-box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .3); 1090 box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .3); 58 background: transparent; 59 } 60 61 .mce-toolbar .mce-btn-group .mce-first, 62 .mce-toolbar .mce-btn-group .mce-last { 63 border-color: transparent; 64 } 65 66 .mce-toolbar .mce-btn button { 67 padding: 2px 3px; 68 line-height: normal; 69 } 70 71 .mce-toolbar .mce-btn i { 72 text-shadow: 0; 73 } 74 75 .mce-toolbar .mce-btn-group .mce-btn.mce-listbox { 76 border-radius: 0; 77 direction: ltr; 78 background: #fff; 79 border: 1px solid #ddd; 80 -webkit-box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2); 81 box-shadow: inset 0 1px 1px -1px rgba(0, 0, 0, .2); 82 } 83 84 .mce-toolbar .mce-btn-group .mce-btn.mce-listbox:hover { 85 background-image: none; 1091 86 border-color: #bbb; 1092 87 } 1093 88 1094 /* SplitButton */ 1095 .wp_themeSkin .mceSplitButton .mceLast span.mceOpen .mceIconOnly { 1096 display: block; 1097 } 1098 1099 .wp_themeSkin .mceSplitButton a.mceAction, 1100 .wp_themeSkin .mceSplitButton a.mceOpen { 1101 border-color: transparent; 1102 } 1103 1104 .wp_themeSkin .mceSplitButton:hover a { 1105 border-color: #bbb; 1106 } 1107 1108 .wp_themeSkin .mceSplitButtonEnabled a.mceOpen, 1109 .wp_themeSkin .mceSplitButtonSelected a.mceOpen, 1110 .wp_themeSkin .mceSplitButtonActive a.mceOpen, 1111 .wp_themeSkin .mceSplitButtonEnabled:hover a.mceOpen { 1112 background-image: url("../images/down_arrow.gif"); 1113 background-position: 1px 2px; 1114 background-repeat: no-repeat; 1115 border-left: 0; 1116 } 1117 1118 .wp_themeSkin .mceSplitButtonActive td { 1119 -webkit-border-radius: 3px; 1120 border-radius: 3px; 1121 } 1122 1123 .wp_themeSkin .mceColorSplitMenu a.mceMoreColors:hover { 1124 border-color: #0A246A; 1125 background-color: #B6BDD2; 1126 } 1127 1128 .wp_themeSkin a.mceMoreColors:hover { 1129 border-color: #0A246A; 1130 } 1131 1132 .wp_themeSkin .mceMenuItemDisabled .mceText { 1133 color: #888; 1134 } 1135 1136 #mceModalBlocker { 1137 background: #000; 1138 opacity: 0.7; 1139 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)"; 1140 filter: alpha(opacity=70); 1141 } 1142 1143 /* WP specific */ 89 .mce-toolbar .mce-colorbutton .mce-open { 90 border-right: 0; 91 } 92 93 .mce-toolbar .mce-colorbutton .mce-preview { 94 margin-left: -16px; 95 } 96 97 /* Icons */ 98 .mce-toolbar .mce-ico { 99 color: #777; 100 line-height: 20px; 101 width: 20px; 102 height: 20px; 103 text-align: center; 104 } 105 106 .mce-toolbar .mce-btn:hover .mce-ico { 107 color: #333; 108 } 109 110 .mce-i-bold, 111 .mce-i-italic, 112 .mce-i-bullist, 113 .mce-i-numlist, 114 .mce-i-blockquote, 115 .mce-i-alignleft, 116 .mce-i-aligncenter, 117 .mce-i-alignright, 118 .mce-i-link, 119 .mce-i-unlink, 120 .mce-i-wp_more, 121 .mce-i-strikethrough, 122 .mce-i-spellchecker, 123 .mce-i-fullscreen, 124 .mce-i-wp_fullscreen, 125 .mce-i-wp_adv, 126 .mce-i-underline, 127 .mce-i-alignjustify, 128 .mce-i-forecolor, 129 .mce-i-pastetext, 130 .mce-i-pasteword, 131 .mce-i-removeformat, 132 .mce-i-charmap, 133 .mce-i-outdent, 134 .mce-i-indent, 135 .mce-i-undo, 136 .mce-i-redo, 137 .mce-i-help, 138 .mce-i-wp_help, 139 .mce-i-wp-media-library, 140 .mce-i-ltr { 141 font: normal 20px/1 'dashicons'; 142 padding: 0; 143 vertical-align: top; 144 speak: none; 145 -webkit-font-smoothing: antialiased; 146 -moz-osx-font-smoothing: grayscale; 147 } 148 149 .mce-i-bold:before { 150 content: '\f200'; 151 } 152 153 .mce-i-italic:before { 154 content: '\f201'; 155 } 156 157 .mce-i-bullist:before { 158 content: '\f203'; 159 } 160 161 .mce-i-numlist:before { 162 content: '\f204'; 163 } 164 165 .mce-i-blockquote:before { 166 content: '\f205'; 167 } 168 169 .mce-i-alignleft:before { 170 content: '\f206'; 171 } 172 173 .mce-i-aligncenter:before { 174 content: '\f207'; 175 } 176 177 .mce-i-alignright:before { 178 content: '\f208'; 179 } 180 181 .mce-i-link:before { 182 content: '\f103'; 183 } 184 185 .mce-i-unlink:before { 186 content: '\f225'; 187 } 188 189 .mce-i-wp_more:before { 190 content: '\f209'; 191 } 192 193 .mce-i-strikethrough:before { 194 content: '\f224'; 195 } 196 197 .mce-i-spellchecker:before { 198 content: '\f210'; 199 } 200 201 .mce-i-fullscreen:before, 202 .mce-i-wp_fullscreen:before { 203 content: '\f211'; 204 } 205 206 .mce-i-wp_adv:before { 207 content: '\f212'; 208 } 209 .mce-i-underline:before { 210 content: '\f213'; 211 } 212 213 .mce-i-alignjustify:before { 214 content: '\f214'; 215 } 216 217 .mce-i-forecolor:before { 218 content: '\f215'; 219 } 220 221 .mce-i-pastetext:before { 222 content: '\f217'; 223 } 224 225 .mce-i-removeformat:before { 226 content: '\f218'; 227 } 228 229 .mce-i-charmap:before { 230 content: '\f220'; 231 } 232 233 .mce-i-outdent:before { 234 content: '\f221'; 235 } 236 237 .mce-i-indent:before { 238 content: '\f222'; 239 } 240 241 .mce-i-undo:before { 242 content: '\f171'; 243 } 244 245 .mce-i-redo:before { 246 content: '\f172'; 247 } 248 249 .mce-i-help:before, 250 .mce-i-wp_help:before { 251 content: '\f223'; 252 } 253 254 .mce-i-wp-media-library:before { 255 content: '\f104'; 256 } 257 258 .mce-i-ltr:before { 259 content: '\f320'; 260 } 261 262 /* Editors */ 1144 263 .wp-editor-wrap { 1145 264 position: relative; … … 1286 405 } 1287 406 407 /* Quicktags */ 1288 408 .quicktags-toolbar { 1289 409 border-bottom-style: solid; … … 1880 1000 1881 1001 /* TinyMCE modal */ 1002 /* TODO: restyle the TinyMCE 4.0 modals 1882 1003 .clearlooks2 .mceTop { 1883 1004 border-bottom: 1px solid #ccc; … … 1947 1068 padding-left: 12px; 1948 1069 } 1949 1070 */ 1950 1071 /* Distraction Free Writing mode 1951 1072 * =Overlay Styles … … 1962 1083 } 1963 1084 1964 . fullscreen-active .fullscreen-overlay,1965 . fullscreen-active #wp-fullscreen-body {1085 .wp-fullscreen-active .fullscreen-overlay, 1086 .wp-fullscreen-active #wp-fullscreen-body { 1966 1087 display: block; 1967 1088 } … … 1971 1092 } 1972 1093 1973 . fullscreen-active .fullscreen-fader {1094 .wp-fullscreen-active .fullscreen-fader { 1974 1095 display: none; 1975 1096 } … … 1977 1098 /* =Overlay Body 1978 1099 -------------------------------------------------------------- */ 1100 1979 1101 #wp-fullscreen-body { 1980 width: 100%;1981 1102 z-index: 150005; 1982 1103 display: none; 1104 } 1105 1106 .wp-fullscreen-wrap { 1107 margin: 0; 1108 padding: 0; 1983 1109 position: absolute; 1984 top: 0;1985 1110 left: 0; 1986 font-size: 12px; 1987 } 1988 1989 #wp-fullscreen-wrap { 1990 margin: 0 auto 50px; 1991 position: relative; 1992 padding-top: 60px; 1993 } 1994 1995 #wp-fullscreen-title { 1996 font-size: 1.7em; 1997 line-height: 100%; 1998 outline: medium none; 1999 padding: 6px 7px; 2000 width: 100%; 2001 margin-bottom: 30px; 2002 -webkit-box-shadow: none; 2003 box-shadow: none; 2004 } 2005 2006 #wp-fullscreen-container { 2007 padding: 4px 10px 50px; 2008 } 2009 2010 #wp-fullscreen-title, 2011 #wp-fullscreen-container { 1111 right: 0; 1112 bottom: 30px; 1113 top: 60px; 1114 z-index: 150010; 1115 1116 } 1117 1118 .wp-fullscreen-wrap .wp-editor-container, 1119 #wp-fullscreen-central-toolbar { 1120 max-width: 100%; 1121 } 1122 1123 .wp-fullscreen-active .wp-editor-tools, 1124 .wp-fullscreen-active .quicktags-toolbar, 1125 .wp-fullscreen-active .mce-toolbar-grp, 1126 .wp-fullscreen-active .mce-statusbar { 1127 display: none; 1128 } 1129 1130 #wp-fullscreen-status { 1131 margin: auto; 1132 -webkit-transition: opacity 0.4s; 1133 transition: opacity 0.4s; 1134 } 1135 1136 .wp-fullscreen-active .wp-fullscreen-title, 1137 .wp-fullscreen-active .wp-fullscreen-title:focus, 1138 .wp-fullscreen-active .wp-editor-container { 2012 1139 -webkit-border-radius: 0; 2013 1140 border-radius: 0; 2014 1141 border: 1px dashed transparent; 2015 1142 background: transparent; 2016 -moz-transition-property: border-color;2017 -moz-transition-duration: 0.6s;2018 -webkit-transition-property: border-color;2019 -webkit-transition-duration: 0.6s;2020 -o-transition-property: border-color;2021 -o-transition-duration: 0.6s;2022 transition-property: border-color;2023 transition-duration: 0.6s;2024 }2025 2026 #wp_mce_fullscreen {2027 width: 100%;2028 min-height: 300px;2029 border: 0;2030 background: transparent;2031 font-family: Consolas, Monaco, monospace;2032 line-height: 1.6em;2033 padding: 0;2034 overflow-y: hidden;2035 outline: none;2036 resize: none;2037 1143 -webkit-box-shadow: none; 2038 1144 box-shadow: none; 1145 -webkit-transition: border-color 0.4s; 1146 transition: border-color 0.4s; 1147 } 1148 1149 .wp-fullscreen-active .wp-editor-container { 1150 margin: auto; 1151 } 1152 1153 .wp-fullscreen-active .wp-fullscreen-title { 1154 font-size: 1.7em; 1155 line-height: 100%; 1156 outline: medium none; 1157 padding: 3px 7px; 1158 margin: 10px auto 30px; 1159 display: block; 2039 1160 } 2040 1161 2041 1162 #wp-fullscreen-tagline { 2042 color: # BBBBBB;1163 color: #bbb; 2043 1164 font-size: 18px; 2044 1165 float: right; … … 2051 1172 background: #f5f5f5; 2052 1173 border-bottom: 1px solid #fff; 2053 height: 40px; 1174 height: 45px; 1175 position: fixed; 2054 1176 left: 0; 2055 min-width: 800px; 2056 position: fixed; 1177 right: 0; 2057 1178 top: 0; 2058 1179 width: 100%; 2059 1180 z-index: 150050; 1181 -webkit-transition: opacity 0.4s; 1182 transition: opacity 0.4s; 2060 1183 } 2061 1184 … … 2064 1187 clear: both; 2065 1188 max-width: 1100px; 2066 min-width: 820px;2067 1189 margin: 0 auto; 2068 1190 } … … 2075 1197 } 2076 1198 1199 #wp-fullscreen-button-bar { 1200 margin-top: 2px; 1201 } 1202 2077 1203 #wp-fullscreen-save { 2078 1204 float: right; … … 2082 1208 #wp-fullscreen-count, 2083 1209 #wp-fullscreen-close { 2084 padding-top: 5px;1210 padding-top: 6px; 2085 1211 } 2086 1212 … … 2095 1221 2096 1222 #wp-fullscreen-mode-bar { 2097 padding: 1px 14px 0 0;1223 padding: 3px 14px 0 0; 2098 1224 } 2099 1225 … … 2147 1273 } 2148 1274 2149 #wp-fullscreen-buttons .active a {2150 background: inherit;2151 }2152 2153 1275 #wp-fullscreen-buttons .hidden { 2154 1276 display: none; … … 2159 1281 } 2160 1282 1283 #wp-fullscreen-buttons .mce-btn button { 1284 margin: 0; 1285 outline: 0 none; 1286 border: 0 none; 1287 white-space: nowrap; 1288 width: auto; 1289 background: none; 1290 color: #333333; 1291 cursor: pointer; 1292 font-size: 18px; 1293 line-height: 20px; 1294 overflow: visible; 1295 text-align: center; 1296 -moz-box-sizing: border-box; 1297 box-sizing: border-box; 1298 } 1299 2161 1300 .wp-html-mode #wp-fullscreen-buttons div { 2162 1301 display: none; … … 2165 1304 .wp-html-mode #wp-fullscreen-buttons div.wp-fullscreen-both { 2166 1305 display: block; 2167 }2168 2169 #fullscreen-topbar.fullscreen-make-sticky {2170 display: block !important;2171 1306 } 2172 1307 … … 2178 1313 #wp-fullscreen-save span { 2179 1314 padding-right: 4px; 1315 line-height: 26px; 2180 1316 display: none; 2181 1317 } … … 2183 1319 /* =Thickbox Adjustments 2184 1320 -------------------------------------------------------------- */ 2185 . fullscreen-active #TB_overlay {1321 .wp-fullscreen-active #TB_overlay { 2186 1322 z-index: 150100; 2187 1323 } 2188 1324 2189 . fullscreen-active #TB_window {1325 .wp-fullscreen-active #TB_window { 2190 1326 z-index: 150102; 2191 1327 } … … 2193 1329 /* =TinyMCE Adjustments 2194 1330 -------------------------------------------------------------- */ 2195 #wp_mce_fullscreen_ifr { 2196 background: transparent; 2197 } 2198 2199 #wp_mce_fullscreen_parent #wp_mce_fullscreen_tbl tr.mceFirst { 2200 display : none; 2201 } 2202 2203 #wp-fullscreen-container .wp_themeSkin table td { 2204 vertical-align: top; 1331 .wp-fullscreen-active #mce-modal-block { 1332 z-index: 150100 !important; 1333 } 1334 1335 .wp-fullscreen-active .mce-window { 1336 z-index: 150102 !important; 2205 1337 } 2206 1338 … … 2210 1342 } 2211 1343 2212 .wp-fullscreen-focus #wp-fullscreen-title,2213 .wp-fullscreen-focus #wp-fullscreen-container {2214 border-color: #ccc;2215 }2216 2217 1344 /* =CSS 3 transitions 2218 1345 -------------------------------------------------------------- */ 1346 1347 .wp-fullscreen-active #wp-fullscreen-status, 1348 .wp-fullscreen-active #fullscreen-topbar { 1349 -webkit-transition-duration: 0.8s; 1350 transition-duration: 0.8s; 1351 opacity: 0; 1352 filter: alpha(opacity=0); 1353 } 1354 1355 .wp-fullscreen-active.wp-dfw-show-ui #wp-fullscreen-status, 1356 .wp-fullscreen-active.wp-dfw-show-ui #fullscreen-topbar { 1357 -webkit-transition-duration: 0.4s; 1358 transition-duration: 0.4s; 1359 opacity: 1; 1360 filter: alpha(opacity=100); 1361 } 1362 1363 .wp-fullscreen-active .wp-fullscreen-title, 1364 .wp-fullscreen-active .wp-editor-container { 1365 -webkit-transition-duration: 0.8s; 1366 transition-duration: 0.8s; 1367 border-color: transparent; 1368 } 1369 1370 .wp-fullscreen-active.wp-dfw-show-ui .wp-fullscreen-title, 1371 .wp-fullscreen-active.wp-dfw-show-ui .wp-editor-container { 1372 -webkit-transition-duration: 0.4s; 1373 transition-duration: 0.4s; 1374 border-color: #ccc; 1375 } 2219 1376 2220 1377 .fade-1000, … … 2223 1380 .fade-300 { 2224 1381 opacity: 0; 2225 -moz-transition-property: opacity;2226 1382 -webkit-transition-property: opacity; 2227 -o-transition-property: opacity;2228 1383 transition-property: opacity; 2229 1384 } 2230 1385 2231 1386 .fade-1000 { 2232 -moz-transition-duration: 1s;2233 1387 -webkit-transition-duration: 1s; 2234 -o-transition-duration: 1s;2235 1388 transition-duration: 1s; 2236 1389 } 2237 1390 2238 1391 .fade-600 { 2239 -moz-transition-duration: 0.6s;2240 1392 -webkit-transition-duration: 0.6s; 2241 -o-transition-duration: 0.6s;2242 1393 transition-duration: 0.6s; 2243 1394 } 2244 1395 2245 1396 .fade-400 { 2246 -moz-transition-duration: 0.4s;2247 1397 -webkit-transition-duration: 0.4s; 2248 -o-transition-duration: 0.4s;2249 1398 transition-duration: 0.4s; 2250 1399 } 2251 1400 2252 1401 .fade-300 { 2253 -moz-transition-duration: 0.3s;2254 1402 -webkit-transition-duration: 0.3s; 2255 -o-transition-duration: 0.3s;2256 1403 transition-duration: 0.3s; 2257 1404 } … … 2263 1410 /* =Localization 2264 1411 -------------------------------------------------------------- */ 2265 .rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors,2266 .rtl .wp_themeSkin .mceMenu .mceText,2267 1412 .rtl .wp-switch-editor, 2268 .rtl .quicktags-toolbar input, 2269 .rtl .clearlooks2 .mceTop span, 2270 .rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors { 1413 .rtl .quicktags-toolbar input { 2271 1414 font-family: Tahoma, sans-serif; 2272 1415 } 2273 1416 2274 html:lang(he-il) .rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors,2275 html:lang(he-il) .rtl .wp_themeSkin .mceMenu .mceText,2276 1417 html:lang(he-il) .rtl .wp-switch-editor, 2277 html:lang(he-il) .rtl .quicktags-toolbar input, 2278 html:lang(he-il) .rtl .clearlooks2 .mceTop span, 2279 html:lang(he-il) .rtl .wp_themeSkin .mceColorSplitMenu a.mceMoreColors { 1418 html:lang(he-il) .rtl .quicktags-toolbar input { 2280 1419 font-family: Arial, sans-serif; 2281 1420 } … … 2292 1431 } 2293 1432 2294 .wp_themeSkin .mceListBox .mceOpen,2295 .wp_themeSkin .mceListBoxHover .mceOpen,2296 .wp_themeSkin .mceListBoxSelected .mceOpen,2297 .wp_themeSkin table.mceListBoxEnabled .mceOpen {2298 background-image: url('../images/down_arrow-2x.gif');2299 background-size: 10px 20px;2300 }2301 2302 .wp_themeSkin .mceSplitButtonEnabled a.mceOpen,2303 .wp_themeSkin .mceSplitButtonSelected a.mceOpen,2304 .wp_themeSkin .mceSplitButtonActive a.mceOpen,2305 .wp_themeSkin .mceSplitButtonEnabled:hover a.mceOpen {2306 background-image: url('../images/down_arrow-2x.gif');2307 background-size: 10px 20px;2308 }2309 2310 1433 #wp-link .toggle-arrow { 2311 1434 background: transparent url('../images/toggle-arrow-2x.png') top left no-repeat; … … 2313 1436 } 2314 1437 } 1438 1439 /* TODO: DFW responsive */ 1440 1441 -
trunk/src/wp-includes/js/autosave.js
r26202 r26876 44 44 45 45 window.onbeforeunload = function(){ 46 var editor = typeof(tinymce) != 'undefined' ? tinymce.activeEditor : false , compareString;46 var editor = typeof(tinymce) != 'undefined' ? tinymce.activeEditor : false; 47 47 48 48 if ( editor && ! editor.isHidden() ) { … … 50 50 return autosaveL10n.saveAlert; 51 51 } else { 52 if ( fullscreen && fullscreen.settings.visible ) { 53 compareString = wp.autosave.getCompareString({ 54 post_title: $('#wp-fullscreen-title').val() || '', 55 content: $('#wp_mce_fullscreen').val() || '', 56 excerpt: $('#excerpt').val() || '' 57 }); 58 } else { 59 compareString = wp.autosave.getCompareString(); 60 } 61 62 if ( compareString != autosaveLast ) 52 if ( wp.autosave.getCompareString() != autosaveLast ) 63 53 return autosaveL10n.saveAlert; 64 54 } … … 116 106 117 107 // This code is meant to allow tabbing from Title to Post content. 118 $('#title').on('keydown.editor-focus', function(e) { 119 var ed; 120 121 if ( e.which != 9 ) 122 return; 123 124 if ( !e.ctrlKey && !e.altKey && !e.shiftKey ) { 125 if ( typeof(tinymce) != 'undefined' ) 126 ed = tinymce.get('content'); 127 128 if ( ed && !ed.isHidden() ) { 129 $(this).one('keyup', function(){ 130 $('#content_tbl td.mceToolbar > a').focus(); 108 $('#title').on( 'keydown.editor-focus', function( event ) { 109 var editor; 110 111 if ( event.which === 9 && ! event.ctrlKey && ! event.altKey && ! event.shiftKey ) { 112 if ( typeof tinymce !== 'undefined' ) { 113 editor = tinymce.get('content'); 114 } 115 116 if ( editor && ! editor.isHidden() ) { 117 $(this).one( 'keyup', function() { 118 editor.focus(); 131 119 }); 132 120 } else { … … 134 122 } 135 123 136 e .preventDefault();124 event.preventDefault(); 137 125 } 138 126 }); … … 346 334 return data; 347 335 } else { 348 if ( 'mce_fullscreen' == ed.id )349 tinymce.get('content').setContent(ed.getContent({format : 'raw'}), {format : 'raw'});350 351 336 tinymce.triggerSave(); 352 337 } 353 338 } 354 339 355 if ( typeof fullscreen != 'undefined' && fullscreen.settings.visible ) { 356 data.post_title = $('#wp-fullscreen-title').val() || ''; 357 data.content = $('#wp_mce_fullscreen').val() || ''; 358 } else { 359 data.post_title = $('#title').val() || ''; 360 data.content = $('#content').val() || ''; 361 } 340 data.post_title = $('#title').val() || ''; 341 data.content = $('#content').val() || ''; 362 342 363 343 /* -
trunk/src/wp-includes/js/media-editor.js
r26200 r26876 467 467 } 468 468 } else if ( mce ) { 469 if ( tinymce.activeEditor && (tinymce.activeEditor.id == 'mce_fullscreen' || tinymce.activeEditor.id == 'wp_mce_fullscreen') ) 470 ed = tinymce.activeEditor; 471 else 472 ed = tinymce.get(wpActiveEditor); 473 } 474 475 if ( ed && !ed.isHidden() ) { 469 ed = tinymce.get( wpActiveEditor ); 470 } 471 472 if ( ed && ! ed.isHidden() ) { 476 473 // restore caret position on IE 477 if ( tinymce.isIE && ed.windowManager.insertimagebookmark )478 ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark);474 // if ( tinymce.isIE && ed.windowManager.insertimagebookmark ) 475 // ed.selection.moveToBookmark(ed.windowManager.insertimagebookmark); 479 476 480 477 if ( h.indexOf('[caption') !== -1 ) { … … 665 662 666 663 id = this.id( id ); 667 664 /* 668 665 // Save a bookmark of the caret position in IE. 669 666 if ( typeof tinymce !== 'undefined' ) { … … 675 672 } 676 673 } 677 674 */ 678 675 workflow = this.get( id ); 679 676 -
trunk/src/wp-includes/js/quicktags.js
r26553 r26876 186 186 tb.id = toolbar_id; 187 187 tb.className = 'quicktags-toolbar'; 188 tb.onclick = function() { 189 window.wpActiveEditor = id; 190 }; 188 191 189 192 canvas.parentNode.insertBefore(tb, canvas); … … 564 567 var URL, t = this; 565 568 566 if ( typeof (wpLink)!== 'undefined' ) {567 wpLink.open( );569 if ( typeof wpLink !== 'undefined' ) { 570 wpLink.open( ed.id ); 568 571 return; 569 572 } … … 606 609 qt.FullscreenButton.prototype = new qt.Button(); 607 610 qt.FullscreenButton.prototype.callback = function(e, c) { 608 if ( ! c.id || typeof(fullscreen) === 'undefined') {611 if ( ! c.id || typeof wp === 'undefined' || ! wp.editor || ! wp.editor.fullscreen ) { 609 612 return; 610 613 } 611 614 612 fullscreen.on();615 wp.editor.fullscreen.on(); 613 616 }; 614 617 -
trunk/src/wp-includes/js/tinymce/langs/wp-langs-en.js
r22996 r26876 1 tinyMCE.addI18n({en:{ 2 common:{ 3 edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?", 4 apply:"Apply", 5 insert:"Insert", 6 update:"Update", 7 cancel:"Cancel", 8 close:"Close", 9 browse:"Browse", 10 class_name:"Class", 11 not_set:"-- Not set --", 12 clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.", 13 clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.", 14 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.", 15 invalid_data:"ERROR: Invalid values entered, these are marked in red.", 16 invalid_data_number:"{#field} must be a number", 17 invalid_data_min:"{#field} must be a number greater than {#min}", 18 invalid_data_size:"{#field} must be a number or percentage", 19 more_colors:"More colors" 20 }, 21 colors:{ 22 "000000":"Black", 23 "993300":"Burnt orange", 24 "333300":"Dark olive", 25 "003300":"Dark green", 26 "003366":"Dark azure", 27 "000080":"Navy Blue", 28 "333399":"Indigo", 29 "333333":"Very dark gray", 30 "800000":"Maroon", 31 "FF6600":"Orange", 32 "808000":"Olive", 33 "008000":"Green", 34 "008080":"Teal", 35 "0000FF":"Blue", 36 "666699":"Grayish blue", 37 "808080":"Gray", 38 "FF0000":"Red", 39 "FF9900":"Amber", 40 "99CC00":"Yellow green", 41 "339966":"Sea green", 42 "33CCCC":"Turquoise", 43 "3366FF":"Royal blue", 44 "800080":"Purple", 45 "999999":"Medium gray", 46 "FF00FF":"Magenta", 47 "FFCC00":"Gold", 48 "FFFF00":"Yellow", 49 "00FF00":"Lime", 50 "00FFFF":"Aqua", 51 "00CCFF":"Sky blue", 52 "993366":"Brown", 53 "C0C0C0":"Silver", 54 "FF99CC":"Pink", 55 "FFCC99":"Peach", 56 "FFFF99":"Light yellow", 57 "CCFFCC":"Pale green", 58 "CCFFFF":"Pale cyan", 59 "99CCFF":"Light sky blue", 60 "CC99FF":"Plum", 61 "FFFFFF":"White" 62 }, 63 contextmenu:{ 64 align:"Alignment", 65 left:"Left", 66 center:"Center", 67 right:"Right", 68 full:"Full" 69 }, 70 insertdatetime:{ 71 date_fmt:"%Y-%m-%d", 72 time_fmt:"%H:%M:%S", 73 insertdate_desc:"Insert date", 74 inserttime_desc:"Insert time", 75 months_long:"January,February,March,April,May,June,July,August,September,October,November,December", 76 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", 77 day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday", 78 day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat" 79 }, 80 print:{ 81 print_desc:"Print" 82 }, 83 preview:{ 84 preview_desc:"Preview" 85 }, 86 directionality:{ 87 ltr_desc:"Direction left to right", 88 rtl_desc:"Direction right to left" 89 }, 90 layer:{ 91 insertlayer_desc:"Insert new layer", 92 forward_desc:"Move forward", 93 backward_desc:"Move backward", 94 absolute_desc:"Toggle absolute positioning", 95 content:"New layer..." 96 }, 97 save:{ 98 save_desc:"Save", 99 cancel_desc:"Cancel all changes" 100 }, 101 nonbreaking:{ 102 nonbreaking_desc:"Insert non-breaking space character" 103 }, 104 iespell:{ 105 iespell_desc:"Run spell checking", 106 download:"ieSpell not detected. Do you want to install it now?" 107 }, 108 advhr:{ 109 advhr_desc:"Horizontal rule" 110 }, 111 emotions:{ 112 emotions_desc:"Emotions" 113 }, 114 searchreplace:{ 115 search_desc:"Find", 116 replace_desc:"Find/Replace" 117 }, 118 advimage:{ 119 image_desc:"Insert/edit image" 120 }, 121 advlink:{ 122 link_desc:"Insert/edit link" 123 }, 124 xhtmlxtras:{ 125 cite_desc:"Citation", 126 abbr_desc:"Abbreviation", 127 acronym_desc:"Acronym", 128 del_desc:"Deletion", 129 ins_desc:"Insertion", 130 attribs_desc:"Insert/Edit Attributes" 131 }, 132 style:{ 133 desc:"Edit CSS Style" 134 }, 135 paste:{ 136 paste_text_desc:"Paste as Plain Text", 137 paste_word_desc:"Paste from Word", 138 selectall_desc:"Select All", 139 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.", 140 plaintext_mode:"Paste is now in plain text mode. Click again to toggle back to regular paste mode." 141 }, 142 paste_dlg:{ 143 text_title:"Use CTRL + V on your keyboard to paste the text into the window.", 144 text_linebreaks:"Keep linebreaks", 145 word_title:"Use CTRL + V on your keyboard to paste the text into the window." 146 }, 147 table:{ 148 desc:"Inserts a new table", 149 row_before_desc:"Insert row before", 150 row_after_desc:"Insert row after", 151 delete_row_desc:"Delete row", 152 col_before_desc:"Insert column before", 153 col_after_desc:"Insert column after", 154 delete_col_desc:"Remove column", 155 split_cells_desc:"Split merged table cells", 156 merge_cells_desc:"Merge table cells", 157 row_desc:"Table row properties", 158 cell_desc:"Table cell properties", 159 props_desc:"Table properties", 160 paste_row_before_desc:"Paste table row before", 161 paste_row_after_desc:"Paste table row after", 162 cut_row_desc:"Cut table row", 163 copy_row_desc:"Copy table row", 164 del:"Delete table", 165 row:"Row", 166 col:"Column", 167 cell:"Cell" 168 }, 169 autosave:{ 170 unload_msg:"The changes you made will be lost if you navigate away from this page." 171 }, 172 fullscreen:{ 173 desc:"Toggle fullscreen mode (Alt + Shift + G)" 174 }, 175 media:{ 176 desc:"Insert / edit embedded media", 177 edit:"Edit embedded media" 178 }, 179 fullpage:{ 180 desc:"Document properties" 181 }, 182 template:{ 183 desc:"Insert predefined template content" 184 }, 185 visualchars:{ 186 desc:"Visual control characters on/off." 187 }, 188 spellchecker:{ 189 desc:"Toggle spellchecker (Alt + Shift + N)", 190 menu:"Spellchecker settings", 191 ignore_word:"Ignore word", 192 ignore_words:"Ignore all", 193 langs:"Languages", 194 wait:"Please wait...", 195 sug:"Suggestions", 196 no_sug:"No suggestions", 197 no_mpell:"No misspellings found.", 198 learn_word:"Learn word" 199 }, 200 pagebreak:{ 201 desc:"Insert Page Break" 202 }, 203 advlist:{ 204 types:"Types", 205 def:"Default", 206 lower_alpha:"Lower alpha", 207 lower_greek:"Lower greek", 208 lower_roman:"Lower roman", 209 upper_alpha:"Upper alpha", 210 upper_roman:"Upper roman", 211 circle:"Circle", 212 disc:"Disc", 213 square:"Square" 214 }, 215 aria:{ 216 rich_text_area:"Rich Text Area" 217 }, 218 wordcount:{ 219 words:"Words: " 220 } 221 }}); 222 223 tinyMCE.addI18n("en.advanced",{ 224 style_select:"Styles", 225 font_size:"Font size", 226 fontdefault:"Font family", 227 block:"Format", 228 paragraph:"Paragraph", 229 div:"Div", 230 address:"Address", 231 pre:"Preformatted", 232 h1:"Heading 1", 233 h2:"Heading 2", 234 h3:"Heading 3", 235 h4:"Heading 4", 236 h5:"Heading 5", 237 h6:"Heading 6", 238 blockquote:"Blockquote", 239 code:"Code", 240 samp:"Code sample", 241 dt:"Definition term ", 242 dd:"Definition description", 243 bold_desc:"Bold (Ctrl + B)", 244 italic_desc:"Italic (Ctrl + I)", 245 underline_desc:"Underline", 246 striketrough_desc:"Strikethrough (Alt + Shift + D)", 247 justifyleft_desc:"Align Left (Alt + Shift + L)", 248 justifycenter_desc:"Align Center (Alt + Shift + C)", 249 justifyright_desc:"Align Right (Alt + Shift + R)", 250 justifyfull_desc:"Align Full (Alt + Shift + J)", 251 bullist_desc:"Unordered list (Alt + Shift + U)", 252 numlist_desc:"Ordered list (Alt + Shift + O)", 253 outdent_desc:"Outdent", 254 indent_desc:"Indent", 255 undo_desc:"Undo (Ctrl + Z)", 256 redo_desc:"Redo (Ctrl + Y)", 257 link_desc:"Insert/edit link (Alt + Shift + A)", 258 unlink_desc:"Unlink (Alt + Shift + S)", 259 image_desc:"Insert/edit image (Alt + Shift + M)", 260 cleanup_desc:"Cleanup messy code", 261 code_desc:"Edit HTML Source", 262 sub_desc:"Subscript", 263 sup_desc:"Superscript", 264 hr_desc:"Insert horizontal ruler", 265 removeformat_desc:"Remove formatting", 266 forecolor_desc:"Select text color", 267 backcolor_desc:"Select background color", 268 charmap_desc:"Insert custom character", 269 visualaid_desc:"Toggle guidelines/invisible elements", 270 anchor_desc:"Insert/edit anchor", 271 cut_desc:"Cut", 272 copy_desc:"Copy", 273 paste_desc:"Paste", 274 image_props_desc:"Image properties", 275 newdocument_desc:"New document", 276 help_desc:"Help", 277 blockquote_desc:"Blockquote (Alt + Shift + Q)", 278 clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.", 279 path:"Path", 280 newdocument:"Are you sure you want to clear all contents?", 281 toolbar_focus:"Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X", 282 more_colors:"More colors", 283 shortcuts_desc:"Accessibility Help", 284 help_shortcut:" Press ALT F10 for toolbar. Press ALT 0 for help.", 285 rich_text_area:"Rich Text Area", 286 toolbar:"Toolbar" 287 }); 288 289 tinyMCE.addI18n("en.advanced_dlg",{ 290 about_title:"About TinyMCE", 291 about_general:"About", 292 about_help:"Help", 293 about_license:"License", 294 about_plugins:"Plugins", 295 about_plugin:"Plugin", 296 about_author:"Author", 297 about_version:"Version", 298 about_loaded:"Loaded plugins", 299 anchor_title:"Insert/edit anchor", 300 anchor_name:"Anchor name", 301 code_title:"HTML Source Editor", 302 code_wordwrap:"Word wrap", 303 colorpicker_title:"Select a color", 304 colorpicker_picker_tab:"Picker", 305 colorpicker_picker_title:"Color picker", 306 colorpicker_palette_tab:"Palette", 307 colorpicker_palette_title:"Palette colors", 308 colorpicker_named_tab:"Named", 309 colorpicker_named_title:"Named colors", 310 colorpicker_color:"Color:", 311 colorpicker_name:"Name:", 312 charmap_title:"Select custom character", 313 charmap_usage:"Use left and right arrows to navigate.", 314 image_title:"Insert/edit image", 315 image_src:"Image URL", 316 image_alt:"Image description", 317 image_list:"Image list", 318 image_border:"Border", 319 image_dimensions:"Dimensions", 320 image_vspace:"Vertical space", 321 image_hspace:"Horizontal space", 322 image_align:"Alignment", 323 image_align_baseline:"Baseline", 324 image_align_top:"Top", 325 image_align_middle:"Middle", 326 image_align_bottom:"Bottom", 327 image_align_texttop:"Text top", 328 image_align_textbottom:"Text bottom", 329 image_align_left:"Left", 330 image_align_right:"Right", 331 link_title:"Insert/edit link", 332 link_url:"Link URL", 333 link_target:"Target", 334 link_target_same:"Open link in the same window", 335 link_target_blank:"Open link in a new window", 336 link_titlefield:"Title", 337 link_is_email:"The URL you entered seems to be an email address, do you want to add the required mailto: prefix?", 338 link_is_external:"The URL you entered seems to external link, do you want to add the required http:// prefix?", 339 link_list:"Link list", 340 accessibility_help:"Accessibility Help", 341 accessibility_usage_title:"General Usage" 342 }); 343 344 tinyMCE.addI18n("en.media_dlg",{ 345 title:"Insert / edit embedded media", 346 general:"General", 347 advanced:"Advanced", 348 file:"File/URL", 349 list:"List", 350 size:"Dimensions", 351 preview:"Preview", 352 constrain_proportions:"Constrain proportions", 353 type:"Type", 354 id:"Id", 355 name:"Name", 356 class_name:"Class", 357 vspace:"V-Space", 358 hspace:"H-Space", 359 play:"Auto play", 360 loop:"Loop", 361 menu:"Show menu", 362 quality:"Quality", 363 scale:"Scale", 364 align:"Align", 365 salign:"SAlign", 366 wmode:"WMode", 367 bgcolor:"Background", 368 base:"Base", 369 flashvars:"Flashvars", 370 liveconnect:"SWLiveConnect", 371 autohref:"AutoHREF", 372 cache:"Cache", 373 hidden:"Hidden", 374 controller:"Controller", 375 kioskmode:"Kiosk mode", 376 playeveryframe:"Play every frame", 377 targetcache:"Target cache", 378 correction:"No correction", 379 enablejavascript:"Enable JavaScript", 380 starttime:"Start time", 381 endtime:"End time", 382 href:"href", 383 qtsrcchokespeed:"Choke speed", 384 target:"Target", 385 volume:"Volume", 386 autostart:"Auto start", 387 enabled:"Enabled", 388 fullscreen:"Fullscreen", 389 invokeurls:"Invoke URLs", 390 mute:"Mute", 391 stretchtofit:"Stretch to fit", 392 windowlessvideo:"Windowless video", 393 balance:"Balance", 394 baseurl:"Base URL", 395 captioningid:"Captioning id", 396 currentmarker:"Current marker", 397 currentposition:"Current position", 398 defaultframe:"Default frame", 399 playcount:"Play count", 400 rate:"Rate", 401 uimode:"UI Mode", 402 flash_options:"Flash options", 403 qt_options:"QuickTime options", 404 wmp_options:"Windows media player options", 405 rmp_options:"Real media player options", 406 shockwave_options:"Shockwave options", 407 autogotourl:"Auto goto URL", 408 center:"Center", 409 imagestatus:"Image status", 410 maintainaspect:"Maintain aspect", 411 nojava:"No java", 412 prefetch:"Prefetch", 413 shuffle:"Shuffle", 414 console:"Console", 415 numloop:"Num loops", 416 controls:"Controls", 417 scriptcallbacks:"Script callbacks", 418 swstretchstyle:"Stretch style", 419 swstretchhalign:"Stretch H-Align", 420 swstretchvalign:"Stretch V-Align", 421 sound:"Sound", 422 progress:"Progress", 423 qtsrc:"QT Src", 424 qt_stream_warn:"Streamed rtsp resources should be added to the QT Src field under the advanced tab.", 425 align_top:"Top", 426 align_right:"Right", 427 align_bottom:"Bottom", 428 align_left:"Left", 429 align_center:"Center", 430 align_top_left:"Top left", 431 align_top_right:"Top right", 432 align_bottom_left:"Bottom left", 433 align_bottom_right:"Bottom right", 434 flv_options:"Flash video options", 435 flv_scalemode:"Scale mode", 436 flv_buffer:"Buffer", 437 flv_startimage:"Start image", 438 flv_starttime:"Start time", 439 flv_defaultvolume:"Default volume", 440 flv_hiddengui:"Hidden GUI", 441 flv_autostart:"Auto start", 442 flv_loop:"Loop", 443 flv_showscalemodes:"Show scale modes", 444 flv_smoothvideo:"Smooth video", 445 flv_jscallback:"JS Callback", 446 html5_video_options:"HTML5 Video Options", 447 altsource1:"Alternative source 1", 448 altsource2:"Alternative source 2", 449 preload:"Preload", 450 poster:"Poster", 451 source:"Source" 452 }); 453 454 tinyMCE.addI18n("en.wordpress",{ 455 wp_adv_desc:"Show/Hide Kitchen Sink (Alt + Shift + Z)", 456 wp_more_desc:"Insert More Tag (Alt + Shift + T)", 457 wp_page_desc:"Insert Page break (Alt + Shift + P)", 458 wp_help_desc:"Help (Alt + Shift + H)", 459 wp_more_alt:"More...", 460 wp_page_alt:"Next page...", 461 add_media:"Add Media", 462 add_image:"Add an Image", 463 add_video:"Add Video", 464 add_audio:"Add Audio", 465 editgallery:"Edit Gallery", 466 delgallery:"Delete Gallery", 467 wp_fullscreen_desc:"Distraction Free Writing mode (Alt + Shift + W)" 468 }); 469 470 tinyMCE.addI18n("en.wpeditimage",{ 471 edit_img:"Edit Image", 472 del_img:"Delete Image", 473 adv_settings:"Advanced Settings", 474 none:"None", 475 size:"Size", 476 thumbnail:"Thumbnail", 477 medium:"Medium", 478 full_size:"Full Size", 479 current_link:"Current Link", 480 link_to_img:"Link to Image", 481 link_help:"Enter a link URL or click above for presets.", 482 adv_img_settings:"Advanced Image Settings", 483 source:"Source", 484 width:"Width", 485 height:"Height", 486 orig_size:"Original Size", 487 css:"CSS Class", 488 adv_link_settings:"Advanced Link Settings", 489 link_rel:"Link Rel", 490 height:"Height", 491 orig_size:"Original Size", 492 css:"CSS Class", 493 s60:"60%", 494 s70:"70%", 495 s80:"80%", 496 s90:"90%", 497 s100:"100%", 498 s110:"110%", 499 s120:"120%", 500 s130:"130%", 501 img_title:"Title", 502 caption:"Caption", 503 alt:"Alternative Text" 504 }); 1 /** 2 * TinyMCE 3.x language strings 3 * 4 * Loaded only when external plugins are added to TinyMCE. 5 */ 6 ( function() { 7 var main = {}, lang = 'en'; 8 9 if ( typeof tinyMCEPreInit !== 'undefined' && tinyMCEPreInit.ref.language !== 'en' ) { 10 lang = tinyMCEPreInit.ref.language; 11 } 12 13 main[lang] = { 14 common: { 15 edit_confirm: "Do you want to use the WYSIWYG mode for this textarea?", 16 apply: "Apply", 17 insert: "Insert", 18 update: "Update", 19 cancel: "Cancel", 20 close: "Close", 21 browse: "Browse", 22 class_name: "Class", 23 not_set: "-- Not set --", 24 clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.", 25 clipboard_no_support: "Currently not supported by your browser, use keyboard shortcuts instead.", 26 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.", 27 invalid_data: "ERROR: Invalid values entered, these are marked in red.", 28 invalid_data_number: "{#field} must be a number", 29 invalid_data_min: "{#field} must be a number greater than {#min}", 30 invalid_data_size: "{#field} must be a number or percentage", 31 more_colors: "More colors" 32 }, 33 colors: { 34 "000000": "Black", 35 "993300": "Burnt orange", 36 "333300": "Dark olive", 37 "003300": "Dark green", 38 "003366": "Dark azure", 39 "000080": "Navy Blue", 40 "333399": "Indigo", 41 "333333": "Very dark gray", 42 "800000": "Maroon", 43 "FF6600": "Orange", 44 "808000": "Olive", 45 "008000": "Green", 46 "008080": "Teal", 47 "0000FF": "Blue", 48 "666699": "Grayish blue", 49 "808080": "Gray", 50 "FF0000": "Red", 51 "FF9900": "Amber", 52 "99CC00": "Yellow green", 53 "339966": "Sea green", 54 "33CCCC": "Turquoise", 55 "3366FF": "Royal blue", 56 "800080": "Purple", 57 "999999": "Medium gray", 58 "FF00FF": "Magenta", 59 "FFCC00": "Gold", 60 "FFFF00": "Yellow", 61 "00FF00": "Lime", 62 "00FFFF": "Aqua", 63 "00CCFF": "Sky blue", 64 "993366": "Brown", 65 "C0C0C0": "Silver", 66 "FF99CC": "Pink", 67 "FFCC99": "Peach", 68 "FFFF99": "Light yellow", 69 "CCFFCC": "Pale green", 70 "CCFFFF": "Pale cyan", 71 "99CCFF": "Light sky blue", 72 "CC99FF": "Plum", 73 "FFFFFF": "White" 74 }, 75 contextmenu: { 76 align: "Alignment", 77 left: "Left", 78 center: "Center", 79 right: "Right", 80 full: "Full" 81 }, 82 insertdatetime: { 83 date_fmt: "%Y-%m-%d", 84 time_fmt: "%H:%M:%S", 85 insertdate_desc: "Insert date", 86 inserttime_desc: "Insert time", 87 months_long: "January,February,March,April,May,June,July,August,September,October,November,December", 88 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", 89 day_long: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday", 90 day_short: "Sun,Mon,Tue,Wed,Thu,Fri,Sat" 91 }, 92 print: { 93 print_desc: "Print" 94 }, 95 preview: { 96 preview_desc: "Preview" 97 }, 98 directionality: { 99 ltr_desc: "Direction left to right", 100 rtl_desc: "Direction right to left" 101 }, 102 layer: { 103 insertlayer_desc: "Insert new layer", 104 forward_desc: "Move forward", 105 backward_desc: "Move backward", 106 absolute_desc: "Toggle absolute positioning", 107 content: "New layer..." 108 }, 109 save: { 110 save_desc: "Save", 111 cancel_desc: "Cancel all changes" 112 }, 113 nonbreaking: { 114 nonbreaking_desc: "Insert non-breaking space character" 115 }, 116 iespell: { 117 iespell_desc: "Run spell checking", 118 download: "ieSpell not detected. Do you want to install it now?" 119 }, 120 advhr: { 121 advhr_desc: "Horizontal rule" 122 }, 123 emotions: { 124 emotions_desc: "Emotions" 125 }, 126 searchreplace: { 127 search_desc: "Find", 128 replace_desc: "Find/Replace" 129 }, 130 advimage: { 131 image_desc: "Insert/edit image" 132 }, 133 advlink: { 134 link_desc: "Insert/edit link" 135 }, 136 xhtmlxtras: { 137 cite_desc: "Citation", 138 abbr_desc: "Abbreviation", 139 acronym_desc: "Acronym", 140 del_desc: "Deletion", 141 ins_desc: "Insertion", 142 attribs_desc: "Insert/Edit Attributes" 143 }, 144 style: { 145 desc: "Edit CSS Style" 146 }, 147 paste: { 148 paste_text_desc: "Paste as Plain Text", 149 paste_word_desc: "Paste from Word", 150 selectall_desc: "Select All", 151 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.", 152 plaintext_mode: "Paste is now in plain text mode. Click again to toggle back to regular paste mode." 153 }, 154 paste_dlg: { 155 text_title: "Use CTRL + V on your keyboard to paste the text into the window.", 156 text_linebreaks: "Keep linebreaks", 157 word_title: "Use CTRL + V on your keyboard to paste the text into the window." 158 }, 159 table: { 160 desc: "Inserts a new table", 161 row_before_desc: "Insert row before", 162 row_after_desc: "Insert row after", 163 delete_row_desc: "Delete row", 164 col_before_desc: "Insert column before", 165 col_after_desc: "Insert column after", 166 delete_col_desc: "Remove column", 167 split_cells_desc: "Split merged table cells", 168 merge_cells_desc: "Merge table cells", 169 row_desc: "Table row properties", 170 cell_desc: "Table cell properties", 171 props_desc: "Table properties", 172 paste_row_before_desc: "Paste table row before", 173 paste_row_after_desc: "Paste table row after", 174 cut_row_desc: "Cut table row", 175 copy_row_desc: "Copy table row", 176 del: "Delete table", 177 row: "Row", 178 col: "Column", 179 cell: "Cell" 180 }, 181 autosave: { 182 unload_msg: "The changes you made will be lost if you navigate away from this page." 183 },