Creating an action to replace ☐ with [ ]?

Hi Everyone,

I have a mourning routine that includes creating a set of to-dos in Day One. I used to be able to copy over the list of items with checkboxes over to drafts with no problem, but they recently moved away from markdown. I now get ☐ for each task which can’t be checked off in Drafts.

Is there a way to create an action that would automatically replace all ☐ with [ ]? I found some that prompt you for the text you want to replace, but that would require too many steps and would be a hassle on ios. I want the action to automatically swap out the checkbox character with the brackets so I can check them off in drafts.

Try this Fix Checkboxes action. It is a single script step like this.

draft.content = draft.content.replace(/☐/g,"[ ]");
draft.update():

The first line says to update the contents of the draft by globally replacing all occurrences of the square character with the Drafts checkbox markers. The second line indicates changes are to be applied.

You may need to amend the action and replace the square character in the first line. I copied this directly from your post, but there is a chance it might be slightly different to what you have in your draft. Just give it a try and replace if required.

Hope that helps.

Thank you so much sylumer! I see how they did this now. This has been bugging me for months.