Browse Source

wip toolbars

master
KaiSD 5 years ago
parent
commit
3df5322bea
1 changed files with 29 additions and 22 deletions
  1. +29
    -22
      ace/index.html

+ 29
- 22
ace/index.html View File

@@ -22,7 +22,24 @@
</style> </style>
</head> </head>
<body> <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 src="src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<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; window.editor = editor;
</script> </script>


Loading…
Cancel
Save