Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#17334 closed defect (bug) (invalid)

WP 3.2, Tinymce & toggle fullscreen mode

Reported by: arena's profile arena Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: TinyMCE Keywords:
Focuses: Cc:

Description

More a concern than a bug

but anyone has an idea how to get rid of the toggle fullscreen button when using the_editor() for another purpose than editing posts

more info here : http://wordpress.org/support/topic/wp-32-tinymce-toggle-fullscreen-mode?replies=1#post-2096843

thank you for your replies

Attachments (2)

with fullscreen.jpg (13.3 KB) - added by arena 13 years ago.
without fullscreen.jpg (11.5 KB) - added by arena 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @arena
13 years ago

Based on wordpress 3.2 beta 1 i tried to remove the fullscreen button for the admin pages using the_editor and tinymce.
I did so :

	add_filter('mce_buttons', 'remove_fullscreen');
	function remove_fullscreen($items)
	{
		foreach($items as $k => $v) if ('fullscreen' == $v) unset($items[$k]);
		return $items;
	}

Apparently this remove the fullscreen buttons but is messing the buttons in the toolbar removing spellchecker, slow/hide kitchen sink, more
misplacing others...

attached are before / after screenshots

#2 @azaozz
13 years ago

Instead of the button, remove the plugin, it's name is wpfullscreen.

Version 0, edited 13 years ago by azaozz (next)

#3 @arena
13 years ago

@azaozz

ok but how to do that ?

#4 @azaozz
13 years ago

Have a look at tiny_mce_before_init, the plugins there are a comma separated string so you can probably

$initArray['plugins'] = str_replace( ',wpfullscreen', '', $initArray['plugins'] )

and repeat for any other default plugins you want to remove.

#5 @arena
13 years ago

  • Keywords dev-feedback removed
  • Resolution set to fixed
  • Status changed from new to closed

@azaozz

just great ! thank you !

here is my code for doc purpose

add_filter('tiny_mce_before_init', 'my_tiny_mce_before_init');

function my_tiny_mce_before_init($initArray)
{
	$initArray['plugins'] = str_replace( array('wpfullscreen',',,') , array('', ',') , $initArray['plugins'] );
	return $initArray;
}

#6 @ocean90
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution fixed deleted
  • Status changed from closed to reopened

#7 @ocean90
13 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

Please use the support forums for support questions and don't open a ticket to push your thread. Thanks.

Note: See TracTickets for help on using tickets.