1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-23 03:37:39 +00:00

Add support for filtered attributes to HTML elements and widgets

Fixes #2624
This commit is contained in:
Jermolene
2016-10-21 11:27:07 +01:00
parent c72a0b7a67
commit 7108e0d861
5 changed files with 99 additions and 35 deletions

View File

@@ -222,7 +222,9 @@ Widget.prototype.computeAttributes = function() {
self = this,
value;
$tw.utils.each(this.parseTreeNode.attributes,function(attribute,name) {
if(attribute.type === "indirect") {
if(attribute.type === "filtered") {
value = self.wiki.filterTiddlers(attribute.filter,self)[0] || "";
} else if(attribute.type === "indirect") {
value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler"));
} else if(attribute.type === "macro") {
value = self.getVariable(attribute.value.name,{params: attribute.value.params});