> I tried to append the following to get a similar effect as in the
> sidebar athttp://
bradleymeck.tiddlyspot.com/
>
> <script>place.lastChild.style.verticalAlign="middle";place.lastChild.style.textAlign="left";</
> script>
>
> - but this doesn't works.
>
> 1) Is there an other way to the same end?
I've added style="vertical-align:middle" to the generated <img> tag
for the icon to produce a more balanced appearance. However, the left
vs. right alignment of the accompanying text label is not controlled
by CSS attributes, so it isn't currently possible to put the text
*before* the icon. However, I will think about how to do this and
will probably have an update soon...
> 2) Would it be also possible to set icons for <<tiddler ...>>
> InstandBookmarklets scripts?
> 3) At TiddlyTools the SetIcon tiddler shows no content in ViewMode.
> But in my TW it displays this massage: "TypeError: btn has no
> properties" - why is it displayed differently?
Not sure why it is different in your TW... but that error should not
be appearing, as there is a check for
if (!btn) return;
within the code to ensure that a valid element was located. This was
added in v1.2.0 of the SetIcon script. Perhaps you imported an
earlier version? (There have been several updates during the day, as
I find small issues to tweak...)
In any event, I've just updated the script again to use a completely
different method of locating the link ("A" element) to which the icon
should be added. As a result, the above error should no longer
occur... and, in addition, it will now support adding an icon to ANY
links, regardless of how it is created, including: TiddlyLinks (to
tiddlers or URLs), macros that create links (including the <<toolbar>>
and <<slider>> macros), nested sliders, inline 'onclick' scripts, and
even explicit HTML <A> tags. Thus, any of the following will work:
[[TiddlerName]]<<tiddler SetIcon ...>>
<<toolbar ...>><<tiddler SetIcon ...>>
+++[label]...===<<tiddler SetIcon ...>>
<script label="...">...</script><<tiddler SetIcon ...>>
<html><a href="...">...</a></html><<tiddler SetIcon ...>>
enjoy,
-e