Help on Wiki-JS editor

You are currently using the wiki-js editor, a very lightweight javascript system to allow text to be written using the wiki style (based on JSPWiki format).

There are some major advantages to wiki-js;

  1. Firstly it does not change anything as far as the database or Roller is concerned. It changes your text to HTML before your eyes, so as far as the server is concerned, you wrote HTML. This also means you don't have to worry about older entries that are in HTML and conditional rendering.
  2. It still allows HTML. This is in no way an attempt to stop you using HTML, just a shorthand.
  3. You can edit the HTML it creates. Wiki-js appears to be good at not abusing existing HTML.
  4. It works with the CSS. Various tags are the same level as 'p' tags, and as Roller puts your entry in a 'p' tag they break the CSS. Wiki-js closes the 'p' and re-opens it after these tags.
  5. Lastly, it is easy to code and develop. No compiling, no deploying, no submitting even; though preview can help sometimes.

The biggest negative is that it's not a Wiki system. Just a wiki-style markup shorthand.

Here's a concise explanation of the markup:

Bold__foo__ is foo; ie) bold, though it uses the strong tag.
Italic''foo'' is foo; ie) italic, though it uses the em tag.
Underlined==foo== is foo; ie) underlined.
Strike-through--foo-- is foo; ie) striked-through.
Source block{{{foo}}} is for source code, using the pre tag; ie)
foo
Source inline{{foo}} is foo; ie) source code, using the tt tag.
Newlines2 or more newlines become 2 or more br tags this means that your newlines (return/enter) should be maintained, but only when you really mean it.
Headings! is h1, !! is h2, .., !!!!! is h5everything else on that line becomes the heading.
Lists* for ul and # for ol** is a nested ul etc. Must be at the start of a line.
Forced breaks\ on end of line forces extra newlineShould rarely be needed.
Line separators4+ '-' charactershr tag.
Tables|text|more text| Makes a table. Double bars for a table heading.
Anchors[http://www.rollerweblogger.org/|Roller]Roller
Images[img://www.google.com/images/logo.gif|Google Logo]
Anchor'd Images[http://www.google.com/|[img://www.google.com/images/logo.gif|Goto Google]]
CSS friendlylists, pre, p and h* all at the same levelwiki-js inserts p's which helps with CSS oddities a lot.

If you want to look at the code, hit view-source on the blog entry page and find the handleTable, handleList and convertTextArea javascript functions.

Some todo's

  1. <!-- wiki-js-off --> at the top of the page that turns off parsing. Will be useful if it's being irritating.
  2. JSPWiki-clone: ;term:def Defines 'term' with 'def'. Use this with empty 'term' to make short comments. This is a dl/dt/dd list.
  3. JSPWiki-clone: {{ should remove any newlines between the tt tags.
  4. Headings to include named anchor so you can link directly to them. Needs to know name of blog though, so that might be a bit of a hack
  5. Allow http://www.foo.com|Blah for ones that don't need a space in the title. Same for images.