2010-09-15 22:40:50 +00:00
|
|
|
/*
|
|
|
|
* JavaScript for WikiEditor Toolbar
|
|
|
|
*/
|
2016-11-22 02:22:13 +00:00
|
|
|
jQuery( function ( $ ) {
|
2010-09-15 22:40:50 +00:00
|
|
|
if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) {
|
2012-04-17 22:19:03 +00:00
|
|
|
$( '.wikiEditor-oldToolbar' ).show();
|
2010-09-15 22:40:50 +00:00
|
|
|
return;
|
2010-09-15 03:08:35 +00:00
|
|
|
}
|
2010-09-15 22:40:50 +00:00
|
|
|
// The old toolbar is still in place and needs to be removed so there aren't two toolbars
|
|
|
|
$( '#toolbar' ).remove();
|
|
|
|
// Add toolbar module
|
2010-10-27 22:22:10 +00:00
|
|
|
// TODO: Implement .wikiEditor( 'remove' )
|
2012-04-17 22:19:03 +00:00
|
|
|
$( '#wpTextbox1' ).wikiEditor(
|
|
|
|
'addModule', $.wikiEditor.modules.toolbar.config.getDefaultConfig()
|
|
|
|
);
|
2010-09-15 22:40:50 +00:00
|
|
|
} );
|