Honestly, I haven’t completely decided yet. There are a variety of options. I’m sure I’ll figure it out. I’ve found what I needed to know. It seems my question has found all the widget docs I was struggling to find before
Hmm, while I have learned a lot from this thread, looking back, I don’t think the question posed in the title was ever answered.
I think this is because its an easy question to ask, a hard one to answer and there are better questions to ask. This is not something you did wrong, just the circumstances.
It is a common suggestion of mine to encorage questions that say what you want without any hint of how you expect it to be achived. The advantage being the community is free to answer from many perspectives. The more specific a question the less people will likely have answers.
Another way is to say
I would like to do x y z
- I thought “Exporting tiddlers to JS and a b c” would be the way to go
Just trying to help
I assuming you either mean exporting tiddlers to JSON, or accessing tiddlers from JavaScript. I am not sure what exporting tiddlers to JavaScript would look like, it isn’t a content format.
For accessing tiddlers from JavaScript, you would presumably write an action-widget that will be triggered using a button widget. In the invokeAction() method of your action widget, you would access tiddlers as follows:
this.wiki.getTiddler("tiddler-title");
It may be more convenient to have your action widget accept a filter attribute where the filter specifies which tiddlers you want to work with, in which case you would then get a list of those tiddlers as follows:
this.wiki.filterTiddlers("filter-string-here",this);
Looking at an existing action widget in the core and modifying it might be the easiest way to get started.
If you have further questions that involve the usage of JavaScript in TiddlyWiki, please post in the Developer category in this forum.
Ahh Thanks a lot