mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Merge branch 'tiddlywiki-com'
This commit is contained in:
commit
625c3de6f7
@ -1,17 +1,30 @@
|
||||
created: 20141122200310516
|
||||
modified: 20170209130807520
|
||||
modified: 20201213161842776
|
||||
title: HookMechanism
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
The hook mechanism provides a way for plugins to intercept and modify default functionality. Hooks are added as follows:
|
||||
|
||||
```js
|
||||
/*
|
||||
name: name of hook function (by convention prefixed with `th-`)
|
||||
handler: function to be called when hook is invoked
|
||||
*/
|
||||
$tw.hooks.addHook(name,handler);
|
||||
```
|
||||
|
||||
The handler function will be called with parameters that depend on the specific hook in question, but they always follow the pattern `handler(value,params...)`
|
||||
|
||||
* ''value'': an optional value that is to be transformed by the hook function
|
||||
* ''params'': one or more optional parameters that are passed to the hook function
|
||||
|
||||
If required by the hook in question, the handler function must return the modified ''value''.
|
||||
|
||||
Multiple handlers can be assigned to the same name using repeated calls. When a hook is invoked by name all registered functions will be called sequentially in their order of addition.
|
||||
|
||||
Though not essential care should be taken to ensure that hooks are added before they are invoked. For example: [[Hook: tc-opening-default-tiddlers-list]] should ideally be added before the story startup module is invoked otherwise any hook specified additions to the default tiddlers will not be seen on the initial loading of the page, though will be visible if the user clicks the home button.
|
||||
Note that the ''value'' passed to the subsequent hook function will be the return value of the previous hook function.
|
||||
|
||||
Though not essential care should be taken to ensure that hooks are added before they are invoked. For example: [[Hook: th-opening-default-tiddlers-list]] should ideally be added before the story startup module is invoked otherwise any hook specified additions to the default tiddlers will not be seen on the initial loading of the page, though will be visible if the user clicks the home button.
|
||||
|
||||
!! Example
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20150412191004348
|
||||
modified: 20160710150754023
|
||||
modified: 20201222114745463
|
||||
tags: Community Reference
|
||||
title: Developers
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -7,5 +7,10 @@ type: text/vnd.tiddlywiki
|
||||
There are several resources for developers to learn more about TiddlyWiki and to discuss and contribute to its development.
|
||||
|
||||
* [[tiddlywiki.com/dev|https://tiddlywiki.com/dev]] is the official developer documentation
|
||||
* [[TiddlyWikiDev group|https://groups.google.com/group/TiddlyWikiDev]] for discussions about TiddlyWiki development
|
||||
* https://github.com/Jermolene/TiddlyWiki5 for the source code and development activity
|
||||
* Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]]
|
||||
** [[Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] are for Q&A and open-ended discussion
|
||||
** [[Issues|https://github.com/Jermolene/TiddlyWiki5/issues]] are for raising bug reports and proposing specific, actionable new ideas
|
||||
* The older ~TiddlyWikiDev Google Group is now closed in favour of [[GitHub Discussions|https://github.com/Jermolene/TiddlyWiki5/discussions]] but remains a useful archive: https://groups.google.com/group/TiddlyWikiDev
|
||||
** An enhanced group search facility is available on [[mail-archive.com|https://www.mail-archive.com/tiddlywikidev@googlegroups.com/]]
|
||||
* Follow [[@TiddlyWiki on Twitter|http://twitter.com/#!/TiddlyWiki]] for the latest news
|
||||
* Chat at https://gitter.im/TiddlyWiki/public (development room coming soon)
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20140721121924384
|
||||
modified: 20161229091129395
|
||||
modified: 20201222114755959
|
||||
tags: Community
|
||||
title: Forums
|
||||
type: text/vnd.tiddlywiki
|
||||
@ -19,12 +19,7 @@ The ~TiddlyWiki discussion groups are mailing lists for talking about ~TiddlyWik
|
||||
|
||||
! Developers
|
||||
|
||||
* The TiddlyWikiDev group for developers: https://groups.google.com/group/TiddlyWikiDev
|
||||
*> Note that you do not need a Google Account to join the discussion groups. Subscribe by sending an email to mailto:tiddlywikidev+subscribe@googlegroups.com.
|
||||
** An enhanced group search facility is available on [[mail-archive.com|https://www.mail-archive.com/tiddlywikidev@googlegroups.com/]]
|
||||
* Follow [[@TiddlyWiki on Twitter|http://twitter.com/#!/TiddlyWiki]] for the latest news
|
||||
* Get involved in the [[development on GitHub|https://github.com/Jermolene/TiddlyWiki5]]
|
||||
* Chat at https://gitter.im/TiddlyWiki/public (development room coming soon)
|
||||
{{Developers}}
|
||||
|
||||
New releases of TiddlyWiki, TiddlyDesktop and TiddlyFox are announced via the discussion groups and [[Twitter|https://twitter.com/TiddlyWiki]] (you can also subscribe to an Atom/RSS feed of [[TiddlyWiki releases from GitHub|https://github.com/jermolene/tiddlywiki5/releases.atom]])
|
||||
|
||||
|
@ -12,7 +12,7 @@ op-parameter-name: T
|
||||
op-output: a selection containing only <<.place T>>
|
||||
op-neg-output: the input, but with tiddler <<.place T>> filtered out if it exists in the wiki
|
||||
|
||||
`[title[An Example]]` can be shortened to `[[An Example]]`, because <<.op title>> is the default filter operator.
|
||||
`[title[An Example]]` can be shortened to `[[An Example]]`, because <<.op title>> is the default filter operator. Consequentially, `[!title[An Example]]` can be shortened to `[![An Example]]`.
|
||||
|
||||
<<.op title>> is a [[constructor|Selection Constructors]] (except in the form `!title`), but <<.olink2 "field:title" field>> is a [[modifier|Selection Constructors]].
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
created: 20150330155120127
|
||||
modified: 20201205104857625
|
||||
modified: 20191014091943444
|
||||
tags: [[Working with TiddlyWiki]]
|
||||
title: Performance
|
||||
type: text/vnd.tiddlywiki
|
||||
|
@ -416,6 +416,8 @@ Florian Kohrt, @fkohrt, 2020/09/10
|
||||
|
||||
Gerald Liu, @gera2ld, 2020/09/25
|
||||
|
||||
Stefano Stoduto, @OmbraDiFenice, 2020/10/03
|
||||
|
||||
Ryan Kramer, @default-kramer, 2020/10/24
|
||||
|
||||
Miha Lunar, @SmilyOrg, 2020/11/04
|
||||
|
Loading…
Reference in New Issue
Block a user