Experiment to embed an editor in Slicer.
Currently uses ths monaco editor (the one used in VSCode) in a qSlicerWebWidget.
To try this in Slicer, use a Slicer preview newer than March 5, 2024 (where this feature is available).
Then paste the following in the python console:
editor = slicer.qSlicerWebWidget()
editor.size = qt.QSize(900, 750)
editor.url = "https://pieper.github.io/SlicerEditor"
editor.show()
You will get autocomplete suggestions based on the current Slicer session.
Press the slicer icon to run the code.
- Running code from web pages in Slicer is a possible security issue, so you must approve with the dialog. Use care when accessing untrusted pages using the qSlicerWebWidget infrastructure.
- This is just a skeleton prototype as a proof of concept. See this dicussion for more ideas about how this can be improved to be useful.