mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-02-23 08:30:48 -08:00
Add ability to read JSON files containing an array of tiddlers
This commit is contained in:
parent
416ab0c060
commit
a0843f9c51
1 changed files with 6 additions and 0 deletions
|
|
@ -580,6 +580,12 @@ $tw.modules.registerModuleExports("$:/boot/tiddlerdeserializer/html","tiddlerdes
|
|||
return [fields];
|
||||
}
|
||||
});
|
||||
$tw.modules.registerModuleExports("$:/boot/tiddlerdeserializer/json","tiddlerdeserializer",{
|
||||
"application/json": function(text,fields) {
|
||||
var tiddlers = JSON.parse(text);
|
||||
return tiddlers;
|
||||
}
|
||||
});
|
||||
|
||||
// Install the tiddler deserializer modules so they are immediately available
|
||||
$tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue