Skip to content

Instantly share code, notes, and snippets.

@rotten77
Created September 25, 2018 07:02
Show Gist options
  • Save rotten77/bea439ef9f9d97a98be60b2ea96f260a to your computer and use it in GitHub Desktop.
Save rotten77/bea439ef9f9d97a98be60b2ea96f260a to your computer and use it in GitHub Desktop.
data:text/html,
<style type="text/css">
#e{position:absolute;top:0;right:0;bottom:0;left:0;}#m{position:absolute;top:0;right:0;z-index:1000;}
#m,option {width:100px;height:auto;margin:0;padding:4px;font-size:12px;background:#000;color:#fff;border:0;cursor:pointer;}¨
</style>
<div id="e"></div>
<select id="m" onchange="e.getSession().setMode('ace/mode/' + this.value );">
<option value="html">HTML</option>
<option value="javascript">JavaScript</option>
<option value="xml">XML</option>
<option value="php">PHP</option>
<option value="python">Python</option>
</select>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js" type="text/javascript" charset="utf-8"></script>
<script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.setOptions({fontSize: "12pt" });e.getSession().setMode("ace/mode/html");</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment