|
|
@@ -22,7 +22,24 @@ |
|
|
|
</style> |
|
|
|
</head> |
|
|
|
<body> |
|
|
|
<div id="editor"></div> |
|
|
|
<div class="wrapper"> |
|
|
|
<div class="outer"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-sm-12 sp toolbar tab-pane" id="htmPane"> |
|
|
|
<div class="toolbar"> |
|
|
|
<button id="btnSave" class="btn btn-primary btn-xs">save</button> |
|
|
|
<button id="btnUndo" class="btn btn-primary btn-xs">undo</button> |
|
|
|
<button id="btnRedo" class="btn btn-primary btn-xs">redo</button> |
|
|
|
</div> |
|
|
|
<div class="pane-settings"><button class="btn btn-primary btn-xs"><i class="glyphicon glyphicon-cog"></i></button></div> |
|
|
|
<div class="pane-label">html</div> |
|
|
|
<div class="inner" id="editor"></div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div><!--/row--> |
|
|
|
</div><!--/outer--> |
|
|
|
</div><!--/wrapper--> |
|
|
|
|
|
|
|
|
|
|
|
<script src="src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script> |
|
|
|
<script> |
|
|
@@ -69,27 +86,17 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
buildDom(["div", { |
|
|
|
class: "toolbar" |
|
|
|
}, |
|
|
|
["button", { |
|
|
|
ref: "saveButton", |
|
|
|
onclick: save |
|
|
|
}, "save"], |
|
|
|
["button", { |
|
|
|
ref: "undoButton", |
|
|
|
onclick: function() { |
|
|
|
editor.undo(); |
|
|
|
} |
|
|
|
}, "undo"], |
|
|
|
["button", { |
|
|
|
ref: "redoButton", |
|
|
|
onclick: function() { |
|
|
|
editor.redo(); |
|
|
|
} |
|
|
|
}, "redo"] |
|
|
|
], document.body, refs); |
|
|
|
document.body.appendChild(editor.container) |
|
|
|
$('#btnSave').click(function(){ |
|
|
|
save(); |
|
|
|
}); |
|
|
|
|
|
|
|
$('#btnUndo').click(function(){ |
|
|
|
editor.undo(); |
|
|
|
}); |
|
|
|
|
|
|
|
$('#btnRow').click(function(){ |
|
|
|
editor.redo(); |
|
|
|
}); |
|
|
|
|
|
|
|
window.editor = editor; |
|
|
|
</script> |
|
|
|