configui/public/js/main.js

21 lines
430 B
JavaScript
Raw Normal View History

2021-10-19 18:32:37 +00:00
function toggleWrap(){
let mode = editor.session.getUseWrapMode();
editor.session.setUseWrapMode(!mode)
let el = document.getElementById("toolWrap");
if (mode){
el.classList.remove("is-success");
el.classList.add("is-danger");
} else {
el.classList.remove("is-danger");
el.classList.add("is-success");
}
}
function toolFormat(){
beautify.beautify(editor.session);
}
(function(){
setEditor()
}())