http://trac.tiddlywiki.org/changeset/9539
FND
2009-04-21 10:02:44 +0000 (Tue, 21 Apr 2009)
193
documentation: added descriptions for TiddlyWiki's saveTiddler and
getTiddlerText methods
This should render tautological parameter listing obsolete.
The markup used is not necessarily final.
---------------
U Trunk/core/js/TiddlyWiki.js
---------------
Modified: Trunk/core/js/TiddlyWiki.js
===================================================================
--- Trunk/core/js/TiddlyWiki.js 2009-04-20 14:27:17 UTC (rev 9538)
+++ Trunk/core/js/TiddlyWiki.js 2009-04-21 10:02:44 UTC (rev 9539)
@@ -84,6 +84,9 @@
return "";
};
+// Retrieve tiddler contents
+//# Supports tiddler slices or sections, encoded in {{{title}}} argument using
+//# the respective separator characters ({{{::}}} or {{{##}}}).
TiddlyWiki.prototype.getTiddlerText = function(title,defaultText)
{
if(!title)
@@ -303,20 +306,16 @@
this.setDirty(true);
};
-// Save tiddler to store
+// Store tiddler in TiddlyWiki instance
+//# Existing tiddlers can be renamed using the {{{newTitle}}} argument.
//#
-//# N.B.: Does not trigger [[autoSaveChanges]].
+//# {{{created}}} and {{{modified}}} arguments are Date objects,
+//# {{{tags}}} argument is an array of strings.
//#
-//# @param {String} title existing tiddler's title
-//# @param {String} newTitle target tiddler's title
-//# @param {String} newBody tiddler contents
-//# @param {String} modifier username
-//# @param {Date} modified last-change date
-//# @param {Array} tags list of tags
-//# @param {Object} fields extended fields
-//# should use existing tiddler's fields or fall back to
config.defaultCustomFields
-//# @param {Boolean} clearChangeCount reset tiddler's changecount
-//# @param {Date} created date of initial creation
+//# {{{fields}}} should retain existing tiddler's extended fields and use
+//# {{{config.defaultCustomFields}}} as fallback.
+//#
+//# N.B.: Does not trigger [[autoSaveChanges]].
TiddlyWiki.prototype.saveTiddler =
function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created)
{
var tiddler = this.fetchTiddler(title);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---