mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Added ability to read shadow tiddlers
This commit is contained in:
parent
a896ac0d56
commit
f5665b47f3
@ -14,11 +14,17 @@ TiddlyWiki.prototype.clear = function() {
|
||||
|
||||
TiddlyWiki.prototype.getTiddler = function(title) {
|
||||
var t = this.tiddlers[title];
|
||||
return t instanceof Tiddler ? t : null;
|
||||
if(t instanceof Tiddler) {
|
||||
return t;
|
||||
} else if(this.shadows) {
|
||||
return this.shadows.getTiddler(title);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
TiddlyWiki.prototype.getTiddlerText = function(title) {
|
||||
var t = this.tiddlers[title];
|
||||
var t = this.getTiddler(title);
|
||||
return t instanceof Tiddler ? t.fields.text : null;
|
||||
};
|
||||
|
||||
@ -26,7 +32,7 @@ TiddlyWiki.prototype.deleteTiddler = function(title) {
|
||||
delete this.tiddlers[title];
|
||||
};
|
||||
|
||||
TiddlyWiki.prototype.isTiddler = function(title) {
|
||||
TiddlyWiki.prototype.tiddlerExists = function(title) {
|
||||
return this.tiddlers[title] instanceof Tiddler;
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,22 @@
|
||||
/*
|
||||
|
||||
Wikifier for TiddlyWiki format text
|
||||
|
||||
The wikifier parses wikitext into an intermediate tree from which the HTML is generated. The tree
|
||||
looks like this:
|
||||
|
||||
this.tree = [
|
||||
{type: "div", attributes: {
|
||||
attr1: value,
|
||||
attr2: value
|
||||
}, children: [
|
||||
{child},
|
||||
{child},
|
||||
]}
|
||||
];
|
||||
|
||||
*/
|
||||
|
||||
/*global require: false, exports: false, process: false */
|
||||
"use strict";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user