let div = document.getElementById("editor")
let isActive = false;
div.addEventListener("click", function() {
isActive = true;
console.log(isActive)
});
document.addEventListener("click", function(e) {
if(e.target !== div) {
isActive = false;
console.log(isActive)
}
});
async function getData() {
return await connection.query('select * from `users` where `is_enabled` = 1;')
}
var data = getData();