-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getRawOptions is not compatible with older getConfiguration #1734
Comments
There is |
The internal/computed editor options are not in the API anymore. That is because they have been internally migrated to an array/enum based system, and the enum values are expected to change all the time... So hard coding 65 is dangerous and will very likely break with future releases. Moreover, I thought that since the editor respects the passed in options, and never changes the options by itself, it is easy for someone to keep track on the outside, e.g. let isReadOnly = false; // tracks the readOnly state of the editor
function makeReadOnly(editor) {
isReadOnly = true;
editor.updateOptions({ readOnly: isReadOnly });
}
function makeEditable(editor) {
isReadOnly = false;
editor.updateOptions({ readOnly: isReadOnly });
} |
What if the enums were exposed in the |
+1 to these concerns. We are using |
Thanks! Is the plan to include this commit in 0.19.3? |
@trevorade It is included in 0.19.3 |
monaco-editor version: 0.19.0
Browser: Any
OS: any
Playground code that reproduces the issue:
Expected: The result should have all the supported options in the editor.
Actual: It returns only those values that have been explicitly set/updated.
If this is already the expected behavior, how can I actually access other option's values. In my particular use case, I need to check if the editor is read-only or not.
The text was updated successfully, but these errors were encountered: