asciidoctor-extensions-lab icon indicating copy to clipboard operation
asciidoctor-extensions-lab copied to clipboard

Create an extension to execute JavaScript code in the browser

Open ggrossetie opened this issue 8 years ago • 2 comments

This could be really useful when writing documentation for a JavaScript library. The extension will search for JavaScript source code blocks and add a link/button "Run this code in your browser" to execute the code and print the result in the browser.

ggrossetie avatar Mar 13 '16 13:03 ggrossetie

This is something I've always envisioned being part of the source block. Perhaps we can add an "interactive" option to source block and use a Treeprocessor to add a "run this code" button and output area. That way, it wouldn't just be specific to JavaScript (though we could start there).

mojavelinux avatar Mar 13 '16 20:03 mojavelinux

Interesting to note that we might be able to support Ruby execution via Opal :)

mojavelinux avatar Mar 13 '16 21:03 mojavelinux