Hi!
On my quest to replace TextExpander (specially on iOS) with built-in Drafts features, I’m struggling with how to imitate some TextExpander macros that run some JS as part of the expansion.
For example, I have one that creates a template for review emails, that has this format
---
title: Weekly Report %snippet:;wsfriday%
date: %Y-%m-%d
to: [EMAIL ADDRESSES]
---
Weekly Report for week %date:ww%, ending %snippet:;nxtsun%
And the interesting parts are:
%snippet:;wsfriday%
runs a TextExpander Macro that is a JS that gets the date of “next Friday” (example output: Aug. 01, 2025
)
%snippet:;nxtsun%
: Similar but gets next Sunday date (example: August 03, 2025
)
And %date:ww%
provides the week number of current week (31
)
I can create an expansion using tags that give me the rest of the data (for example the date:
line), but not for these three things (specially the weekdays dates)
What’d be the best approach to get something like this that I could run/insert in another draft?
Thanks!