IMG markup
== Description ==
This page described the HOP markup ++
++. It differs from the original
[[http://www.w3.org/TR/html4/|HTML]] one with one respect. It supports
an addition attribute :inline that is used to specified if an image
content should be kept on the server or if it should be //embedded//
inside the HTML tree itself.
== Synopsis ==
=== server ===
(
...)
(img-base64-encode path)
== Examples ==
== Server Definitions ==
===
===
^ arguments ^ type ^ default ^ short description ^
| :id | string | //random// | element identifier. |
| :class | string | _ | element class name. |
| :inline | boolean | ++#f++ | inline or remote? |
| :src | string | _ | a file name. |
| :lang | string | _ | language information. |
| :dir | string | _ | direction information. |
| :title | string | _ | element title. |
| :style | string | _ | inline style information. |
| :onclick | script | _ | event handler. |
| :ondblclick | script | _ | event handler. |
| :onmousedown | script | _ | event handler. |
| :onmouseup | script | _ | event handler. |
| :onmouseover | script | _ | event handler. |
| :onmousemove | script | _ | event handler. |
| :onmouseout | script | _ | event handler. |
| :onkeypress | script | _ | event handler. |
| :onkeydown | script | _ | event handler. |
| :onkeyup | script | _ | event handler. |
If the attribute :inline is ++#t++ then the image content
(which is read from the :file name) is embedded inside the markup
itself. This prevents the client from addressing a new request
to the server in order to get the actual bytes composing the image.
~~ In addition, //inline// content can be provided for an image, as
the //body// of the image. That is, if the ++
++ markup is provided
a body and if this body is a string, then, it is used as the image
content. Example:
(let ((p (open-input-file "/tmp/foo.jpg")))
(unwind-protect
(
:src "/tmp/foo.jpg" (read-string p))
(close-input-port p)))
This is equivalent to:
(
:src "/tmp/foo.jpg" (read-string p) :inline #t)
=== (img-base64-encode path) ===
img-base64-encode
img-base64-encode
^ arguments ^ type ^ description ^
| string | string | An image server path name. |
The function ++img-base64-encode++ construct an inlined image URI that
is suitable for the ++
++'s ++:src++ attribute.
== See also ==