Create a custom form based editor theia extension #13610
Replies: 1 comment 1 reply
-
Hi @dagoston93,
That's a good point, there is not really a simple example of an "editor-like" view. The existing examples, like this widget and this yo widget generator, focus on singleton views. However "editor-like" views are typically multi-instance and tied to specific files. The existing examples like the tree-editor are very complex compared to what is needed at bare minimum.
Good catch! Since an Inversify update a few versions ago this error will be shown. Note that the
The example showcases the The area of the view is configured via this:
Adapting this to The I would heavily recommend to check the implementation of Note that For integrating with save support, you can implement the My suggestion is to go step by step and orient yourself on how the existing views/editors in the Theia codebase are implemented and following their example. In the long run it would be nice to have a self-contained "editor" example available, either in the |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am trying to create a custom form based editor, that needs to have a couple of text inputs, and a couple of buttons.
I need to associate it with a certain file type, and need to be able to save/load data into that file type. (Basically a json file.)
I managed to create this as a VSCode plugin, but I need to write it now as a Theia Extension instead.
I am struggling a lot, because I cannot find a simple example on how to do it.
I used Yo to generate the TreeViewEditor example, and also had a look at the included Monaco text editor but both of them is very complicated, and takes way too much time to understand how they work. So I am wondering if there is a simple example available somewhere online, or if someone could provide me with a very simple example...
I tried the widget example on the Theia website, but first of all it did not even work, because when you bind your widget to WidgetFactory you have to use getAsync() instead of get(), otherwise you get errors on the console, that you are trying to instanciate a widget that has async dependencies in a synchronous way. (it is due to the @PostConstruct() decorator used).
Also the example shows and says that the widget created appears between the editors and has an entry in the view menu, but for me it shows on the left side, where the Project Explorer is, and no entry in the view menu.
So all in all I cannot find easy to understand example on this, but I might be overlooking or missing something.
I would appreciate any kind of help.
Thanks in advance,
BR,
Agoston
Beta Was this translation helpful? Give feedback.
All reactions