Passage |
PassageThis class represents an individual passage. This is analogous to the Tiddler class in the core TiddlyWiki code. Summary
idAn internal id of the passage. This is never seen by the reader, but it is used by the History class. textThe current text of the passage. This is usually the same as the initialText property, though macros such as <<choice>> may alter it. Passage
Initializes a new Passage object. You may either call this with a DOM element, which creates the passage from the text stored in the element, or you may pass only a title, Parameters
reset
Resets the passage’s text property to its initialText property. This does not directly affect anything displayed on the page. Parametersnone Returnsnothing |
Initializes a new Passage object.
function Passage ( title, el, order )
Renders the passage to a DOM element, including its title, toolbar, and content.
Passage.prototype.render = function()
Resets the passage’s text property to its initialText property.
Passage.prototype.reset = function()
A static function used by the constructor to convert string literals used by TiddlyWiki to indicate newlines into actual newlines.
Passage.unescapeLineBreaks = function ( text )