No, that doesn't work, sorry for my premature proposal
With the current prerelease you could do:
<$set name="splitregexp" value="[\^~~][~~$]">
<$action-setfield text={{{
[[$(text-field)$]search-replace:g:regexp<splitregexp>,[]] }}}/>
</$set>
BurningTreeC schrieb am Dienstag, 8. Dezember 2020 um 10:47:19 UTC+1:
> Hi @kebi,
>
> for the uncheckactions you could use something like:
>
> \define uncheckactions()
> <$set name="splitregexp" value="[\^~~][~~$]">
> <$action-setfield text={{{ [[$(text-field)$]splitregexp<splitregexp>] }}}/>
> </$set>
> \end
>
>
> kebi schrieb am Dienstag, 8. Dezember 2020 um 09:10:36 UTC+1:
>
>> Hello everyone,
>> I have a tiddler where I display all the tiddlers that contain the word
>> "TODO " in their text field with a checkbox button.
>> When I click the checkbox button the text field of the corresponding
>> tiddler should change and include the "~~" symbols as prefix and suffix.
>>
>> I have accomplished this with the following code:
>>
>> \define line-through()
>> <$action-setfield text="~~$(text-field)$~~"/>
>> \end
>>
>> <$list filter="[regexp:text[^TODO ]]">
>> <$set name="text-field" value={{!!text}}>
>> <$checkbox checkactions=<<line-through>> >
>> {{!!text}}
>> </$checkbox>
>> </$set>
>> </$list>
>>
>> But I have problems with removing the "~~" prefix and suffix when
>> unchecking the checkbox.
>> Does anybody know what's the best way to do this?
>>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/0f2925e6-83c6-4f7e-9d05-ee56c218d6b1n%40googlegroups.com.