Topic on Extension talk:TinyMCE

Gstratt (talkcontribs)

This extension is FANTASTIC. Are we able to limit or customize the order of the toolbar icons? If so, can you point me to a reference?

DuncanCrane (talkcontribs)

Hi Gstratt

I'm really pleased you are enjoying our extension. It is possible to limit or customise the order of the toolbar buttons ( and even have different toolbars for different textareas if you are also using forms).

To do this you can use the $wgTinyMCESettings configuration variable in your LocallSettings.php file. Something like the following will replace the entire toolbar with a new one. You can remove or reorder the entries however, you like. You can also use '+' or '-' to add or remove a single item from the list, as described on the extension page under Configuration.

	$wgTinyMCESettings = array(
		"#wpTextbox1" => array (
			"toolbar" => ''undo redo | cut copy paste insert selectall | fontselect fontsizeselect bold italic underline strikethrough subscript superscript forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist advlist outdent indent | wikilink wikiunlink table image media | formatselect removeformat| visualchars visualblocks| searchreplace | wikimagic wikisourcecode wikitext wikiupload | wikitoggle nonbreaking singlelinebreak reference comment template'

Hope that works and do let me know if you need any more help or have any comments regarding the extension.

Gstratt (talkcontribs)

Thanks DuncanCrane! That is exactly what I was looking for. I'm also referencing TinyMCE toolbar configuration for my needs. One thing I'm really missing here is the ability to visually select wiki Categories. Any chance you've written a wikiCatSelect or similar? If that is too massive a code change, is there another TinyMCE compatible solution you could recommend?

Gstratt (talkcontribs)

I've found that MediaWiki extension MsCatSelect may be compatible, still testing

DuncanCrane (talkcontribs)

Hi, I'm glad that worked. The config options in $wgTinyMCESettings are basically TinyMCE config options, so the TinyMCE documentation is a good place to look. Of course, some config options are specific to working with Mediawiki and changing them might break the extension, so you will possibly need to experiment a bit - or pose a question here:-)

It should be relatively straightforward to develop at category selector but would take a little bit of effort. You could base it on one of the current custom mediawiki plugins for TinyMCE which comes with the extension, if you feel up to doing some development? I'm a bit busy on other priorities to develop this myself just now but happy to provide some support if you want to give it a go?

Reply to "customize toolbar icons"