Switch Syntax Highlighting Action

I’m sort of a noob at Drafts, but I’m interested in making a keyboard action that switches the syntax highlighting between Markdown and TaskPaper. I would assume that JavaScript is the way to go about this, but I’m not sure. I don’t know the basics of JavaScript myself, so I haven’t begun to look at the guide for using it in Drafts (though with Omni implementing JS automation in OF3, I really should invest the effort).

Is JavaScript the right way to approach this? Does anyone have an example of a starting place I might edit the code for to make it work (without really knowing much?)

I wrote one for you: https://actions.getdrafts.com/a/1G6


Thanks so much! Wanted to express a little more gratitude than "heart"ing your post

1 Like