Content deleted Content added
Polygnotus (talk | contribs) ←Created page with '// Add Templates section to 2010 wikitext editor // Place this code in your common.js file $(document).ready(function() { // Only run on edit pages with the 2010 wikitext editor if (mw.config.get('wgAction') === 'edit' && $('#wpTextbox1').length) { // Create the Templates section var templatesSection = $('<div>') .attr('id', 'templates-section') .css({ 'border': '1px solid #a2a9b1',...' |
Polygnotus (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1:
// Add Templates section to
// Place this code in your common.js file
// Check if we're editing a page
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
// Add a hook handler
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
//
$textarea.wikiEditor( 'addToToolbar', {
}
// Add
$textarea.wikiEditor( 'addToToolbar', {
}
} );▼
//
$textarea.wikiEditor( 'addToToolbar', {
'
pre: '{{uw-3rr}
} );▼
}
▲ });
▲ }
|