mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-26 17:06:51 +00:00
Modified fieldmangler to create a tiddler if adding a tag to one that doesn't exist
This came up as an issue and I don't have any reason it shouldn't be here. It could be useful.
This commit is contained in:
parent
5faba15446
commit
4c95dc9bbb
@ -135,6 +135,10 @@ FieldManglerWidget.prototype.handleAddTagEvent = function(event) {
|
|||||||
$tw.utils.pushTop(modification.tags,tag);
|
$tw.utils.pushTop(modification.tags,tag);
|
||||||
this.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));
|
this.wiki.addTiddler(new $tw.Tiddler(tiddler,modification));
|
||||||
}
|
}
|
||||||
|
} else if(typeof event.param === "string" && event.param.trim() !== "" && this.mangleTitle.trim() !== "") {
|
||||||
|
var tag = [];
|
||||||
|
tag.push(event.param.trim());
|
||||||
|
this.wiki.addTiddler({title: this.mangleTitle, tags: tag});
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user