How to edit body of New Journal Tiddler template

157 views
Skip to first unread message

Roving Richard

unread,
Apr 4, 2017, 1:49:27 AM4/4/17
to TiddlyWiki
Currently, all new journal entries are empty. I'd like to make it so that it comes preloaded with some text. Should I do it through $:/core/ui/Buttons/new-journal?

I want something like this:
! Dream journal

! I'm grateful for

! I'm excited for


! Today's wins

! How I'll improve

I've tried to do this by manually transcluding a {{journal template}} tiddler, but then I can't actually fill the lists

Mark S.

unread,
Apr 4, 2017, 10:54:02 AM4/4/17
to TiddlyWiki
If you replaced the contents of $:/core/ui/Buttons/new-journal

with

\define journalButton()
<$button tooltip={{$:/language/Buttons/NewJournal/Hint}} aria-label={{$:/language/Buttons/NewJournal/Caption}} class=<<tv-config-toolbar-class>>>
<$action-sendmessage $message="tm-new-tiddler" title=<<now "$(journalTitleTemplate)$">> tags="$(journalTags)$" text="$(journalText)$"/>
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/new-journal-button}}
</$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<span class="tc-btn-text"><$text text={{$:/
language/Buttons/NewJournal/Caption}}/></span>
</$list>
</
$button>
\end
<$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}>
<$set name="journalTags" value={{$:/config/NewJournal/Tags}}>
<$set name="journalText" value={{$:/config/NewJournal/Text}}>
<<journalButton>>
</$set></$set>

then you could put your default text in 


$:/config/NewJournal/Text


and have it available as you needed it. Of course, you might miss any upgrades to New Journal and you'll need to remember the name of the tiddler where you stowed the default text. I guess the next step would be to add a box to the configuration screen. I'm kind of surprised that that isn't already available.

Oh yeah - be sure to make a backup before trying this!

HTH
Mark

Roving Richard

unread,
Apr 4, 2017, 12:25:01 PM4/4/17
to TiddlyWiki
Thanks Mark. PR submitted.
Reply all
Reply to author
Forward
0 new messages