Last active
May 25, 2025 07:29
-
-
Save cympfh/f8b2a7909954ccfeec02882c849f880a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api.unmap('<Ctrl-a>'); | |
api.mapkey('<Ctrl-a>', 'Select all in textarea', function() { | |
if (document.activeElement instanceof HTMLTextAreaElement || | |
(document.activeElement instanceof HTMLInputElement && document.activeElement.type === "text")) { | |
document.execCommand("selectAll"); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment