Closed CapitaineToinon closed 1 week ago
I believe @farnabaz made it work inside an embedded Monaco Editor
I felt down quite the rabbit hole looking into this. Apparently vscode supports text-mate configuration files out of the box but monaco does not. Seems to be possible to load those anyway using some wasm regex library but all the examples are old and not maintained. If someone has an example up and running, I would love to be able to take a look.
Hey @CapitaineToinon, Sadly, monaco does not support text-mate languages, instead it has its own way that called monarch.
You can use nuxtlabs/monarch-mdc
to allow highlighting MDC in monaco.
Yeah I figured, although projects like https://github.com/bolinfest/monaco-tm managed to get it working apprently. Microsoft has a vscode-oniguruma
package with a compiled wasm build that can be imported to then use vscode-textmate
directly with monaco but everything being just not documented I couldn't get it to work.
It's great if there is a monarch version though! I assumed such a package existed as I used nuxthub for a while. However that package is private? That like gives me a 404.
Oh okay seems to be accessible through npm and installs just fine. Thanks, will try that!
Yeah, may bad. It is not yet public, you can use it directly from npm https://www.npmjs.com/package/@nuxtlabs/monarch-mdc
Hello !
I've been looking at various markdown supersets and how to integrate them on a website through editors such as the monaco editor. As far as I understand, while monaco powers vscode under the hood, it's not possible to directly use such an extension with monaco. I'd love some direction if I'm wrong on that point though.
Allowing for this would be incredibly powerful in my opinion. Being able to store MDC content in a database and edit it through an admin dashboard would be great.
This project doesn't have discussions open so I'm opening a ticket instead, sorry about that.
Thanks for the help !