summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.js
blob: 3f30c0c4cf8030d04647d0803fd85a5d4934a646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * JavaScript for WikiEditor Toolbar
 */
jQuery( document ).ready( function ( $ ) {
	if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) {
		$( '.wikiEditor-oldToolbar' ).show();
		return;
	}
	// The old toolbar is still in place and needs to be removed so there aren't two toolbars
	$( '#toolbar' ).remove();
	// Add toolbar module
	// TODO: Implement .wikiEditor( 'remove' )
	$( '#wpTextbox1' ).wikiEditor(
		'addModule', $.wikiEditor.modules.toolbar.config.getDefaultConfig()
	);
} );