Hi Mark (and anyone else who happens to see this)
Would there be a way to create a stamp for the following?
[[sources| + datetimestamp of now + ]]
My use case is taking a note, then having a link to another tiddler, with
the current date and time as its title, containing links to sources. I
would stamp the above in my notes tiddler, save the notes tiddler, then
click on the link to create the datetimestamp tiddler and add sources.
On Sunday, November 17, 2019 at 2:38:56 PM UTC-6, Mark S. wrote:
>
> This seemed to work in the title snippet:
>
> <$vars myspan="<span class='gifford'>" myspanx="</span>" >
> {{{ [all[tiddlers]removeprefix[Draft of
> ']removesuffix[']addprefix<myspan>addsuffix<myspanx>] }}}
> </$vars>
>
> You can see where to change the class name as needed.
>
> On Sunday, November 17, 2019 at 11:52:36 AM UTC-8, David Gifford wrote:
>>
>> Wow, Mark, this is great! Thank you!
>>
>> Okay, next question: would there be a way for me to edit this so that the
>> title gets wrapped in a span class? I tried editing"Snippet - Title of
>> draft tiddler",
>> but while it stamped regular text I had added, it did not stamp the span
>> class.
>>
>> On Sunday, November 17, 2019 at 1:34:55 PM UTC-6, Mark S. wrote:
>>>
>>> I've been thinking for awhile that it would be neat to have a "dynamic"
>>> stamp, that doesn't just paste text, but renders it first.
>>>
>>> Here's a first step towards that. Drag and drop the attached into your
>>> backed-up TW. Reload.
>>>
>>> This will put a second stamp symbol in your editor. This stamp will
>>> attempt to render your stamp snippets. I've provided two
>>> stamps. One generates the current time. The other generates the current
>>> title IF this is the only tiddler being edited
>>> at the moment. I didn't have a way to grab the current title. Possibly
>>> it's in the code somewhere. So ... first stab.
>>>
>>> A better approach would be to have snippets that could be tagged as
>>> "dynamic". Then there would be only one stamp tool
>>> in the toolbar. But that would require changing core code, so this will
>>> have to do for now.
>>>
>>> Hope this is what you were looking for!
>>>
>>> -- Mark
>>>
>>> On Sunday, November 17, 2019 at 10:30:25 AM UTC-8, David Gifford wrote:
>>>>
>>>> Hi all
>>>>
>>>> Is it possible to create a stamp that
>>>>
>>>> 1) grabs the title of the current tiddler, and
>>>> 2) stamps it as text?
>>>>
>>>> Use case: I take notes on reading in chapters of books, and in
>>>> webpages, and would like to more quickly stamp their sources after the
>>>> note
>>>> or snippet in question. If the title of the tiddler is "https://..." or
>>>> "Book (Author), ch 1", then by clicking on a button in the edittoolbar I
>>>> could quickly add the source.
>>>>
>>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/a769e3ba-64f5-4368-9133-886c758fb151%40googlegroups.com.