New tiddler button with focus on title

54 views
Skip to first unread message

Jon

unread,
Feb 6, 2021, 9:34:09 AM2/6/21
to TiddlyWiki
Hi,

This creates a new tiddler with my-tag with 'my text' inserted:

\define newtags() [[my-tag]]
\define newtext() my text
<$button class="tc-btn-invisible">{{$:/core/ui/Buttons/new-tiddler}} 
      <$action-sendmessage $message="tm-new-tiddler" title=<<Title>> tags=<<newtags>> text=<<newtext>> />
   </$button>

How can I get the focus on the title so it's highlighted?

Thanks
Jon

strikke...@gmail.com

unread,
Feb 6, 2021, 11:28:12 AM2/6/21
to TiddlyWiki

You are creating 2 new tiddlers. New tiddler without tag or text but with focus on title. New tiddler1 with tag and text but not focus on title.

Try:
\define newtags() [[my-tag]]
\define newtext() my text
<$button class="tc-btn-invisible">{{$:/core/images/new-button}}
      <$action-sendmessage $message="tm-new-tiddler" tags=<<newtags>> text=<<newtext>> />
   </$button>

Transcluding the image not the button.

Birthe

Jon

unread,
Feb 6, 2021, 1:28:07 PM2/6/21
to TiddlyWiki
Thanks Birthe,
much appreciated
Jon

Reply all
Reply to author
Forward
0 new messages