diff --git a/js/Tiddler.js b/js/Tiddler.js index b2d20e115..6e26346ed 100755 --- a/js/Tiddler.js +++ b/js/Tiddler.js @@ -51,7 +51,8 @@ var Tiddler = function(/* tiddler,fields */) { } // Expose the tags as a getter Object.defineProperty(this,"tags",{get: function() {return tags ? tags.slice(0) : [];}}); - // Other methods that need access to the fields + + // Get a copy of the fields hashmap this.getFields = function() { var r = {}; for(var f in fields) { @@ -62,6 +63,53 @@ var Tiddler = function(/* tiddler,fields */) { } return r; }; + // Return a field as a string + this.getFieldString = function(field) { + var result, t; + if(field === "tags") { + if(tags) { + result = []; + for(t=0; t