Browse Source

Изменить 'ace/index.html'

master
KaiSD 5 years ago
parent
commit
84284a2e3a
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      ace/index.html

+ 4
- 3
ace/index.html View File

@@ -58,7 +58,7 @@
<!--<button id="btnSave" onClick="save()" class="btn btn_g">save</button>--> <!--<button id="btnSave" onClick="save()" class="btn btn_g">save</button>-->
<button id="btnUndo" onClick="editor.undo()" class="btn">↶</button> <button id="btnUndo" onClick="editor.undo()" class="btn">↶</button>
<button id="btnRedo" onClick="editor.redo()" class="btn btn_g">↷</button> <button id="btnRedo" onClick="editor.redo()" class="btn btn_g">↷</button>
<button id="btnFs" onclick="toggleFullscreen()" class="btn"></button>
<button id="btnFs" onclick="toggleFullscreen()" class="btn">FS</button>
</div> </div>
<div class="inner" id="editor"></div> <div class="inner" id="editor"></div>
@@ -80,8 +80,9 @@
}); });


function updateToolbar() { function updateToolbar() {
document.getElementById("btnUndo") = !editor.session.getUndoManager().hasUndo();
document.getElementById("btnRedo") = !editor.session.getUndoManager().hasRedo();
document.getElementById("btnUndo").disabled = !editor.session.getUndoManager().hasUndo();
document.getElementById("btnRedo").disabled = !editor.session.getUndoManager().hasRedo();
document.getElementById("btnFs").visible = !window.fullScreen;
} }
editor.on("input", updateToolbar); editor.on("input", updateToolbar);




Loading…
Cancel
Save