! A JavaScript Wiki Formatter % This page demonstrates the features of the jsWiki script, a very silly piece of software. This page demonstrates the features of the jsWiki script. For the record, there are very few situations where it makes any sense whatsoever to process Wiki to HTML in the browser. For my personal site, I want to edit simple text files in Vim and send to the server via git or rsync: jsWiki is simple and elgant in this case. Also good for freaking out one's programmer colleagues: > That is SO wrong, man. .info To see the wiki text, View Source, or click 'Source' in the footer. ^ /js/jsWiki.js + Inline Markup **Bold** and _italic_ are {{**bold**}} and {{_italic_}}. 'Single' and "double" quotes are automatic. An apostrophe's entered like this. Sets of {`{double parentheses}`} were used in the last paragraph to prevent wiki formatting. A backtick can be used to interrupt this markup if you need to display it onscreen. This is how you add ^[a link] or ^[a context note]. Common symbols and typography are supported; use HTML entities (e.g. nbsp) for anything else; ligatures are only activated via CSS. .center {{p.22-23 dash -- dash --- dash ... --> <-- 1(1/4), 2(1/2), 3(3/4) (C) (TM)}} .center p.22-23 dash -- dash --- dash ... --> <-- 1(1/4), 2(1/2), 3(3/4) (C) (TM) ^ http://example.org ^ This explains the note! The only difference between a link and a note is that a link starts with '/' (a file) or a protocol like 'http:'. + Block Markup Paragraphs are separated by blank lines. Special paragraphs ('blocks') can be identified by a "block marker" character followed by a space at the start of a line. .center ! + - % &gt; = * # @ | ~ {{"}} > Block quotations are indicated as in email with a '>'. You can paste from > email; extra '>' characters at the start of each line will be ignored. = Citation following a quotation. * Bullet Points * Bullet Points ~ Caird, G. B. [1956] _This line is a bibliographical source_. Oxford: Clarendon. (Tilde denotes a line with a hanging indent, so I'll make this a really long line to illustrate the effect. This typically works better for definition lists than DL tags, so it solves two problems.) " Comment (This line will not be shown.) @ Marker @ Purpose | ! , + , - | Page Title, Heading, Sub-Heading | % | Page Description (visible in source but not HTML) | > , = | Blockquote, Citation Line | * , # | Bullet List, Numbered List | {{| , @}} | Table Cells, Table Headers | ~ | Hanging Indent (definition, bibliography) | {{"}} | Comment (visible in source but not HTML) + Section Markup Section markup identifies a multi-line block which may contain blank lines. .center TEXT QUOTE VERSE COMPACT TEXT --- {{VERSE --- Átaremma i ëa han ëa · na aire esselya · aranielya na tuluva · na care indómelya cemende tambe Erumand ámen anta síra ilaurëa massamma · ar ámen apsene úcaremmar sív emme apsenet tien i úcarer emmen. Álame tulya úsahtienna mal áme etelehta ulcullo: násie ---}} --- VERSE --- Átaremma i ëa han ëa · na aire esselya · aranielya na tuluva · na care indómelya cemende tambe Erumand ámen anta síra ilaurëa massamma · ar ámen apsene úcaremmar sív emme apsenet tien i úcarer emmen. Álame tulya úsahtienna mal áme etelehta ulcullo: násie --- = J.R.R. Tolkien - Example of compact text COMPACT --- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. --- + Character Blocks Character blocks are identified by only the first character of a paragraph: .center &lt; &amp; . $
jsWiki trusts input text, so HTML tags are preserved verbatim. If you start a paragraph with an HTML tag or HTML entity (or ‘&’ for any other reason), that paragraph will not be altered other than to process {`{no-wiki}`} markers. Use HTML for complex tables and similar advanced layout. Philosophically, jsWiki is about convenient shorthand, not about replacing a complex HTML layout with an equally complex and arbitrary wiki layout.
.info This is an example of a CSS style applied to a paragraph. $figure robert-van-johnson.jpg Image with thumbnail and caption, shown with the $figure command. Other formatting functions include: TEXT --- $youtube 387364hjhgfh --- + Emoticons Use {{:emoticon}} anywhere (mouse-over for codes): | :angry | :approve | :book | :broken | :cake | :cocktail | :coffee | :cool | :cross | :cry | :disapprove | :edit | :email | :embarrassed | :error | :gift | :grin | :idea | :love | :magnify | :meh | :minus1 | :new | :next | :ninja | :pirate | :plus1 | :q | :rss | :sad | :sleep | :smile | :smirk | :sound | :ssh | :star | :stop | :storm | :sun | :tag | :tick | :uncertain | :warning | :wink | :worried Or ;emoticon at the start of a paragraph for a highlighted notice: ;ninja Like this! + To Do List # Nested lists. # Show HTML in TEXT sections. # Refine line wrapping in blocks; should not require > 80 char lines. # Should figures support SVG? -- check browser consistency.

Κρήνη εὐκρὰς πρὸς χειμῶνα καὶ θέρος.
A stream of good temperature, summer and winter.

©2012–13 Nigel Chapman, Blue Mountains stream photograph ©2010 Mario Herrmann (used by permission). Time to render page: 1.253 ms.