*Why don't use style at display time? Why do you add them to text field?*
Thank you @Mohammad, I forgot to say that I need to change the value of the
tiddler and not only its appearance.
Thank you @BurningTreeC, your solutions works within the current prerelease!
On Tuesday, December 8, 2020 at 5:41:43 PM UTC+9 Mohammad wrote:
> Kebi,
> Why don't use style at display time? Why do you add them to text field?
> I believe you should separate these two content from style.
>
> By the way the removesuffix/removeprefixx filter operators shall do what
> you want
>
> On Tuesday, December 8, 2020 at 11:40:36 AM UTC+3:30 kebi wrote:
>
>> 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/a28a9e0a-c84d-4695-a11b-d2f452d492cen%40googlegroups.com.