mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-25 09:30:28 +00:00
Add a serialisation for preloading a tiddler
This commit is contained in:
parent
36e8040773
commit
d4b2ab4a5f
@ -167,4 +167,10 @@ exports["application/x-tiddler-encrypted-div"] = function(tiddlers) {
|
||||
return "<div data-tw-encrypted-tiddlers='yes'><pre>" + $tw.utils.htmlEncode($tw.crypto.encrypt(JSON.stringify(jsonTiddlers))) + "</pre></div>";
|
||||
};
|
||||
|
||||
exports["application/x-tiddler-javascript"] = function(tiddlers) {
|
||||
return mapEachTiddler(this,tiddlers,function(tiddler) {
|
||||
return "$tw.preloadTiddler(" + JSON.stringify(tiddler.fields) + ");\n"
|
||||
});
|
||||
};
|
||||
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user