Is it possible to strikethrough the title of a collection?

I’m building a to-do list and was wondering if it’s possible to strikethrough the title section of a collection (list) when the task has been completed?

Most of the older posts here suggest that it’s only possible to display strikethrough in a rich text component but I just want to try my luck and see if anyone has managed to do this.

You can use the AI component :wink:

Try this in a javascript column.

function strikethrough(text) {
    return text
        .split("")
        .map(char => char + "\u0336") // Add a combining long stroke to each character
        .join("");
}

return strikethrough(p1);
2 Likes
function strikethrough(text, taskCompleted) {
    if (taskCompleted) {
        return text
            .split("")
            .map(char => char + "\u0336") // Add a combining long stroke to each character
            .join("");
    }
    return text; // Return the original text if the boolean is false
}

return strikethrough(p1, p2);

Assuming you have a boolean as the “complete” value for your task, you can do it like this.

With p1 being your text, p2 being the boolean.

2 Likes

woahh… nicee works. I first tried a js code but that didn’t work… haha.

1 Like