Is it possible to use unicode emoji as icons?

146 views
Skip to first unread message

talha131

unread,
Sep 4, 2020, 12:05:34 PM9/4/20
to TiddlyWiki
I understand that you can add an image to TW and then use it as icon for tiddlers and tags.

Is it possible to use an emoji like 🇺🇸 as icon in TW?

Eric Shulman

unread,
Sep 4, 2020, 12:49:10 PM9/4/20
to TiddlyWiki
On Friday, September 4, 2020 at 9:05:34 AM UTC-7, talha131 wrote:
I understand that you can add an image to TW and then use it as icon for tiddlers and tags.
Is it possible to use an emoji like 🇺🇸 as icon in TW?

You can't *directly* use emojis as icons.  However, in a recent discussion about tags, Tony described a simple technique for defining SVG images from emojis.  

For example, to define a music note icon, create a tiddler named "Music", containing
<svg height="26px" width="24px">
 
<text x="0" y="24" fill="red">♫</text>
</svg>
Then, to use it as an icon for tiddlers or tags, just add an "icon" field with a value of "Music" to the desired tiddler/tag.

Note: while you can copy/paste the emoji character directly into the SVG syntax, you can also use HTML entity syntax to enter the unicode value for the symbol.  For example, the "Music" tiddler shown above could be written this way:
<svg height="26px" width="24px">
 
<text x="0" y="24" fill="red">&#x266B;</text>
</svg>

You can find many unicode reference sites online.  Here's a few:
enjoy,
-e

Eskha

unread,
Sep 4, 2020, 1:11:20 PM9/4/20
to TiddlyWiki
Thank you Eric, Tony and talha131 for this useful tip.

Best regards,

Eskha

talha131

unread,
Sep 4, 2020, 3:36:32 PM9/4/20
to TiddlyWiki

Thank you Eric, this is very useful.

​
Reply all
Reply to author
Forward
0 new messages