Skip to content

Commit 657db41

Browse files
committed
Make button actually add dummy text to content tiddler
1 parent 6ada50e commit 657db41

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
created: 20251107151758434
2-
modified: 20251107173841789
2+
modified: 20251107221914135
33
tags: $:/tags/SupplementaryInfo
44
title: $:/supp-info/notes/content
55
type: application/json

tiddlers/$__supp-info_notes_view-template.tid

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
created: 20251107152410791
2-
modified: 20251107204927451
2+
modified: 20251107221852106
33
tags: $:/tags/ViewTemplate
44
title: $:/supp-info/notes/view-template
55
type: text/vnd.tiddlywiki
66

77
\procedure add-note()
8-
<$action-log clicked=<<now>> />
8+
<$let count={{{ [{$:/supp-info/notes/content}jsonindexes<currentTiddler>last[]add[1]] }}}>
9+
<$action-setfield
10+
$tiddler="$:/supp-info/notes/content"
11+
$file="text"
12+
$value={{{ [{$:/supp-info/notes/content}jsonset<currentTiddler>,<count>,[Dummy text]format:json[2]] }}}
13+
/>
14+
</$let>
915
\end add-note
1016

1117
<% if [{$:/supp-info/notes/content}jsonget<currentTiddler>] %>
@@ -43,7 +49,7 @@ type: text/vnd.tiddlywiki
4349
}
4450
summary {background-color: #996; color: white; padding: .5em; font-weight: bold;}
4551
.note-list {padding: .5em;}
46-
.note {border: 1px solid #ccc; padding: .25em; margin-top: .5em; &>:first-child {margin-top: 0;}}
52+
.note {border: 1px solid #ccc; padding: .25em .5em; margin-top: .5em; &>:first-child {margin-top: 0;}}
4753
}
4854
</style
4955
<% endif %>

0 commit comments

Comments
 (0)