Tiddlywiki functionality from within javascript macro

73 views
Skip to first unread message

Louis Davout

unread,
Aug 12, 2021, 5:46:38 AM8/12/21
to TiddlyWiki
Is Tiddlywiki functionality, such as running filters, available from within a javascript macro? I've found the code for $tw.utils and how you can get access to a tiddler object via this.wiki.getTiddler(title). But I haven't come across anything for using filters. Thanks.

Louis Davout

unread,
Aug 12, 2021, 5:56:25 AM8/12/21
to TiddlyWiki
Never mind, I found it. this.wiki.filterTiddlers(filter)

BurningTreeC

unread,
Aug 12, 2021, 5:57:52 AM8/12/21
to TiddlyWiki
Hello, if I recall correctly you can filter tiddlers by $tw.wiki.filterTiddlers(<<your-filter-here>>);

As an example:

$tw.wiki.filterTiddlers("[list[$:/StoryList]tag[myTag]]");

best wishes, BTC

Jeremy Ruston

unread,
Aug 12, 2021, 10:52:35 AM8/12/21
to tiddl...@googlegroups.com
Hi Louis,

I'm glad you found the answer. Just to say that GitHub Discussions can be more suited for developer/JS discussions because it has better support for code blocks and linking to code etc


Best wishes

Jeremy.


On 12 Aug 2021, at 10:46, Louis Davout <davou...@gmail.com> wrote:

Is Tiddlywiki functionality, such as running filters, available from within a javascript macro? I've found the code for $tw.utils and how you can get access to a tiddler object via this.wiki.getTiddler(title). But I haven't come across anything for using filters. Thanks.

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/6c55e3b8-2648-4abf-b210-f7de7ed00c93n%40googlegroups.com.

Louis Davout

unread,
Aug 12, 2021, 1:29:41 PM8/12/21
to TiddlyWiki
Thanks Jeremy. I didn't know that existed.
Reply all
Reply to author
Forward
0 new messages