DEV Community

Arnav Bansal
Arnav Bansal

Posted on

I'm looking for an embeddedable code editor. Preferably one that looks great.

I'm creating an online demo for a web technology. I need an editor that can highlight at least JavaScript. Edit functionality isn't a must.

But it must look fabulous.

What's the go-to editor for this?

Top comments (3)

Collapse
 
rdumais profile image
Ryan

I'm thinking TinyMCE. I use it on my blog when I need to post code snippets. Works great and does what I need it to.

tiny.cloud/

Collapse
 
bennypowers profile image
Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฆ

For just highlighting, you might want to use the marked-element webcomponent, which has a syntax-highlight event that you can listen to in order to highlight the rendered markdown.

Collapse
 
bennypowers profile image
Benny Powers ๐Ÿ‡ฎ๐Ÿ‡ฑ๐Ÿ‡จ๐Ÿ‡ฆ

<monaco-editor> looks good but uses polymer 2 i.e. HTML Imports and bower. Perhaps the author could be convinced to update to polymer 3 with es modules and npm

<ace-widget> is installed with npm and loaded with modules, supports code highlighting, check out the demos where they have a JS editor