Extension:CharInsert
From MediaWiki.org
|
Release status: stable |
|||
|---|---|---|---|
| Implementation | Tag, Page action | ||
| Description | Create JavaScript character insert boxes. | ||
| Author(s) | Brion Vibber | ||
| License | GPL | ||
| Download | Download snapshot Subversion [Help] |
||
|
|||
|
check usage (experimental) |
|||
CharInsert is an extension that creates JavaScript links that when clicked, insert predefined text into the text box.
These links are usually used in MediaWiki:Edittools system message (for an example, see Wikipedia:MediaWiki:Edittools).
Contents |
[edit] Syntax
Use <charinsert> tags with a space-separated list of characters or tags for which you wish to allow insertion.
You can use + sign inside a tag to define a place to:
- insert selected text or
- place cursor if no text was selected.
You have to enclose templates and spaces inside <nowiki>:
<charinsert><nowiki>== + ==</nowiki> <nowiki>{{stub}}</nowiki></charinsert>
[edit] Usage and sample output
<charinsert>Á á Ć ć É é Í í Ĺ ĺ Ń ń Ó ó Ŕ ŕ Ś ś Ú ú Ý ý Ź ź</charinsert>
→
Á á Ć ć É é Í í Ĺ ĺ Ń ń Ó ó Ŕ ŕ Ś ś Ú ú Ý ý Ź ź
Note: Clicking the links will have no effect since there is no text box.
[edit] Notes
- Generated JavaScript links also work in other areas around edit window, e.g. in MediaWiki:Copyrightwarning or MediaWiki:Newarticletext, on the page preloaded with Inputbox, and even from the text preview.
- They can also be used in MediaWiki:Uploadtext to insert image description templates.
- Generated JavaScript links use
insertTags()from wikibits.js. - Unlike toolbar buttons on top, this extension doesn't provide a way to specify inserted "sample text".
[edit] Installation
- Download the latest snapshot and extract it to your extensions directory.
- Put the following line near the end of your LocalSettings.php file:
require_once("$IP/extensions/CharInsert/CharInsert.php");
|
|
This extension is being used on one or more of Wikimedia's wikis. It means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki is produced by Special:Version on that wiki. |
| Language: | English • Deutsch • 日本語 • Русский |
|---|