Defining a tiddler macro coupled to a custom .js function

172 views
Skip to first unread message

iani

unread,
Oct 15, 2015, 11:08:09 AM10/15/15
to TiddlyWiki

Hello, 

I am trying to customize a single tiddlywiki running on Node.js server version, so that clicking a link in the wiki text in a tiddler will call a special macro that triggers a custom js function.  I have already succeeded in running my own custom macros/functions in the wiki. But: the custom functions are now included in the global tiddlywiki source directory, under 

/usr/local/lib/node_modules/tiddlywiki/core/modules/widgets


 To be exact, I am using my own modified functions called: 

action-navigate2.js  (which is a modified version of action-navigate.js)

and 

action-socketsend.js  (which is my own original function from scratch)

The question is: Is there a way to place those two functions, action-navigate2.js and action-socketsend.js in a folder that is local only to the tiddlywiki in question rather than be placed inside the global tiddliwiki installation?

Cheers, 

Iannis Zannos

Tobias Beer

unread,
Oct 15, 2015, 4:34:55 PM10/15/15
to tiddl...@googlegroups.com
Hi Iannis,
 
The question is: Is there a way to place those two functions, action-navigate2.js and action-socketsend.js in a folder that is local only to the tiddlywiki in question rather than be placed inside the global tiddliwiki installation?

Have you actually tried to put it (anywhere) within your wiki folder?
Because that should basically work.

Otherwise, what is your precise folder structure / how and where do you run --server / --build?

Best wishes,

— tb

PMario

unread,
Oct 16, 2015, 5:32:32 AM10/16/15
to TiddlyWiki
Hi Iannis,
Just to let you know.

Double posting in the Dev group and here at the same time isn't very nice. This post is clearly dev related. So if you didn't get any response for eg: 2 days in the dev group, you may jump to this group, because there is much more attention.

As Tobias wrote your directory structure and the server command would be of interest for us.

This may be of interest to you: http://tiddlywiki.com/#TiddlyWikiFolders:TiddlyWikiFolders%20InitCommand

-mario

iani

unread,
Oct 21, 2015, 6:49:03 AM10/21/15
to TiddlyWiki
Hi Mario, 

Apologies. Stand corrected. 

I replied to the dev forum giving the description of the folder structure  - to take the thread off the users forum. 

Iannis Zannos
Reply all
Reply to author
Forward
0 new messages