Have you tried {{!!source}}?
This is how I'd do it, as a stamp.
<$action-sendmessage
$message="tm-edit-text-operation"
$param="replace-selection"
text="""
<dt></dt><dd>
<span class="source">- {{!!source}} 'Sound Mapping', p. </span>
</dd><hr>
""" />
On Friday, August 30, 2019 at 7:27:38 AM UTC-6, David Gifford wrote:
>
> Hi all
>
> I am trying to combine steps but I can't wrap my head around it.
>
> I would like an editor toolbar button that does three things:
>
> 1. Inserts outer text A
> 2. Grabs and inserts as text the contents of a special field of the
> current tiddler
> 3. Inserts outer text B
>
> I want the final result to look like
>
> <dt></dt><dd>
>
> <span class="source">- resumen de Lee, M. E., 2017 'Sound Mapping', p.
> </span>
>
> </dd><hr>
>
> But where
>
> Lee, M. E., 2017 'Sound Mapping'
>
> is the contents of the source field of the tiddler I am working in, and
> everything before and after wraps around it.
>
> I am getting stamps and buttons and filters and macros all scrambled in my
> brain.
>
> The solutions I have come up with always end up inserting the {{ "[[]]" }}
> or whatever else I use to access the contents of the field. But I want to
> insert the actual content of the field as text, so when I transfer the
> above to another tiddler, it will retain the source from the first tiddler
> rather than looking for the source field of the new tiddler.
>
> The use case is for taking notes in a tiddler representing a book. Each
> note is wrapped with the definition list line, and the source is added
> automatically at the end of the note. Then I manually transfer the content,
> definition list tags and all, to a tiddler (in another Tiddlywiki)
> representing a topic that the note is about. That way I take notes by book
> but organize notes by topic for publishing in definition lists. Then I
> export as static and the end result looks like this
> http://articulos.giffmex.org/evangelios/genero.html.
>
> My current process is A) an editor toolbar button to insert the definition
> list, then B) a separate stamp to insert the contents of a 'source'
> tiddler, and C) change the source tiddler every time I switch between
> books. Instead, I would like to just create the book tiddler, add the
> source data for the book into a source field of that tiddler, then click an
> editor toolbar button once each time I add a new note, without having to
> repeat steps B and C.
>
> Thanks in advance to anyone who has the time and patience to walk me
> through this.
>
--
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/af9a9ae9-4fd8-4fee-a7b5-364c06719af6%40googlegroups.com.