Internal Image External Link

184 views
Skip to first unread message

ET

unread,
Feb 22, 2015, 12:46:49 PM2/22/15
to tiddl...@googlegroups.com
Hi,

I'm rather confused about the WikiText syntax for creating an external link with an internal image.
I have tried the following with without success.

[img[image.png]ext[tiddlywiki|http://www.tiddlywiki.com]]
[img[ext[tiddlywiki|http://www.tiddlywiki.com]|image.png]]
[ext[img[image.png]|http://www.tiddlywiki.com]]

Jed Carty

unread,
Feb 22, 2015, 1:21:40 PM2/22/15
to
Sorry, you use the a html tag. I will get this right for one of these edits.

<a href='somesite.com'>[img[imgstuff]]</a>

ET

unread,
Feb 22, 2015, 2:38:20 PM2/22/15
to tiddl...@googlegroups.com
So it's not possible using pure WikiText?

Jed Carty

unread,
Feb 22, 2015, 3:38:47 PM2/22/15
to tiddl...@googlegroups.com
I am pretty certain that the only other way to have external links without using html tags is to just type in the complete url without any formatting. Just typing http://tiddlywiki.com will be a link, but that isn't very useful.

Making a macro or widget like the link widget but that works for external links probably wouldn't be very difficult, but it would just be a wrapper on the a tag anyway, so I am not sure how useful it would be.

Do you think it would make a significant difference to be able to type something like

<$external-link to='http://tiddlywiki.com'>Some text or images here</$external-link>

instead of

<a href='http://tiddlywiki.com' target='_blank'>Some text or images here</a> 
?

That is a sincere question, I have gotten used to just using the html and I am not sure if it would be helpful for someone to use one over the other.

ET

unread,
Feb 22, 2015, 8:50:48 PM2/22/15
to tiddl...@googlegroups.com
Right, in that case I'll have to painstakingly type in the longhand form for every image link (in my case) and also must include the target='_blank'
bit otherwise opening in the same tab.

Jeremy Ruston

unread,
Feb 23, 2015, 6:16:43 AM2/23/15
to TiddlyWiki
Hi ET

>  I'm rather confused about the WikiText syntax for creating an external link with an internal image.

<a href="http://tiddlywiki.com" target="_blank">[img[Motovun Jack.jpg]]</a>

> Right, in that case I'll have to painstakingly type in the longhand form for every image link (in my case) and also must include the target='_blank'
bit otherwise opening in the same tab.

Not at all. You can create a custom macro that makes it easy to re-use the image link code. For example

\define imageLink(url,image)
<a href="$url$" target="_blank">[img[$image$]]</a>
\end

Then each time you need an image link:

<<imageLink "http://tiddlywiki.com" "Motovun Jack.jpg">>

Best wishes

Jeremy



--
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 post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com
Reply all
Reply to author
Forward
0 new messages