Try adding an else[] after <targetTiddler>get[text] On Sunday, March 21, 2021 at 5:51:59 AM UTC+1 Mohammad wrote:
> Lovely solution Saq! > > why it does not work with a non-existent Target tiddler? how can I extend > the code to address this issue? > > > Best wishes > Mohammad > > > On Sat, Mar 20, 2021 at 11:37 PM Saq Imtiaz <saq.i...@gmail.com> wrote: > >> @Diego, this is untested code but should hopefully point you in the right >> direction: >> >> \define appendBoxActions() >> <$action-setfield $tiddler=<<targetTiddler>> text={{{ >> [<targetTiddler>get[text]addsuffix<linebreak>addsuffix<linebreak>addsuffix{$:/temp/appendbox}] >> >> }}}/> >> <$action-setfield $tiddler="$:/temp/appendbox" text=""/> >> \end >> >> <$vars targetTiddler="Target" linebreak=" >> "> >> <$keyboard key="Enter" actions=<<appendBoxActions>>> >> <$edit-text tag="textarea" placeholder="" tiddler="$:/temp/appendbox"/> >> </$keyboard> >> </$vars> >> >> Since you are only appending on the Enter key as opposed to on every >> keystroke, you could indeed apply this code via a viewtemplate and append >> to the tiddler the textarea field is in, if so desired. The key is that the >> edit-text widget writes to a temp tiddler. >> >> >> On Saturday, March 20, 2021 at 8:02:54 PM UTC+1 dieg...@gmail.com wrote: >> >>> >>> Hello all, >>> >>> Using Nico's projectify with the excellent quick todo add, has put me in >>> mind for something similar. >>> >>> I'd like to have a tiddler with an edit box visible in view mode, and >>> when I type something in that edit box and press enter, what I've typed >>> gets *appended* to a tiddler (as I understand, cant be the tiddler Im >>> using the edit box in), with a timestamp. >>> >>> I know this will involve a keyboard widget. While I was trying it out >>> myself, I got stuck trying to append. >>> >>> Has anyone done anything similar and/or willing to help? >>> >>> Thanks! >>> Diego >>> >>> >>> -- >> 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/a011af6d-89a5-4d90-bbf6-df25fc88f434n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/tiddlywiki/a011af6d-89a5-4d90-bbf6-df25fc88f434n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1f7d2e7b-c24a-4e19-8d3e-113fc6870e42n%40googlegroups.com.