Skip to content

pieper/SlicerEditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlicerEditor

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()

image

You will get autocomplete suggestions based on the current Slicer session.

Press the slicer icon to run the code.

Notes

  • 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.

image

  • 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.

About

Experiments with embedding a text editor in Slicer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages