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:
@@ -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
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user