Alternera. Plugins. Javascript. EditorMode
(alternera_plugin_javascript v0.9.0)
Copy Markdown
View Source
The JavaScript step's colouring in the proxy's code editor: a colocated
hook whose module code registers the language "javascript" with the
editor when app.js loads (window.AlterneraEditorModes, read by
the proxy's assets/js/lua_editor/registered_modes.js). The hook itself
does nothing and no element uses it.
The parser is CodeMirror's legacy JavaScript mode, copied into this
module with its MIT notice: a package's hooks cannot import the proxy's
npm packages (esbuild does not look in the proxy's node_modules for
them), and a plugin ships what it needs. The mode imports nothing, so it
brings no CodeMirror into app.js.