|
|
@@ -50,8 +50,8 @@ |
|
|
|
<div class="toolbar"> |
|
|
|
<!--<button id="btnSave" onClick="save()" class="btn btn_g">save</button>--> |
|
|
|
<button id="btnUndo" onClick="editor.undo()" class="btn">↶</button> |
|
|
|
<button id="btnRedo" onClick="editor.redo()" class="btn_g">↷</button> |
|
|
|
<button id="btnFs" onclick="openFullscreen();">◻</button> |
|
|
|
<button id="btnRedo" onClick="editor.redo()" class="btn btn_g">↷</button> |
|
|
|
<button id="btnFs" onclick="openFullscreen() class="btn"">◻</button> |
|
|
|
</div> |
|
|
|
<div class="inner" id="editor"></div> |
|
|
|
|
|
|
@@ -99,20 +99,33 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
function openFullscreen() { |
|
|
|
var elem = document.documentElement; |
|
|
|
if (elem.requestFullscreen) { |
|
|
|
elem.requestFullscreen(); |
|
|
|
} else if (elem.mozRequestFullScreen) { /* Firefox */ |
|
|
|
elem.mozRequestFullScreen(); |
|
|
|
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */ |
|
|
|
elem.webkitRequestFullscreen(); |
|
|
|
} else if (elem.msRequestFullscreen) { /* IE/Edge */ |
|
|
|
elem.msRequestFullscreen(); |
|
|
|
function fullscreen() { |
|
|
|
if (window.fullScreen) { |
|
|
|
var elem = document.documentElement; |
|
|
|
if (elem.requestFullscreen) { |
|
|
|
elem.requestFullscreen(); |
|
|
|
} else if (elem.mozRequestFullScreen) { /* Firefox */ |
|
|
|
elem.mozRequestFullScreen(); |
|
|
|
} else if (elem.webkitRequestFullscreen) { /* Chrome, Safari and Opera */ |
|
|
|
elem.webkitRequestFullscreen(); |
|
|
|
} else if (elem.msRequestFullscreen) { /* IE/Edge */ |
|
|
|
elem.msRequestFullscreen(); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
if (document.exitFullscreen) { |
|
|
|
document.exitFullscreen(); |
|
|
|
} else if (document.mozCancelFullScreen) { |
|
|
|
document.mozCancelFullScreen(); |
|
|
|
} else if (document.webkitExitFullscreen) { |
|
|
|
document.webkitExitFullscreen(); |
|
|
|
} else if (document.msExitFullscreen) { |
|
|
|
document.msExitFullscreen(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
window.editor = editor; |
|
|
|
window.editor = editor; |
|
|
|
|
|
|
|
</script> |
|
|
|
|
|
|
|