Clear
Shared by coomlata1
Clears all contents of current document
Script
ui.alert('Are you sure you want to erase ALL contents of this file?','Warning','Ok','Cancel', ans)
function ans(button) {
if (button==1) { //user pressed Cancel button
return;
}
editor.setText('')
//editor.close()
}