1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-08 11:32:59 +00:00

Extend button widget to set text references

Previously the `set` attribute could only be used to identify a
tiddler, not a full text reference.
This commit is contained in:
Jermolene
2014-03-15 17:02:13 +00:00
parent afa677b9a0
commit f649b5b037
2 changed files with 4 additions and 5 deletions

View File

@@ -118,8 +118,7 @@ ButtonWidget.prototype.triggerPopup = function(event) {
};
ButtonWidget.prototype.setTiddler = function() {
var tiddler = this.wiki.getTiddler(this.set);
this.wiki.addTiddler(new $tw.Tiddler(tiddler,{title: this.set, text: this.setTo}));
this.wiki.setTextReference(this.set,this.setTo,this.getVariable("currentTiddler"));
};
/*