editTextWidget for a field containing a list

84 views
Skip to first unread message

peuhpeuh singe

unread,
Feb 20, 2017, 8:11:40 AM2/20/17
to TiddlyWiki
Hi,

I wonder whether there exists a solution/widget to edit the different elements of a field containing a list. Something like the editTextWidget but that will create an  editTextWidget per element of the list.
Here is an example:

consider the field:
listOfImg: cat.png rat.png

then:
<$edit-text field="listOfImg"/>

will gives something like:
img1: cat.png
img2: rat.png

where the text 'cat.png' and 'rat.png' are editable and modifies the associated (list)-field of the tiddler accordingly.

If this does not exist, I would appreciate any hints on how to write such a widget before starting.

Thanks for any feedback,

P.

Ton Gerner

unread,
Feb 20, 2017, 9:24:23 AM2/20/17
to TiddlyWiki
Hi P.,

May be not what you are asking for, but a workaround I use to edit lists in a field.

I enter (or copy/paste from a list field) all values in the text area of the tiddler containing that list.
So it will look like (place every value at a separate line for readability):

listvalue1
listvalue2
listvalue3
listvalue4
listvalue5
...
listvaluex

In case you want to hide these list values in view mode, you can make an HTML comment of it:

<!--
listvalue1
listvalue2
listvalue3
listvalue4
listvalue5
...
listvaluex
-->

Now you can edit and/or reorder the list values in the text area.
When you are ready, just copy these set of list values into the list field. and that's it.

Cheers,

Ton



peuhpeuh singe

unread,
Feb 21, 2017, 4:04:57 AM2/21/17
to TiddlyWiki
Thanks for your reply Ton. However, I am looking for something more integrated. In particular my purpose is to define a viewTemplate for some "meta tiddler" collecting and allowing to edit some given fields for all child tiddler. This  which makes your pragmatic solution quite limited in my case. If an integrated-solution/widget does not yet exist I am ok to code one. Is any experts have an idea of a code sharing some smilarities with what I want, I could start with ? Thanks for your help.

PMario

unread,
Feb 21, 2017, 6:59:39 AM2/21/17
to TiddlyWiki
Reply all
Reply to author
Forward
0 new messages