Skip to content
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

Accept an object as mode #1001

Merged

Conversation

karamosky
Copy link
Contributor

What's in this PR?

Accept mode as object or string

List the changes you made and your reasons for them.

React-ace forces me to use a syntax mode defined in this namespace: "ace/mode/?" whereas Ace setMode can accept both strings and objects. It allows us to inject a custom Ace.SyntaxMode for example or use another defined in another namespace with:

{ path: "path/to/mode" }

References

Ace repo:

var JavaScriptMode = ace.require("ace/mode/javascript").Mode;
editor.session.setMode(new JavaScriptMode());

@securingsincity
Copy link
Owner

Thanks @karamosky this is live in v9.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants