[TW5] How Do I Embed a Linked Image From Local Folder?

727 views
Skip to first unread message

kasaduen...@gmail.com

unread,
Dec 27, 2016, 10:33:10 PM12/27/16
to tiddl...@googlegroups.com
I read the directions on the TiddlyWiki site, but I still don't understand...

What I'm trying to do is take a .jpeg and/or a .png, embed it into a tiddler. When you click it, it should take you to another tiddler or site.

Mark S.

unread,
Dec 28, 2016, 2:05:51 PM12/28/16
to TiddlyWiki
Unfortunately, I think in that case you need to use html (<a href="mylink"><img src=.../></a>) to form the link.

kasaduen...@gmail.com

unread,
Dec 28, 2016, 4:00:36 PM12/28/16
to TiddlyWiki
I have no idea what that means. xD

Tobias Beer

unread,
Dec 28, 2016, 4:18:26 PM12/28/16
to TiddlyWiki
Hi KaSaDu,

Perhaps linkimg is right for you:


Best wishes,

Tobias.
 

Mark S.

unread,
Dec 28, 2016, 6:26:00 PM12/28/16
to TiddlyWiki
Use HTML. Like

<a href="http://my link"><img src="my image.jpg"/></a>

where you replace "my link" with what you want to link to, and the image with the path to the image. This is standard HTML code, which TW5 knows how to render.

Good luck,
Mark

RichShumaker

unread,
Jan 6, 2017, 6:29:00 PM1/6/17
to TiddlyWiki
I have used Tobias's linkimg and it worked quite well for me.

Rich Shumaker


On Tuesday, December 27, 2016 at 7:33:10 PM UTC-8, kasaduen...@gmail.com wrote:

Stan001

unread,
Jan 7, 2017, 1:14:01 PM1/7/17
to tiddl...@googlegroups.com
Hellos Kasduen,

  • I'm very visual and I need plenty of pictures in wiki. 
  • I decided not to embed them as I need to reuse them (I do not want the html file get big).
  • I need to control the size of their appearance in tiddlywiki (+basic formatting such as align to left or right).
  • I'm a very lazy Mac user.
  • Even if this approach will not take you to another tiddler, the concept can be easily modified to do so.
If some of the preconditions resonate with you you may be interested what designed for myself:

  • I designed an AppleScript macro which I launch via shortcut (it could be launched from TextExpander, KeyboardMaestro or some other tools)
    • The shortcut is "parametrized" as follows:
      • ¨img2 means: align left with width=200
      • ¨img4 means: align left with width=400
      • ¨rimg3 means: align right with width=300
      • ¨rimg2 means: align right with width=200
    • The macro requires you to be on a selected file in Finder and be highlighted. 
  • I keep the folder structure as follows: 
    • TW\tiddliwiki.html - for the main file
    • TW\STWAtt\directory1
    • ...
    • TW\STWAtt\directoryN
      • Where directory1 to directoryN is in line with tiddlers naming (not important for the sake of image placing, rather just to keep things in an order).
  • I copy the picture into the respective folder, e.g.:


Note: The size of the pic is 313x455px
  • I leave the the highlight on the file (jpg in this case) in Finder;
  • Switch to the tiddler in edit;
  • Press a designed shortcut, e.g. ¨img2 which btw means: align right with width=200;
  • The script places the text with relative path: [img width=200 [STWAtt/Jastyn/2012-04-2461_web.jpg]], see the pic below:

  • Save the tiddler:

  • I enjoy the result :-)

Seems complicated, but if you do it so often and you are lazy, there is no other way than to automate,

PS1: Also if there are suggestions how to make it even better, I would be honoured by suggestion from the community. - BTW: I do not have that much to add as I'm not a coder. - I would like to say that I really appreciate all you participating in the community.

PS2: Should anybody be interested in the AppleScript, I'm happy to share though it is probably not a masterpiece from coding perspective...

PF 2017 and take care,

St.
Reply all
Reply to author
Forward
0 new messages