I would love to be able to have syntax highlighting in the TextArea widget. I have a notebook where I'm asking users to write some code and manipulating the code with some python routines and showing the output.
Is there any way for me to enable syntax highlighting in the textarea widget ? Or is there some other widget I can use for this ? CodeMirrorWidget or so ?
You'll need to write a custom widget using codemirror (or some other code editor). We use a standard html textarea in ipywidgets, which does not have syntax highlighting. That sounds like a great custom third-party widget!
You can use the widget cookie cutter to get started: https://github.com/jupyter-widgets/widget-cookiecutter
That sounds like a great custom third-party widget
It would definitely be great! Would this be something we want as a core widget?
I'd rather keep the core widget set smallish, and encourage a strong ecosystem of third-party widgets, especially at a time like this when the ecosystem needs to grow.
I'd rather keep the core widget set smallish
To elaborate, I see the core widget set as basically providing wrappers around standard browser form controls.
I'd rather keep the core widget set smallish, and encourage a strong ecosystem of third-party widgets, especially at a time like this when the ecosystem needs to grow
sounds like a good plan. (also means that should be more careful about breaking things).
Closing as answered.
Most helpful comment
To elaborate, I see the core widget set as basically providing wrappers around standard browser form controls.