Basic serializers

print-window-tiddler
Jeremy Ruston 2012-05-05 13:15:31 +01:00
rodzic 079e0e2d1e
commit 09d7a7fd72
1 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,24 @@
/*\
title: $:/core/modules/serializers.js
type: application/javascript
module-type: tiddlerserializer
Plugins to serialise tiddlers to a block of text
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
exports["text/plain"] = function(tiddler) {
return tiddler ? tiddler.fields.text : "";
};
exports["text/html"] = function(tiddler) {
var text = this.renderTiddler("text/html",tiddler.fields.title);
return text ? text : "";
};
})();