asciidoctor-extensions-lab
asciidoctor-extensions-lab copied to clipboard
Create an extension to execute JavaScript code in the browser
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.
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).
Interesting to note that we might be able to support Ruby execution via Opal :)