First, grats on the huge release! The release notes seemed to go on forever!
Applying JS to MD is hopefully not related to modify the behavior of the editor. I doubt that this would be a viable concept for a commercial product, since it would create a support nightmare. If you need a modifiable editor, have a look at Emacs and Lisp.
As to what you can do with JS in MD: well, you don’t do anything to the MD, but rather to the HTML that it is rendered into. There, you have all the possibilities offered by JS and the DOM. I posted an example here some months ago that added checkbox syntax.
Thanks for the replies. I figured that was the case, but wasn’t sure if the editor was also a pseudo web-like view.
Now onto another question, is the webview that the markdown’s rendered into “sandboxed” from the rest of DEVONthink? As in, are there any APIs available that we can call from JS to access the inner workings of DT? (e.g. perhaps the AppleScript layer?). I’d expect this to be sandboxed but thought I’d check
Since DT is (probably) using Apple’s WebView component: no, you can’t. Fortunately. Otherwise, any website could execute whatever OSA command it wanted on your machine. So yes, it is sandboxed.