WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#17334 closed defect (bug) (invalid)

WP 3.2, Tinymce & toggle fullscreen mode

Reported by: 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 3 years ago.
without fullscreen.jpg (11.5 KB) - added by arena 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 arena3 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

arena3 years ago

arena3 years ago

comment:2 azaozz3 years ago

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

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

comment:3 arena3 years ago

@azaozz

ok but how to do that ?

comment:4 azaozz3 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.

comment:5 arena3 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;
}

comment:6 ocean903 years ago

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

comment:7 ocean903 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.