Your DSL editor on the Web
In this section, we briefly show the mechanisms of Xtext that allow you to port the editor for your DSL to the web. The web editor for your DSL will be implemented in JavaScript. This editor will then communicate to a server side component, which implements all Xtext related aspects. The server consists of a Java servlet and communications take place through HTTP requests. This way, the runtime implementation of your DSL will be reused by the server-side component and UI aspects will be rendered on the web accordingly. The set of UI features available on the web editor depends on the JavaScript text editor library being used. The default one is Ace, but Orion and CodeMirror can also be enabled. For further details and more advanced features, we refer to the Xtext documentation, section Web Editor Support.
Let's create a new Xtext project:
- Project name:
org.example.hell oweb
- Name:
org.example.helloweb.HelloWeb
- Extensions:
helloweb
- Press Next.
- In the next page, select...