Based on the button shared by @JanJo in the above linked post for section editor, I want to create a viewtoolbar button to add and remove two fields in the current tiddler (instead of one field as seen in the section editor button)
Is that possible ? I was not able to do it using the setField
option used in the button example given above.
Here is the code used in JanJo’s button for section editor
\whitespace trim
\define showsecs()
<$button setField="se-type" setTitle=<<currentTiddler>> setTo="" tooltip="showSections" aria-label="show-sections"class=<<tv-config-toolbar-class>>>
{{$:/images/icon-park/connect/intersection-outline}}
</$button>
\end
<$list filter="[all[current]fields[]search:title[se-type]]" emptyMessage=<<showsecs>>>
<$button tooltip="showSections" aria-label="show-sections"class=<<tv-config-toolbar-class>>>
<$action-deletefield $tiddler=<<storyTiddler>> $field="se-type" />
{{$:/images/icon-park/connect/intersection-fill}}
</$button>
</$list>