Hi PMario,
Sorry for the confusion but I confused myself. I haven't quite recovered from an overly fun weekend... The way I want to use this is for creating a history tab, and not related to saving at all! FrD did have the correct answer I was looking for. Minimum working example for posterity:
Don't forget to reload the page or restart the node.js server for this to take effect.
(is there any way to mark a post as solved?)
filename=test.js:
/*\ title: test.js
type: application/javascript
module-type: macro <<test>> \*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports.name = "test";
exports.params = [];
/* Run the macro */
exports.run = function() {
return this.getVariable("currentTiddler");
};
})();