1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-31 23:53:00 +00:00

Allow templating with the link widget

And add some documentation
This commit is contained in:
Jeremy Ruston
2013-03-04 11:13:10 +00:00
parent 79bb082b92
commit fc79db53ab
3 changed files with 60 additions and 17 deletions

View File

@@ -269,6 +269,20 @@ ElementRenderer.prototype.getContextScopeId = function() {
return guidBits.join("");
};
/*
Find a named macro definition
*/
ElementRenderer.prototype.findMacroDefinition = function(name) {
var context = this.renderContext;
while(context) {
if(context.macroDefinitions && context.macroDefinitions[name]) {
return context.macroDefinitions[name];
}
context = context.parentContext;
}
return undefined;
};
exports.element = ElementRenderer
})();