anywidget
anywidget copied to clipboard
[Suggestion] Provide magics for authoring JS/CSS in separate cells (with better syntax highlighting/etc)?
Thanks folks for the great project! This seems like a wonderful advance for the Jupyter widgets ecosystem, I only discovered it recently.
I had one small suggestion - I'm not very fond of the workflow of bundling JS/CSS inside strings when authoring classes, as in general writing code inside strings loses syntax highlighting, natural indentation, etc.
I wonder if you'd consider providing a couple of magics that could allow for a workflow such as:
In this (mock-up) example I used globally named variables (cw_esm
, cw_css
) that would be injected into the namespace, but they could also be cached somewhere else, that's a later design decision.
Anyhow, just an idea - I'll play more with the library regardless, thanks again for your contribution to the Jupyter ecosystem!