Skip to content

Instantly share code, notes, and snippets.

@teknogeek
Last active September 19, 2018 19:22
Show Gist options
  • Save teknogeek/a76b19e1f825d789df56 to your computer and use it in GitHub Desktop.
Save teknogeek/a76b19e1f825d789df56 to your computer and use it in GitHub Desktop.
Ace Browser Editor

Change e.getSession().setMode(...) to "ace/mode/<language>" where <language> is your preferred programming language to have proper syntax highlighting. Then copy and paste the code into your browser bar and edit away :D.

data:text/html,
<div class="e" style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;" id="editor"></div>
<script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
	var e = ace.edit("editor");
	e.setTheme("ace/theme/monokai");
	e.getSession().setMode("ace/mode/javascript");
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment