mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Add med buttons to TinyMCE fullscreen. Props azaozz. fixes #7232
git-svn-id: https://develop.svn.wordpress.org/trunk@8248 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -395,7 +395,11 @@ wp_more_desc:"' . mce_escape( __('Insert More tag') ) . ' (Alt+Shift+T)",
|
||||
wp_page_desc:"' . mce_escape( __('Insert Page break') ) . ' (Alt+Shift+P)",
|
||||
wp_help_desc:"' . mce_escape( __('Help') ) . ' (Alt+Shift+H)",
|
||||
wp_more_alt:"' . mce_escape( __('More...') ) . '",
|
||||
wp_page_alt:"' . mce_escape( __('Next page...') ) . '"
|
||||
wp_page_alt:"' . mce_escape( __('Next page...') ) . '",
|
||||
add_media:"' . mce_escape( __('Add Media') ) . '",
|
||||
add_image:"' . mce_escape( __('Add an Image') ) . '",
|
||||
add_video:"' . mce_escape( __('Add Video') ) . '",
|
||||
add_audio:"' . mce_escape( __('Add Audio') ) . '"
|
||||
});
|
||||
|
||||
tinyMCE.addI18n("' . $language . '.wpeditimage",{
|
||||
|
||||
@@ -89,6 +89,50 @@
|
||||
cmd : 'WP_Adv'
|
||||
});
|
||||
|
||||
// Add Media buttons
|
||||
ed.addButton('add_media', {
|
||||
title : 'wordpress.add_media',
|
||||
image : url + '/img/media.gif',
|
||||
onclick : function() {
|
||||
tb_show('', tinymce.DOM.get('add_media').href);
|
||||
tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
|
||||
}
|
||||
});
|
||||
|
||||
ed.addButton('add_image', {
|
||||
title : 'wordpress.add_image',
|
||||
image : url + '/img/image.gif',
|
||||
onclick : function() {
|
||||
tb_show('', tinymce.DOM.get('add_image').href);
|
||||
tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
|
||||
}
|
||||
});
|
||||
|
||||
ed.addButton('add_video', {
|
||||
title : 'wordpress.add_video',
|
||||
image : url + '/img/video.gif',
|
||||
onclick : function() {
|
||||
tb_show('', tinymce.DOM.get('add_video').href);
|
||||
tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
|
||||
}
|
||||
});
|
||||
|
||||
ed.addButton('add_audio', {
|
||||
title : 'wordpress.add_audio',
|
||||
image : url + '/img/audio.gif',
|
||||
onclick : function() {
|
||||
tb_show('', tinymce.DOM.get('add_audio').href);
|
||||
tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );
|
||||
}
|
||||
});
|
||||
|
||||
// Add Media buttons to fullscreen
|
||||
ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) {
|
||||
if ( 'mceFullScreen' != cmd ) return;
|
||||
if ( 'mce_fullscreen' != ed.id )
|
||||
ed.settings.theme_advanced_buttons1 += ',|,add_image,add_video,add_audio,add_media';
|
||||
});
|
||||
|
||||
// Add class "alignleft", "alignright" and "aligncenter" when selecting align for images.
|
||||
ed.onExecCommand.add(function( ed, cmd ) {
|
||||
var n, bl, dom = ed.dom;
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 146 B |
Binary file not shown.
|
After Width: | Height: | Size: 101 B |
Binary file not shown.
|
After Width: | Height: | Size: 149 B |
Binary file not shown.
|
After Width: | Height: | Size: 99 B |
@@ -222,7 +222,7 @@ if ( $compress && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
|
||||
// Setup cache info
|
||||
if ( $disk_cache ) {
|
||||
|
||||
$cacheKey = apply_filters('tiny_mce_version', '20080702');
|
||||
$cacheKey = apply_filters('tiny_mce_version', '20080703');
|
||||
|
||||
foreach ( $initArray as $v )
|
||||
$cacheKey .= $v;
|
||||
|
||||
@@ -37,7 +37,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'editor_functions', '/wp-admin/js/editor.js', false, '20080702' );
|
||||
|
||||
// Modify this version when tinyMCE plugins are changed.
|
||||
$mce_version = apply_filters('tiny_mce_version', '20080701');
|
||||
$mce_version = apply_filters('tiny_mce_version', '20080703');
|
||||
$scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version );
|
||||
|
||||
$scripts->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6');
|
||||
|
||||
Reference in New Issue
Block a user