Skip to main content

Command Palette

Search for a command to run...

Implementing VS-Code on my website

P.S. It was pretty easy

Published
2 min read
Implementing VS-Code on my website

So You would have seen these websites with a full blown vs-code like text editor built into them right ? I mean look at websites like codesandbox or codedamn . Well my current project has a code editor need well there are a few options out there. Here's my journey of getting an actual vs-code like editor on the site.

1. DIY

Bad bad bad idea, I mean maybe with a couple of years in my hand could have been able to do it but no no no no.

2. Hacking with Hightlight.js

This was a better idea but still wasn't good, I was basically trying to capture user key presses and do some DOM manipulation to put them a in div which was running highlight.js . Well this solution worked sort of but 1 it was very very buggy and 2 it was a half baked solution.

3. Ace/Brace Editor

These turned out to be good alternatives to vs-code but they liked features and in general didn't a very convincing feel, apart from there lack of contextual autocomplete and visual appearance these were great choices

4. Monaco Editor

This is Microsoft's original veriosn of the viscose editor with all the quirks and features. Embedding this was fairly simple a two liner config change for Nuxt just to add a loader for it's ism files and voila it worked like a charm. ss1.png

G-notify

Part 1 of 2

Talking about journey building a HTML based emailer using G-Mail APIs

Up next

Nuxt on Netlify

Learning a lot more about the SSG aspect of Nuxt

More from this blog

W

WatchIreshStruggle a small blog covering flutter and general dev experiences of @iresharma

18 posts

Hey there, I am a Computer Science undergrad from The National Institute of Engineering, Mysore. I freelance while working at Twilio as Software Developer Engineer (l1).