xtext.createEditor issue by using orion codeEdit plugin [message #1733202] |
Wed, 25 May 2016 07:18  |
Eclipse User |
|
|
|
I'm trying to create web editor by using Orion CodeEditor 11.0 and above.
But unfortunately, I found when I call xtext.createEditor() twice to create two editors separately, it always failed.
require([ "orion/code_edit/built-codeEdit-amd" ], function() {
require([ "xtext/xtext-orion" ], function(xtext) {
xtext.createEditor({
baseUrl : baseUrl,
...
position : "absolute",
sendFullText: onlyInBrowser
}).done(function(editorViewer) {
editorViewer.xtextServices.successListeners.push(handleSuccessResponse);
editorViewer.xtextServices.errorListeners.push(handleErrorResponse)
Actually, I know xtext.createEditor() can create multi editors during one invocation.
But what I want to do is to create these editors on demand and dynamically.
After I search for Orion CodeEditor example and source code, I found, Orion CodeEdit couldn't be new twice in the same document/page.
That means (I think), in xtext-orion.js, the following statement will introduce problem.
var startupOptions = options.startupOptions;
if (!startupOptions)
startupOptions = { defaultPlugins: ['webToolsPlugin.html'] };
--> var embeddedEditor = new mEmbeddedEditor(startupOptions);
var editorData = [];
Does any one meet the same problem? Or any one knows how to fix this?
BTW, it seems, xtext-orion.js can't work with orion editor 10.0. But I can't find where to mention this limitation.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08133 seconds