HTML


<div class="split-panel-container" data-bind="panelSplitter: true">
    <div class="column-left">
        <div class="content-panel">
             <pre><code>
			 &lt;span&gt;Hello World!&lt;/span&gt;
			 </code></pre>
        </div>
    </div>
    <div class="drag-handle"></div>
    <div class="column-right">
        <div class="content-panel">
					
					<pre><code>
					&lt;div&gt; ++ html ++ &lt;/div&gt;
					</code></pre>

        </div>
    </div>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/knockout/2.3.0/knockout-min.js"></script>


CSS


/*
** Splitter
*/
* {
  margin: 0;
  padding: 0
}

body, html {
  height: 100%
}
.split-panel-container {
  width: 100%;
  height: 100%;
  display: table;
}

.drag-handle {
  width: 10px;
  background-color: #f0f0f0;
  cursor: ew-resize
}

.split-panel-container > div {
  display: table-cell;      
}

.column-left, .column-right {
  background-color: #e0e0e0;
  overflow: hidden;
  position: relative
}

.content-panel {
  position: absolute;
  font-size: 0.87rem;
}



JS


ko.bindingHandlers.panelSplitter = {
    init: function(element, valueAccessor) {
        $(element).find(".drag-handle").on("mousedown", function (e) {
            element.initialWidth = parseInt($(element).find(".column-left").width(), 10);
            element.startX = e.screenX;
            element.dragging = true;
        });
        
        $(document).on("dragstart", function (e) {
            return !element.dragging;
        });
        
        $(document).on("selectstart", function () {
            return !element.dragging;
        });
        
        $(document).on("mouseup", function () {
            element.dragging = false;
        });
        
        $(document).on("mouseleave", function () {
            element.dragging = false;
        });
        
        $(document).on("mousemove", function (e) {
            if (element.dragging) {
                var width = element.initialWidth + e.screenX - element.startX;
                width = Math.max(width, 1);
                $(element).find(".column-left").css("width", width + "px");
                element.lastX = e.screenX;
                return false;
            }
        });
    }
};
ko.applyBindings();




CodePlay Playground as you play with the keyboard:

Console

The CodePlay Code Box Editors Playground is very simple to use, anyone can directly interact with a minimum of knowledge of HTML experience, live an idea or a project. We believe that only 5% of the developers has the full capacity and knowledge of each key on the keyboard. Therefore we decided to put together a single command from the Key [Esc] == 27.
For every need and every situation the keyboard [Esc] key fixes and puts in place the Original Initial Code Box Editors.
All this without losing the contents of each Box Editors .
!Enjoy your CodePlay.


CodePlay Playground is a project based on WordPress entirely revised to have a clean and dynamic HTML output.

Editor:

- [Esc] To reset the Box Editors and the closure of any open window overlay, including the Output (FULL) Preview.

New! - Double Click to Expand /Open & Close All Box Editors

New! - Ctrl + Up/Down to Show /Hide the Footer Bar. This allows hide footer bar when you want, + ESC to Back.

New! - Preview in Full page is now also possible via dblClick on the Vertical Drag-bar. Each keyboard action can be Reset via the ESC button.


Ex.
- Close this? [Esc], or a Click outside.


Front End User - New /Save Post is Now Open, Register *required.
New Play Now