[macro] presenting new icon macro (for icons in text)

113 views
Skip to first unread message

HC Haase

unread,
Mar 11, 2020, 6:32:00 AM3/11/20
to TiddlyWiki
First off. This is not mine. I found it by chance, on Bimlas' page. so credit to him.


I have made some documentation and added an extended version.


  • Version: 1.0.0
  • Date: 2020/02/27
  • Creator: HC Haase. Inspired by Bimlas.

Function

This macro make transcluded icons follow the line height of the text with the option of a link and a tooltip. This makes prettier references to buttons (instead of this ) in documentation text.

There is a simple macro without a button and an extended macro with a button.

Use

Syntax, simple macro (note the _)
<<_icon <transclusion> >>
Syntax, extended macro
<<icon <transclusion> <link> "<tooltip text>" >>

Example
<<icon {{$:/core/images/new-button}} "link" "tooltip text">>

Mohammad

unread,
Mar 11, 2020, 11:22:29 AM3/11/20
to TiddlyWiki
Hi HC Hasse,
 Thank you for sharing. Nice stuffs. I also sue a macro doc-svg in Utility plugin just to set the size and vertical alignment.
Strangely there is no documentation macro for this in tiddlywiki.com.

Your macro not only set he size and alignment but also create a link and acts as button. You may add a css class input parameter to set the color/fill, ....

Good luck
--Mohammad

Diego Mesa

unread,
Mar 11, 2020, 1:01:48 PM3/11/20
to TiddlyWiki
Also try to get this into the core! 
Reply all
Reply to author
Forward
0 new messages