Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
$#!
 $
A
 addStyle
C
 clone
 close, History
 createExternalLink, Wikifier
 createInternalLink, Wikifier
D
 display, History
E
 easeInOut, Math
 Effects
F
 fade
 fullArgs, Wikifier
 Functions
G
 General-purpose functions
 get, Tale
H
 has, Tale
 History
I
 id, Passage
 init, History
 initialText, Passage
 insertElement
 insertText
L
 lookup, Tale
M
 main
P
 Passage
 passages, Tale
 Properties
R
 readBracketedList, String
 readMacroParams, String
 removeChildren
 render, Passage
 reset
 restart, History
 restore, History
 rewindTo, History
S
 save, History
 scrollWindowTo
 setPageElement
T
 tags, Passage
 Tale
 text, Passage
 throwError
 title, Passage
 trim, String
U
 unescapeLineBreaks, Passage
W
 Wikifier
function $ (id)
Returns the DOM element with the id passed.
function addStyle (source)
Adds CSS styles to the document.
function clone (original)
Performs a shallow copy of an object.
History.prototype.close = function (passage)
This removes a passage from display onscreen.
Wikifier.createExternalLink = function (place,
url)
Creates a link to an external URL.
Wikifier.createInternalLink = function (place,
title)
Creates a link to a passage.
History.prototype.display = function (title,
link,
render)
Displays a passage on the page.
Math.easeInOut = function (i)
Eases a decimal number from 0 to 1.
function fade (el,
options)
Fades a DOM element in or out.
Wikifier.prototype.fullArgs = function()
Meant to be called by macros, this returns the text passed to the currently executing macro.
Tale.prototype.get = function (key)
A getter function that returns a certain Passage object belonging to the tale.
Tale.prototype.has = function (key)
Checks whether the tale has a passage with either the title passed (if the key parameter is a string) or an id (if a number is passed instead).
A class used to manage the state of the story -- displaying new passages and rewinding to the past.
An array representing the state of the story.
An internal id of the passage.
History.prototype.init = function()
This first attempts to restore the state of the story via the restore method.
The initial text of the passage.
function insertElement (place,
type,
id,
className,
text)
A shortcut function for creating a DOM element.
function insertText (place,
text)
Places text in a DOM element.
Tale.prototype.lookup = function(field,
value,
sortField)
Searches the Tale for all passages matching a certain criteria.
function main()
Loads the story from the storage div, initializes macros and custom stylesheets, and displays the first passages of the story.
This class represents an individual passage.
function Passage (title,
el,
order)
Initializes a new Passage object.
An associative array of Passage objects in the story.
Parses a list of bracketed links -- e.g.
Parses a list of macro parameters.
function removeChildren (el)
Removes all child elements from a DOM element.
Passage.prototype.render = function()
Renders the passage to a DOM element, including its title, toolbar, and content.
Passage.prototype.reset = function()
Resets the passage’s text property to its initialText property.
Tale.prototype.reset = function()
Calls the Passage.reset method on all Passages in the tale, restoring the story to its initial state.
History.prototype.restart = function()
Restarts the story from the beginning.
History.prototype.restore = function ()
Attempts to restore the state of the story as saved by save.
History.prototype.rewindTo = function (passage)
Rewinds the state of the story to a particular Passage.
History.prototype.save = function (passage)
Returns a hash to append to the page’s URL that will be later read by the restore method.
function scrollWindowTo (el)
This scrolls the browser window to ensure that a DOM element is in view.
function setPageElement (id,
title,
defaultText)
Wikifies a passage into a DOM element.
An array of strings, each corresponding to a tag the passage belongs to.
Used to provide access to passages.
function Tale()
Initializes a new Tale object with the contents of the DOM element with the id storeArea, constructing new Passages as it traverses the tree.
The current text of the passage.
function throwError (place,
message)
Displays an error message on the page.
The title of the passage, displayed at its top.
Removes whitespace from the beginning and end of a string.
Passage.unescapeLineBreaks = function (text)
A static function used by the constructor to convert string literals used by TiddlyWiki to indicate newlines into actual newlines.
Used to display text on the page.
function Wikifier(place,
source)
Wikifies source text into a DOM element.