External link tooltips for dummies

409 views
Skip to first unread message

Antti E.

unread,
Mar 22, 2018, 3:48:01 AM3/22/18
to TiddlyWiki
Dear Community,

We are using TiddlyWiki as a HTA (HTML application) and HTAs have no status bar.

Thus the address of external links is not revealed until the user opens the link (pops-up in new browser window), or right-click > Properties, or right-click > Copy Shortcut.

How could I show the http address in tooltip (or some other way, all proposals welcome!) in external links such as [[Google Search|https://google.com]] ?

I found this widget but it is more complex than wikitext brackets, and seems to create internal links only:
<$link to="https://google.com" tooltip="https://google.com">Google Search</$link>


Thanks,

//antti

TonyM

unread,
Mar 22, 2018, 5:26:08 AM3/22/18
to TiddlyWiki
Antyi,

If you could build your links into button you could use its tooltip parameter.

Buttons can contain a list of actions or multiple action widgets, or action-message widgets that do many things. You can also use a different css class to make such buttons look like simple hyperlinks.

Can you share how you create Hta versions of tiddlywiki?

Regards
Tony

Antti E.

unread,
Mar 22, 2018, 5:41:57 AM3/22/18
to TiddlyWiki
Hmm... thanks, have to consider "buttonizing" the links.



//antti

Stephan Hradek

unread,
Mar 22, 2018, 8:33:22 AM3/22/18
to TiddlyWiki
Try this:

in `$:/core/modules/parsers/wikiparser/rules/prettyextlink.js`

after

node.attributes.href = {type: "string", value: URL};

add

node.attribute.title=  {type: "string", value: URL};


in `$:/core/modules/parsers/wikiparser/rules/prettylink.js`

after

                                href: {type: "string", value: link},

add

                                title: {type: "string", value: link},





Antti E.

unread,
Mar 22, 2018, 2:35:09 PM3/22/18
to TiddlyWiki
Stephan - You are the king!

Works perfectly, thank you.

//antti

Stephan Hradek

unread,
Mar 22, 2018, 5:17:39 PM3/22/18
to TiddlyWiki


Am Donnerstag, 22. März 2018 19:35:09 UTC+1 schrieb Antti E.:
Stephan - You are the king!

Works perfectly, thank you.

Just remember that it might be broken if you upgrade.

TonyM

unread,
Mar 22, 2018, 7:12:53 PM3/22/18
to TiddlyWiki
Thanks Antti,

I recall reviewing this previously, it seems to be an effective way to distribute solutions based on TiddlyWiki (for windows only I assume). I do not want to hijack the thread, yet since you have the fix you were looking for perhaps you could share your experience with hta as a delivery method?

On the surface it would suggest a downloadable instance that runs without any supporting installation, saves etc... its only need being access to the file, or a link to it. And as you point out variances with links, no status bar.

Users can thus treat it as a document and save it in their documents library.

I would love your feedback, and a view to collaboration.

Regards
Tony

..

Antti E.

unread,
Mar 29, 2018, 5:01:30 AM3/29/18
to TiddlyWiki
TonyM,

OK I will update you once we get some experience. So far it's been a slow start but no issues.

I work in an engineering company, and the plan is that our engineers could write these TiddlyWiki HTAs about certain not-too-narrow but not-too-wide topics, and save them to our network share. We use standardized corporate laptops so IExplorer is not an issue here.

HTA backups can be taken to local disk for offline usage. This may be necessary during field work, travelling, commissioning trips. Keeping the versions in sync if you update something offline might become a minor headache, but hey that's life.

In most out-of-office cases we have at least some kind of internet connection and VPN tunnel to our office network. You can notice that TiddlyWiki is at least 4MB because each time you save a tiddler via VPN it takes 5-15 seconds, depending on the connection speed. Minor issue again.

I created our own TiddlyWiki "base version" with a front page template tiddler, and a link to another tiddler that briefly describes what TiddlyWiki is, how to use it, how to find external help, this forum and some cheat sheets, and what customizations were done (list below).

//antti

!! Modifications

The following has been modified after downloading an empty TiddlyWiki from the Internet:

* Windows Explorer > change file extension to .HTA > Properties > Unblock
* Wiki Control Panel
** Info > Basics
*** Title
*** Subtitle
*** Default tiddlers: Main
*** Title of journal: YYYY-MM-DD
** Appearance > Toolbars
*** Edit: hide Delete
*** Page: show also Home, Close all, Fold all, Unfold all
*** View: show More, Edit, Fold others, Close others, Fold, Close
** Appearance > Tweaks
*** Sidebar layout: Fluid story
*** Story right: 570px
*** Story width: 570px
*** Tiddler width: 486px
*** Sidebar breakpoint: 760px
** Settings > disable auto-CamelCase
* [[$:/palettes/Vanilla]] > Edit > dark blue code, dark green external link, gray-blue internal link
** code-foreground: #000044
** external-link-foreground-visited: #006600
** external-link-foreground: #006600
** primary: #4060c0
* [[$:/themes/tiddlywiki/vanilla/base]] > Edit > dark red broken link
** a.tc-tiddlylink-missing { color: #880000; }
* [[$:/core/modules/parsers/wikiparser/rules/prettyextlink.js]] > Edit > show URL in tooltip
** after this: node.attributes.href = {type: "string", value: URL};
** add this: node.attribute.title=  {type: "string", value: URL};
* [[$:/core/modules/parsers/wikiparser/rules/prettylink.js]] > Edit > show URL in tooltip
** after this: href: {type: "string", value: link},
** add this: title: {type: "string", value: link},
* https://welford.github.io > htalink > drag&drop
** open external links in default browser instead if IE (HTA itself always runs in IE)
Reply all
Reply to author
Forward
0 new messages