add_item() creates a new tiddler field named “item_N” (where N is a calculated number)
The $let widget gets the list of all existing item fields, finds the last item field and adds 1. If no items exist yet, it defaults to “1”. It then adds the “item_” prefix to generate the new “item_N” fieldname.
Then it copies the current “newitem” input value to the “item_N” field and clears the “newitem” input field.
del_item() deletes an existing item field
The $list widget finds all existing item fields (i.e., fields starting with “item_”)
For each existing item field, it displays an edit field and a delete (“trashcan”) button.
Editing the existing item immediately updates the stored “item_N” field value
Pressing delete removes the existing item field
The final $edit-text widget creates a temporary “newitem” field, which is then copied into an “item_N” field when the add ("+") button is pressed
nice solution… how to insert in the target field links to other tiddlers ?
I think this is not possible in the edit mode, but useful later when you transclude the content of the field in wikified text area.
Best