From 6085b1171aa0100ce664c4927c556e9af19a57e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodr=C3=ADguez=20Rivero?= Date: Wed, 28 Jun 2017 19:04:52 +0200 Subject: [PATCH] Update dev docs for saver modules (#2919) * Update Saver.tid Stupid typo corrected * Update Saver.tid Fix callback documentation in case of successful save. --- editions/dev/tiddlers/from Heigele and Jurke/Saver.tid | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editions/dev/tiddlers/from Heigele and Jurke/Saver.tid b/editions/dev/tiddlers/from Heigele and Jurke/Saver.tid index 7c59c1751..a34ae084b 100644 --- a/editions/dev/tiddlers/from Heigele and Jurke/Saver.tid +++ b/editions/dev/tiddlers/from Heigele and Jurke/Saver.tid @@ -13,8 +13,8 @@ Modules with ``module-type: saver`` provide functionality to save the whole wiki
download
This message is used when the wiki or a single tiddler should explicitly be downloaded. The control panel for example uses this method to provide a button which saves the wiki as a static HTML file.
-A saver module has to export two functions. ``canSave(wiki)`` returning true if this module is capable of working and ``create(wiki}`` returning an instance of a saver object. -This saver object has to provide an ``info`` property containing a name, a priority, an array of methods it supports and a method ``save(text,method,callback)``. This method is called from TW with the actual text which should be saved, the method which is used and a callback function to report errors: ``callback("Error while saving")`` or to notify that saving went well: ``callback("Saving went well :)")``. If the saver method successfully saved the file it has to return true, or false otherwise. +A saver module has to export two functions. ``canSave(wiki)`` returning true if this module is capable of working and ``create(wiki)`` returning an instance of a saver object. +This saver object has to provide an ``info`` property containing a name, a priority, an array of methods it supports and a method ``save(text,method,callback)``. This method is called from TW with the actual text which should be saved, the method which is used and a callback function to report errors: ``callback("Error while saving")`` or to notify that saving went well: ``callback(null, "Saving went well :)")``. If the saver method successfully saved the file it has to return true, or false otherwise. Saves are triggered by messages from the UI. The syncer module uses the saver with the highest priority capable of the requested method to save the file. -The core plug-in contains a saver capable of saving the current state of the wiki to the local hard drive by using a special Firefox extension called Tiddlyfox. If this extension is not available, the savers ``canSave`` method would return false. A saver with a lower priority would then ask the user to save the current state as a new HTML file. \ No newline at end of file +The core plug-in contains a saver capable of saving the current state of the wiki to the local hard drive by using a special Firefox extension called Tiddlyfox. If this extension is not available, the savers ``canSave`` method would return false. A saver with a lower priority would then ask the user to save the current state as a new HTML file.