-
Notifications
You must be signed in to change notification settings - Fork 7
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
Using Monaco Editor for the website preview #1
Comments
A good start would be to understand exactly how the tmTheme format is converted to json for consumption by vscode/monaco currently within VSCode. I would currently be happy with an offline process for converting tmTheme to monaco format json if it is not possible to do it in-browser. Could anyone point us in the right direction? EDIT The above looks promising, if anyone wants to explore this further. |
Hi, tmTheme is vscode specific and I don't think it is monaco editor specific. VSCode internally converts tmTheme into monaco token style. If you are confused between a standard All of the above are vscode specific. VSCode can use both json and tmTheme without any problem. Internally it will do something to style up the monaco editor (which has its own rule and doesn't understand PS: May I ask what you are trying to achieve here? Maybe I can help. |
You could use shiki: http://shiki.matsu.io - if you're ok with it being read only, we use it on the typescript website v2 |
This is great. Thank you very much 😄 |
The site is now using shiki. |
Currently I am using ace editor for previewing the color themes in browser. While it works great, there are several limitations especially with the tokens.
Instead we can use the monaco editor which powers VSCode itself. But there are a few issues.
If anybody would want to conduct some experiment, feel free to do so. Here are a few tips which I believe would come in handy.
site/
withyarn eject
and place the custom webpack plugin needed for monaco.*-color-theme.json
files to monaco. The tokens and foreground/fontStyle etc are already there. If only monaco could support it directly the conversion would be pain free. But I don't think this is the case.All this being said, personally I am not able to spend my time on this. But if you want to conduct some insane experiment and in return receive a superb round of applause please do so.
/cc @acheronfail
The text was updated successfully, but these errors were encountered: