Runmode Standalone Callback

For the runmode addon, I’m not sure if this was intentional or a discrepancy in documentation, but in the runmode-standalone, the callback parameter only takes in an html element instead of either an html element or a callback function.

I’m using the runmode-standalone to compute span decorations in a ProseMirror CodeBlock node, so that’s why I want to runmode option of taking in text content and returning an array of {text, style} elements.

I think that feature was added to the main runmode script after the standalone was was forked off. A pull request that adds it to the standalone script would be welcome.

1 Like

Ok, I’ve submitted a PR with updates from runMode.js to runMode-standalone.js to the CodeMirror repo: