HTML "href" to a local Tiddler

70 views
Skip to first unread message

Mohamed Amin

unread,
Feb 19, 2020, 2:32:39 PM2/19/20
to TiddlyWiki
Hello,

When I use the following element :-
<a href=#MyTiddler rel="noopener noreferrer" >
<div style="text-align:center;">
Click here <br> to open <br> Your Tiddler
</div> 
</a>

"MyTiddler" is opened ONLY once, if I close it and tried to use the link again , nothing  happen .... any clue? 

The issue can be replicated in https://tiddlywiki.com/ by :-
1- Create a new tiddler (MyTiddler with some text)
2- Close it.
3- copy the above to another Tiddler
4- Click the link (MyTiddler is showen)
5- Close MyTiddler
6- Try to click the link again (nothing shown this time)

Regards

Mohamed Amin

unread,
Feb 19, 2020, 3:54:28 PM2/19/20
to TiddlyWiki
Another strange thing related to the same issue (may help to troubleshooting).

If we've more than 1 element like 
<a href=#MyTiddler rel="noopener noreferrer" >
<div style="text-align:center; border: 3px solid; ">
Click here <br> to open <br> Your Tiddler
</div> 
</a>

<a href=#AnotherTiddler rel="noopener noreferrer" >
<div style="text-align:center;; border: 3px solid;">
Click here <br> to open <br> Another Tiddler
</div> 
</a>

The link will work ONLY if we click the 2nd link (which in turn will NOT work until we click to the 1st link , etc ....).

so, it seems that the 
<a hred=#MyTiddler>
works ONLY after we click some another <a> element 

Regards

TonyM

unread,
Feb 19, 2020, 4:52:53 PM2/19/20
to TiddlyWiki
Mohammad

This is curious behavior but for links between tiddlers we tend to use wiki links and not html links. In your code I see the odd thing that could be influencing this like no quotes around =#tiddlername an ;; in a style.

But finding little oddities can be put to use later.

It why not use standard links to tiddlers in the current wiki?

tiddler name [[tiddler name]] [[short|tiddler name]] or the link widget etc...

Regards
Tony

Mat

unread,
Feb 19, 2020, 5:02:50 PM2/19/20
to TiddlyWiki
Like Tony says, we don't use <a> in TW. Instead you use [[link]] or the <$link> widget. It seems you should use the latter one.

<:-)

Mohamed Amin

unread,
Feb 19, 2020, 6:16:47 PM2/19/20
to TiddlyWiki
Thanks a lot Tony / Mat, 

actually I was following this doc :  https://tiddlywiki.com/#HTML%20Links%20in%20WikiText .
But YES ( as you said) the <$link> is more "natural" here (especially it'll be converted to "<a>" tag)

I tried it with NO issues.

Thanks again.


On Wednesday, February 19, 2020 at 9:32:39 PM UTC+2, Mohamed Amin wrote:

Mat

unread,
Feb 19, 2020, 7:00:40 PM2/19/20
to TiddlyWiki
Mohamed Amin wrote:
actually I was following this doc :  https://tiddlywiki.com/#HTML%20Links%20in%20WikiText .

Note the first sentence there...

It is often useful to be able to create HTML links to external resources

 <:-)
Reply all
Reply to author
Forward
0 new messages