Difference between revisions of "User:King of Herdaz/Toolbar customization"

Jump to navigation Jump to search
(→‎Buttons: gave a summary/description for each button and made the code collapsible for each one.)
|}
 
==== Signature ====
<pre> // Adding signature button to the "main" section
Pastes <code><nowiki>~~~~</nowiki></code> into the page to generate your signature with a timestamp. This useful for commenting on talk pages.
 
{| class="mw-collapsible mw-collapsed" width=100%
|-
|
|-
|
<pre>
<pre> // Adding signature button to the "main" section
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'main',
}
});
</pre>
|}
 
==== Break Tag ====
Inserts <code><nowiki><br /></nowiki></code> into the page. This is the preferred syntax on the Coppermind for creating line breaks.
 
{| class="mw-collapsible mw-collapsed" width=100%
|-
|
|-
|
<pre>
// Adding <br/> button to the "main" section
$('#wpTextbox1').wikiEditor('addToToolbar', {
}
});
</pre>
|}
 
==== Simple Link ====
Simply encases the highlighted text within <code><nowiki>[[</nowiki></code> and <code><nowiki>]]</nowiki></code> to generate a link.
 
{| class="mw-collapsible mw-collapsed" width=100%
|-
|
|-
|
<pre>
// Adding link button to the "main" section
$('#wpTextbox1' ).wikiEditor( 'addToToolbar', {
}
});
</pre>
|}
 
==== Hidden Text ====
Encases the highlighted text between <code><nowiki><!--</nowiki></code> and <code><nowiki>--></nowiki></code> to prevent it from appearing in the viewable page.
 
{| class="mw-collapsible mw-collapsed" width=100%
|-
|
|-
|
<pre>
// Adding hidden text button to the "main" section
$('#wpTextbox1' ).wikiEditor( 'addToToolbar', {
}
});
</pre>
|}
 
==== Columns ====
Encases your text, which should a bulleted (<code><nowiki>*</nowiki></code>) or numbered (<code><nowiki>#</nowiki></code>) list, inside of the {{t|columns}} template to columnize the list.
 
{| class="mw-collapsible mw-collapsed" width=100%
|-
|
|-
|
<pre>
// Adding columns button to the "main" section
$('#wpTextbox1' ).wikiEditor( 'addToToolbar', {
}
});
</pre>
|}
 
==== <nowiki><code></nowiki> ====
Encases your highlighted text between <code><nowiki><code></nowiki></code> and <code><nowiki></code></nowiki></code>.
 
{| class="mw-collapsible mw-collapsed" width=100%
|-
|
|-
|
<pre>
// Adding a <code> button to the "main" section
$('#wpTextbox1' ).wikiEditor( 'addToToolbar', {
});
</pre>
|}
 
== Removing default elements ==