Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] TextView - Changing and updating Options at runtime

> Hi,
>
> My name is Mamadou Lamine Ba. I'm presently moving my IDE in the
> cloud and I have successfully integrated the Eclipse Orion editor into
> my application. And since I have the concept of a virtual editor
> which can integrate any _javascript_ source code or WYSIWYG editors, I have
> also integrated ACE, CodeMirror and EditArea. And as my first
> feedback, your editor is by far the most amazing even without
> theming and the support for the other languages.



Really good to know. Thanks for your feedback.


>
> One of my questions is : why the TextView does not update itself
> when I change its configuration  at runtime via the setOptions method.

>
> tab.setConfig=function(key,value){
> editor.getTextView().setOptions({key:value});
> };



This should work properly. It seems the bug is in the tab.setConfig() function because If I put a breakpoint in TextView.setOptions(), it gets called with an object like this:

{
        key: true
}

It should be something like:

{
        readonly: true
}

Does this work better?

tab.setConfig=function(key,value){
  var options = {};
  options[key] = value;
 editor.getTextView().setOptions(options);
};


Silenio

Back to the top