Hi
I am trying to create an xtext web editor using Ace in a div with an id other than xtext-editor. I have tried the following
editor = xtext.createEditor({
xtextLang: "infomodel",
syntaxDefinition: "xtext/mode-infomodel",
serviceUrl: "/infomodel/xtext-service",
enableFormattingAction: "true",
showErrorDialogs: "true",
parent: "xtext-editor-parent"
});
<div id="editor-container">
<div data-editor-parent="xtext-editor-parent"></div>
</div>
This method does not create an xtext editor in the div.
I have also tried using the following method
editor = xtext.createEditor();
xtext.createServices(editor,{
xtextLang: "infomodel",
syntaxDefinition: "xtext/mode-infomodel",
serviceUrl: "/infomodel/xtext-service",
enableFormattingAction: "true",
showErrorDialogs: "true",
parent: "xtext-editor-parent"
});
This gives an error:
xtext-ace.js:1486 Uncaught TypeError: this.editor.getSession is not a function
Could someone please help me with this
Thanks
Shiv
[Updated on: Wed, 06 July 2016 17:53] by Moderator
Report message to a moderator