-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Ability to instantiate editor without theme #5576
Comments
you can achieve this by using editor.container.classList.remove(editor.renderer.theme.cssClass) We probably could add myEditor.setTheme(null) as an alias for this, but it is unclear what to do with the |
@nightwing I see that this class brings different icons. We would definitely benefit if those icons are brighter on dark themes. So it would be a good to also have control over this class. Then only editor.registerTheme({ name: "myTheme", isDark: true, css: ??? });
editor.setTheme("myTheme"); Also these pop up in my mind:
|
Turns out it is already possible to do for svg icons we have we have not considered using css variables, but it may be useful as it would allow to not use long class names for tokens |
@nightwing that's great! Is it possible to fix the documentation, so that it is clear that we can use |
Describe the feature
Ability to instantiate editor without a theme, so that dynamic custom theme can be applied without interfering with the editor's default theme (textmate).
Use Case
We need to set a custom theme to the editor, that fits with the rest of the page and fulfills our product standards, Our custom theme is based on Less parameters, that can be configured by end users, This means that the theme cannot be build once and included in this repository, as the other themes are.
Proposed Solution
Since the editor already provides stable CSS classes and can be styled like:
we just need to turn off all the active styles of the editor's default theme. Something like:
Other Information
We are using the editor as part of the OpenUI5 project. Example can be seen here https://openui5nightly.hana.ondemand.com/entity/sap.ui.codeeditor.CodeEditor/sample/sap.ui.codeeditor.sample.CodeEditor
Acknowledgements
ACE version used
1.31.1
The text was updated successfully, but these errors were encountered: