[tw5] Persistant memo textbox

Hello,

Is there a script to have a persistent memo-box/note-pad in a tiddler? I am in need of a box that I can quickly jot down ideas without opening up the tiddly editor. It doesn’t need to have text formatting options, just simple text with no markdown. Also, being persistent - I can close the tiddler and open it again and the input text is still there.

I remember there being a thread like this years ago on here. I couldn’t find it again.

Thank you.

Try this:

Create a tiddler (e.g. “TiddlerNotesTemplate”), tagged with $:/tags/ViewTemplate, containing:

<$edit-text tag="textarea" class="tc-edit-texteditor" field="notes"/>

This will add a multi-line textarea input at the bottom of every tiddler.

enjoy,
-e

1 Like

That’s exactly what I was looking for.

Thank you!

I suggest also added a “heading” above the textarea. Something like this:

<$button class="tc-btn-invisible">
   {{$:/core/images/delete-button}}
   <$action-setfield $tiddler=<<currentTiddler>> $field="notes"/>
</$button>
''Notes:''
<$macrocall $name="copy-to-clipboard-above-right" src={{!!notes}}/>
<$edit-text tag="textarea" class="tc-edit-texteditor" field="notes"/>

Notes:

  • The $button widget adds a “trash can” button in the upper left. Pressing this button clears the notes contents and removes the notes field from the tiddler.
  • The copy-to-clipboard-above-right macro added a “copy to clipboard” button in the upper right. Pressing this button copies the notes contents to the system clipboard for quickly pasting it elsewhere.

enjoy,
-e

3 Likes

One more addition. Put the following at the start of the “TiddlerNotesTemplate” definition:

<$list filter="[<currentTiddler>is[tiddler]]">

This bypasses displaying the TiddlerNotesTemplate for shadow tiddlers (e.g., $:/AdvancedSearch), so you can’t add notes that will automatically convert a shadow tiddler into a “real” tiddler which will prevent it from being upgraded when a new TWCore is released.

-e

2 Likes

Question for you @Eric Shulman

When I make the tiddler containing everything for the memo textbox a sidebar tab, the texteditor only goes about half the width of the sidebar.

is there a way I could set it to be wider, possibly linking it to the sidebar-width using calc()?