Hello every body,
I am a user of theia for couple of weeks and have started to learn about writing theia extensions for just 3 days. So, if there is a way to do the thing below already please tell me
My aim is securely register any third party editors(like svg-edit, custom editors, image editors etc.) over sandboxed iframe via window.postMessage and onMessage protocol. And open the extension to community offcourse
I think this way has many advantages:
-
it will run under different scope and process in the client side
-
any web based editor which implements a small message handling routine can integrate easily
-
editor can run in different process in server side (my sample is just a client side code) and also can serve from different domains (may be as a free/paid service)
-
it is safe beacuse it is fully sandoxed expect some permitted operations like;
- opening given data (data exchange over client side)
- sending the edited data to save (data exchange over client side)
- requesting a dependent file resource under permission and/or file type filters (for example an xml file can include other xml file in the file tree)
-consuming file change, find/replace events
- reflecting permitted keystrokes
- etc.
I have started to digging around and wrote that extension based on hello-world template and inspired from mini-browser package and can handle just open requests for now. However I am not sure that if the mini-browser code-base is a good place to start or need to start somewhere else (using editor package like monaco??)
I am open to ideas, support, help and contribution offers or I can join any existing efforts.
Thanks.
Note: the graphml editor in the picture is another project of mine based on bpmn.io’s diagram-js which isn’t published yet.
[original thread by Mobula Mobular]