Icon in caption of Stamp

87 views
Skip to first unread message

Markus Adler

unread,
Jan 15, 2020, 2:19:08 AM1/15/20
to TiddlyWiki
Hi,

it is possible to get an Icon in the stamplist inside the editor?

StampIcon.PNG


Ton Gerner

unread,
Jan 15, 2020, 5:48:03 AM1/15/20
to TiddlyWiki
Hi Markus,

You can transclude an icon.

  1. Click the Stamp button
  2. Click Add yor own
  3. Insert something like `{{$:/core/images/spiral}}` in the text field
  4. Fill in the caption field with a descriptive name
  5. Enter a title for the tiddler
  6. Save

Hope that helps.

Cheers,

Ton


Markus Adler

unread,
Jan 15, 2020, 6:29:57 AM1/15/20
to tiddl...@googlegroups.com
Thank you Ton but that's not what I want.

The icon should not be inserted by stamp. The icon should appear next to the description in the stamp selection list.
I tried to insert '{{$:/core/images/spiral}} description' in the description field but no symbol appears.

Ton Gerner

unread,
Jan 15, 2020, 7:17:39 AM1/15/20
to TiddlyWiki
Hi Markus,

Sorry I misunderstood.
As you found out transclusion is displayed as pure text.
The same holds for HTML entities like ©.
But if you copy/paste the displayed entity it works.

Hope that helps, there are a lot of HTML entities supported by TW 5, see https://tiddlywiki.com/#%24%3A%2Fcore%2Fmodules%2Fconfig.js.

Cheers,

Ton

Ton Gerner

unread,
Jan 15, 2020, 12:13:05 PM1/15/20
to TiddlyWiki
Hi Markus,

For personal use there are far more text characters that can be copied/pasted, e.g. from:

Cheers,

Ton

Mohammad

unread,
Jan 15, 2020, 12:17:44 PM1/15/20
to TiddlyWiki
Hi Ton,
Simple but very nice solution.

Cheers
Mohammad

Markus Adler

unread,
Jan 15, 2020, 2:03:43 PM1/15/20
to TiddlyWiki
Hey Ton,

that's exactly what I was looking for.
Thank you very much.

Jeremy Ruston

unread,
Jan 15, 2020, 3:30:48 PM1/15/20
to TiddlyWiki
Hi Markus

Putting '{{$:/core/images/spiral}} description’  in the caption field should in fact work, and it’s a bug that it doesn’t.

The problem lies in the template $:/core/ui/EditorToolbar/stamp-dropdown which builds the dropdown for the stamp tool. To display the description of each stamp it currently uses:

<$view tiddler=<<snippetTitle>> field="caption" mode="inline">

<$view tiddler=<<snippetTitle>> field="title" mode="inline"/>

</$view>

The <$view> widget displays a field as plain text. If the field doesn’t exist then the content of the <$view> widget is displayed instead.

However, the convention in TiddlyWiki is to transclude the caption field, rather than just viewing it as plain text. Transcluding the content of the field causes wikitext such as the image to work normally.

I’ve fixed the problem here:


The fix will be live on the prerelease in about 10 minutes:


We don't recommend using the prerelease for anything important, though. Until v5.1.22 is released you’d probably be better off using the Unicode trick (which does in any case carry some advantages).

Best wishes

Jeremy.




-- 
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5411a354-12c9-4cee-ad0b-44bbd0b1197c%40googlegroups.com.

Markus Adler

unread,
Jan 16, 2020, 4:46:35 AM1/16/20
to TiddlyWiki
Hi Jeremy,

that sounds great.
For me, this increases the clarity a lot. Another feature could be the grouping of the stamps by tabs or headings.

P.S.
I'm not a great programmer, just an avid tw user.

greeting
Markus

Jeremy Ruston

unread,
Jan 16, 2020, 5:07:38 AM1/16/20
to tiddl...@googlegroups.com
Hi Markus


that sounds great.
For me, this increases the clarity a lot. Another feature could be the grouping of the stamps by tabs or headings.

Yes indeed, one could make it an expandable/collapsible hierarchical catalogue along the lines of the table of contents.

I'm not a great programmer, just an avid tw user.

Well, of course TiddlyWiki isn't designed for programmers, it is intended to help ordinary users achieve the sorts of things that programmers take for granted.  The fact that you correctly figured out how to do what you wanted is a testament to your ingenuity, and hopefully says something about the consistency of the internal logic that makes up the inwardness of TiddlyWiki.

Best wishes

Jeremy


greeting
Markus

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages