1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-20 00:34:50 +00:00
TiddlyWiki5/editions/dev/tiddlers/new/Hook__th-importing-tiddler.tid
2017-02-09 15:42:55 +00:00

24 lines
695 B
Plaintext

created: 20170209130829546
modified: 20170209145518777
tags: HookMechanism
title: Hook: th-importing-tiddler
type: text/vnd.tiddlywiki
This hook allows plugins to inspect or modify tiddlers before they are imported via the import mechanism.
Hook function parameters:
* ''tiddler'': tiddler object about to be imported
Return value:
* tiddler object to be imported
The original tiddler object can be returned unmodified by the hook. If the hook needs to modify the tiddler then it should return a new tiddler object, for example:
```
return new $tw.Tiddler(tiddler,{"my-field": value});
```
Hooks must not change the ''title'' field but can freely modify any other field of the tiddler.