[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orion-dev] embeddededitor vs minimaleditor
|
Susan Franklin McCourt wrote:
Hi, John. The only doc is currently in the original bug reports.
Opened a bug to improve that. [1]
Minimal editor is intended to show bare minimum. No plug-in registry,
plugins, commands, services, etc. Also no assumptions regarding js,
css, html, no content assist or syntax highlighting, etc.
This gives you the bare editor widget + common keybindings, example of
showing problems in the annotation bar, etc.
Embedded editor adds the most common features one would expect if
editing js/css/html, including content assist and syntax highlighting.
It is still independent of the Orion service model (so, for example,
editor plug-ins would not work). The features were chosen based on
discussion in this bug [2]. I was assuming you would use
embeddededitor.html and then tell me what is missing...
Thanks!
However I am not able to get the editorContainer from the
embeddededitor. I can get the div with id 'editorContainer', but I can't
figure out how to get the object.
Note that I am 100% client side, I don't have access to change the
server (well of course I do at dev time, but not in deploy). I can
inject code into the web page, but the example/embedded.js is already
there. So the file embedded.html needs to be the embedded editor, not
the example code for it.
I guess I was imagining that instead of :
// if there is a mechanism to change which file is being viewed,
this code would be run each time it changed.
var contentName = "sample.js"; // for example, a file name,
something the user recognizes as the content.
var initialContent = "window.alert('this is some javascript example
XXXXXXXXXX code'); // try pasting in some real code";
editorContainer.onInputChange(contentName, null, initialContent);
syntaxHighlighter.highlight(contentName,
editorContainer.getEditorWidget());
// end of code to run when content changes.
there would be some kind of service registration call that would take
editorContainer and syntaxHighlighter. Then I could get these things
from the registry and control the embedded editor.
I'll try to figure out how to do this.
jjb