Is it possible to run code inside Drafts from Applescript or JavaScript For Automation ? I am thinking along the lines of TaskPaper .evaluateJavaScript method. If that is not currently possible, I think it will bring many possibilities.
For example, perhaps running this code in Script Editor:
Application('Drafts 5').evaluateJavascript(`
(() => {
'use strict';
const d = Draft.create()
return (
d.content = s,
d.update(),
d
)
})();
`)
@agiletortoise, is it possible to return values from AppleScript ?