Skip to content

v0.1.0

Latest

Choose a tag to compare

@hades2510 hades2510 released this 23 Jun 18:05

This is a stripped down version of theia. It features the following:

  • monaco code editor
  • no side panels
  • no status bar

How to use

  • download both lib.zip and plugins.zip
  • unzip plugins.zip
  • unzip lib.zip
  • from the unziped root of lib.zip run node ./backend/main.js --plugins=local-dir:/path/to/unziped-plugins
  • now you should be able to access http://localhost:3000 and see theia being loaded

Options

  • you can use --port when starting the BE to change the port. Something like this node ./backend/main.js --port 3002 will start the editor on port 3002
  • most likely you want to open some xeto files when the editor starts. The fastest way is to create a .theia-workspace file and fill in the paths to the files that you want to be opened in the editor. Then you need to access http://localhost:3000/#/path/to/.theia-workspace. The editor will open the files at start.

Theia workspace

.theia-workspace are theia's way of using workspaces. The files is a simple json file that mostly deals with root folders and opened files.

Here's a sample file that has 2 opened files

{
 "folders": [{
    "path": "file:///path/to/root/folder"
  }],
 "openFiles": [
    "file:///path/to/root/folder/first.xeto",
    "file:///path/to/root/folder/sub_folder/second.xeto"
  ]
}

Embed

You can also embed the editor in another html page if you want to.

The fastest way would be to use an iframe and point the src to something similar to this http://localhost:3000/#/path/to/.theia-workspace.

Here is a screenshot of the editor started with the plugins, loading a workspace embedded inside another html file.
Screenshot 2024-06-23 at 20 29 38