-
Notifications
You must be signed in to change notification settings - Fork 13
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
how to pass configuration options? #7
Comments
It's currently undocumented but the I can add more attributes to set options during creation if there is something specific you'd like to add. Current hardcoded options are |
options i run with: options={{
minimap: {
enabled: false
},
tabSize: 2, // important!!
fontSize: 16,
wordWrap: "on",
lineNumbersMinChars: 3,
wrappingIndent: "same",
mouseWheelZoom: true,
copyWithSyntaxHighlighting: false
}} probably worth it to passthru some of these? idk. there are a lot of options. |
Thanks for the feedback. I'll look into adding these. I have a pretty good pattern in place for mapping attributes so I don't think it'll take much to incorporate most/all of them. |
The |
The |
nice! do you think it makes sense to keep including one by one, or is there a way to simply mirror everything monaco offers? i dont know the impl detail so just want to suggest this so that you're not doing too much manual mapping |
Yes. I'll add an I'd expect the attributes will work for the 'common' case where users just want to dump a code editor pane onto their website. In that case, having a subset of attributes works perfectly. The downside to this approach is it requires another HTTP request. Not ideal for users who want to embed a ton of For the 'exceptional' use case where users may want to build a fully featured editor, a JSON file can be fetched to pull in a complete set of config options. Modifying options during runtime is already covered, since the |
The |
The |
The Note: I like this a lot better as a default. I seriously doubt most users will be posting <1kLOC on a website. Those who do will have the advanced configuration option soon. |
The Note: Another good option to enable by default |
I can't seem to get 'copyWithSyntaxHighlighting' to include syntax highlighing, even if I explicitly enable it. The version of Monaco currently in use (18) should have the option available. I'll check again once I bump Monaco to 20 and default it to false if it is defaulted to true. |
The |
The Advanced Configuration API is included in v1.10.0 |
That should cover all the bases. Do you have any other suggestions before I close this? |
no. i think you've made very, very good calls here. nicely done! |
Hi, i think this project is great! just an obvious question to ask before i evaluate whether i can use it - how do you pass configuration options to monaco? it doesnt seem possible from the docs.
The text was updated successfully, but these errors were encountered: