Hi,
On Wednesday, May 16, 2018 at 1:32:08 AM UTC+2, Zachary Storer wrote:
>
>
> I wish that there was a more intelligent [import] button that could link
> to external images without the need
> for manually inserting the _canonical_uri field.
>
With the following code, a JPEG image from a web location can be dragged
into an area marked "Drop JPEG Image Here", and a tiddler containing the
_canonical_uri of the image is automatically created:
\define embedded-image-actions()
<$wikify name="tiddlercontent2" mode="inline" text='<<actionTiddler>>'>
<$action-createtiddler $basetitle="New Image"
_canonical_uri=<<tiddlercontent2>> type="image/jpeg" $savetitle="Embed
JPEG!!tiddlertitle"/>
<$action-navigate $to={{Embed JPEG!!tiddlertitle}}/>
</$wikify>
\end
<$droppable actions=<<embedded-image-actions>>>
<div style="height:2em;">
<div style="border:1px dotted;
width:15em;padding:0.7em;border-radius:5px;text-align:center;">Drop JPEG
Image Here</div></div>
</$droppable>
Downside: I believe that a separate tiddler/drop area needs to be created
for other image types, e.g. PNG.
Cheers,
Stef
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/3d97a7b5-58bc-4833-88dd-8f4fbf12bd00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.