Wikisource:Tools and scripts/More editing buttons

Instructions

 * How to install:
 * 1) Go to common javascript file (Special:MyPage/common.js) they can be added to specific skins if preferred
 * 2) Edit the page and copy the code highlighted below, then save the page.
 * 3) Bypass your browser's cache by using the instruction on that page to reload.
 * 4) You should see the new edit buttons when you edit a page.

Most buttons work with a selection,
 * How to use:
 * 1) make a selection to highlight the text and click the button, or
 * 2) click the button to add the code at the insertion point, then paste or type to replace selection.

You can use the code to design new edit buttons, and add them in this page for other editors to use.


 * For a list of available icons to choose from see MediaWiki edit toolbar.

Hiding buttons
Existing buttons in the default toolbar can be less useful at Wikisource, or you may want to keep your toolbar to a smaller size. Contributors can hide buttons by editing their personal style sheet(Special:MyPage/common.css)

For example, the following code if inserted to your style sheet removes external links, headlines, signature, horizontal rule, media and maths tag, which are seldom needed for transcribing.

Dagger
Button link:

What it does: Inserts a dagger (†)

Ellipsis
Button link:

What it does: Inserts an ellipsis (…)

M-dash
Button link:

What it does: Inserts an m-dash (—)

N-dash
Button link:

What it does: Inserts an n-dash (—)

Pound
Button link:

What it does: Inserts a pound (sterling) sign (£)

Strikethrough
Button link:

What it does: Crosses out highlighted text. Converts "apple" to " apple ", which looks like " apple ".

Underline
Button link:

What it does: Underlines highlighted text. Converts "apple" to " apple ", which looks like " apple ".

Small caps
Button link:

What it does: Wraps text in a sc template.

Larger text
Button link:

What it does: Converts highlighted text to a bigger font size. Converts "big" to " big ", which looks like " big ". Useful for headers and title pages of works.

Smaller text
Button link:

What it does: Converts highlighted text to a smaller font size.

Font size
Button link:

What it does: This converts highlighted text to a specific font size which is customizable by changing the size number.

Link to Wikipedia article
Button link:

What it does: Creates a link from the highlighted text to the respective Wikipedia article entry. Converts "apple" to "apple", which looks like "apple". Allows the reader to research biographies, events, descriptions and other information when reading our Wikisource texts. This can also be substituted to link to any other Wikimedia sister project by simply changing the piped link structure in the code.

Link to Wiktionary entry
Button link:

What it does: Creates a link from the highlighted text to the respective Wiktionary entry. Converts "apple" to "apple", which looks like "apple". Allows the reader to research the meanings of terms on our Wikisource texts. Useful for unusual or ancient terms. This can also be substituted to link to any other Wikimedia sister project by simply changing the piped link structure in the code.

Link to Author page on Wikisource
Button link:

What it does: Creates a link from the highlighted text to the respective author page. Converts "William Shakespeare" to "Author:William Shakespeare (1564-1616)", which looks like "William Shakespeare". Notice that the Author: prefix is not visible. This can be changed by removing the " | " from the link.

Link to a subpage
Button link:

What it does: Creates a link from the highlighted text to a subpage from the current page. On the page The Double Dealer, converts the text "Act I" to "/Act I", which looks like "/Act I". The actual Wikisource link would be The Double Dealer/Act I.

Relative link
Button link:

What it does: Wraps the text in a relative link ( ../link location/ ).

Poem
Button link:

What it does: Converts highlighted text to poem format, allowing for better representation of the original work.

Score
Button link:

What it does: Converts highlighted text to score format.

', "Insert score here" })

Align text left
Button link:

What it does: Aligns highlighted text to the left-hand side of the screen.

Align text center
Button link:

What it does: Centers text across the screen.

Align text right
Button link:

What it does: Aligns highlighted text to the right-hand side of the screen.

Indentation
Button link:

What it does: Adds an indentation to the first sentence of a paragraph. To use, simply put the cursor at the beginning of the paragraph and press the button link.

Line break
Button link:

What it does: Adds a link break

Start
Button link:

What it does: Wraps text Template:hyphenated word start; requires second word to be manually added after the pipe

End
Button link:

What it does: Wraps text with Template:hyphenated word end; requires second word to be manually added after the pipe

Add notes and references
Button link:

What it does: Converts highlighted text into a footnote. Converts "This is a footnote." to " ", which looks like " ". To show the footnote, place "

Noinclude
Button link:

What it does: Wraps the text in tags.

Sections begin & end

 * Used for marking section for sectional transclusion

Begin
Button link:

What it does: Creates a  tag for use in text transclusion.

End
Button link:

What it does: Creates a  tag for use in text transclusion.

Transcluded pages
Button link:

What it does: Inserts a tag. This is the "usual" method of transcluding pages.

Using
Some formatting in Wikisource may require substitution inside tags. The following templates do such tasks

Block center and substituted &lt;poem>
Button link:

What it does: Wraps  around blocked text, which in turn is wrapped inside a centred block

Sample output

substituted &lt;ref>

 * Note: this code should replace a standard &lt;ref> tag to avoid confusion

Button link:

What it does: Wraps around text, converts it to a reference

Sample output

Note: Contributors who wish to then have further parameters liked name or follow should manually append tags like

substitution
Button link:

What it does: wraps text in