In Mac and Windows when you press COMMAND + S or CTRL + S it typically used to save a document. Does Ace Editor have a cross platform event for this that I can listen for? If not how would I capture the user keyboard initiated save event?
add a command like this
editor.commands.addCommand({
name: 'save',
bindKey: {win: "Ctrl-S", "mac": "Cmd-S"},
exec: function(editor) {
console.log("saving", editor.session.getValue())
}
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With