"editor"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html lang='en' class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/arianalynn/pen/MyLmqv?limit=all&page=17&q=editor" /> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css'> <style class="cp-pen-styles">* { margin: 0; padding: 0; box-sizing: border-box; } body, html { overflow: hidden } .editor { display: inline-block } .editor_code textarea { width: 30vw; height: calc(100vh/3); margin-bottom: -5px; resize: none; outline: 0 !important; padding: 60px 10px 10px; overflow-Y:scroll; background:rgb(230,230,230) } .editor_code:before { position: absolute; width: calc(30vw - 30px); padding: 15px 15px; font-family: monospace; font-size:15px; background: rgb(50, 50, 50); color: rgb(220, 220, 220); text-transform:uppercase } .editor_code:nth-of-type(1):before { content: "html"; } .editor_code:nth-of-type(2):before { content: "css"; } .editor_code:nth-of-type(3):before { content: "javascript"; } .editor_code textarea:nth-of-type(1) { height: calc(100vh/3 + 1px); } .viewer { display: inline-block; vertical-align: top; } .viewer iframe { width: 70vw; height: 100vh; border: 0 } .run { position:fixed; top:20px; right:20px; padding:10px; border:4px solid rgba(170,170,170,0.8); background:rgba(90,90,90,0.8); color:white; border-radius:4px; cursor:pointer; font-family:monospace } a.run { text-decoration:none; bottom:20px; top:auto; }</style></head><body> <div class="editor"> <div class="editor_code co_html"> <textarea id="h"><h1>Title</h1> <p> This is text in a paragraph. It can be <big>big</big> or <small>small</small>. It can be <b>bold</b> or <i>italic.</i> </p> <button>Button</button> </textarea> </div> <div class="editor_code co_css"> <textarea id="c"> button { background:yellow; } </textarea> </div> <div class="editor_code co_js"> <textarea id="j"> //We'll learn this later </textarea> </div> </div><div class="viewer"><iframe id="iframe"></iframe></div> <button class="run" onclick="Run()"><big><i class="fa fa-refresh"></i> Load</big></button> <a class="run" target="_blank" href="https://codepen.io/collection/DYwpEG/">View Code Samples</a> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script> <script >function Run() { var html = document.getElementById('h').value; var css = '<style>' + document.getElementById('c').value + '</style>'; var js = '<scr' + 'ipt>' + document.getElementById('j').value + '</scr' + 'ipt>'; var doc = document.getElementById('iframe').contentWindow.document; doc.open(); doc.write(html + css + js); doc.close(); } //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: