1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-09 03:19:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets/ImageWidget.tid

31 lines
1.1 KiB
Plaintext
Raw Normal View History

title: ImageWidget
created: 20140416160234142
2014-08-20 09:00:34 +00:00
modified: 20140820100234142
2014-09-10 23:06:19 +00:00
tags: Widgets
caption: image
! Introduction
The image widget displays images that can be specified as a remote URL or the title of a local tiddler containing the image.
! Content and Attributes
Any content of the `<$image>` widget is ignored.
|!Attribute |!Description |
|source |The URL of the image, or the title of an image tiddler |
|width |The width of the image as a number |
|height |The height of the image |
|tooltip |The tooltip to be displayed over the image |
2014-08-20 09:00:34 +00:00
|alt |The alternative text to be associated with the image |
|class |CSS classes to be assigned to the `<img>` element |
! External Images and the ''_canonical_uri'' field
When used to display tiddler-based images, the image widget operates in two distinct modes:
* If the ''_canonical_uri'' field is present then it is used as the ''src'' attribute of the generated `<img>` element and the ''text'' field is ignored
* Without the ''_canonical_uri'' field, the image widget generates an `<img>` element that embeds the image data directly using a `data:` URI.
See ExternalImages for more details.