When the latest version of Drafts for iPhone was released, I spend some time writing Actions and Script Keys to optimize my text capturing workflow to my needs. I quickly became annoyed with the limited editing capabilities of the script editor within Drafts. To deal with that, I started to write my scripts in Drafts itself and used an Action to quickly convert the draft to a new Script Action or Script Key. That worked for a while, but with the scripts getting more complex, I started to miss the additional syntax highlighting, keyboard shortcuts and other conveniences my desktop environment provides. So I started to program there, sync the code to my phone and copy it into the appropriate script action. Again, this quickly became annoying, because of the many steps involved to test small code changes.

So finally I decided I wanted to have the possibility to write my code on the desktop and somehow directly test it there, before deploying it to Drafts on my phone. The result of that is a kind of "Drafts-IDE", that allows you to do just that. It is a webpage with a draft, a code editor and a run button that executes the code as either a Script Key or an Action. The complete development environment runs on a single page and can be used offline.  It should support most of Drafts features, though some (like parsing template tags) are limited.

Since the app helped me develop more complex workflows for Drafts, I spent some time to clean up the code and published it on GitHub: https://github.com/jneug/drafts-sim

To test the editor I you can use it online at http://drafts.neugebauer.cc. Hopefully the editor will encourage others to develop cool actions and keys for Drafts. I will publish some of mine in the near future, as soon as I find the time to write up some descriptions for them.