iodide-project / iodide

Literate scientific computing and communication for the web
Mozilla Public License 2.0
1.49k stars 141 forks source link

Add outputhandler to a plugin definition #1702

Open jeffmcwhirter opened 5 years ago

jeffmcwhirter commented 5 years ago

e.g.: %%js function processLispOutput(r) { if(r.val) return r.val; return Utils.formatJson(r); }

%% plugin { "languageId": "lisp", "displayName": "Microtalk Lisp", "url": "https://ds604.neocities.org/js/microtalk.js", "module": "MICROTALK", "evaluator": "evaluate", "pluginType": "language", "outputHandler":"processLispOutput" }

bcolloran commented 5 years ago

this goes nicely with the "depends" proposal in #1712, and is also a nice idea.

PR welcome! if you're interested we can discuss details :-)