Add italic toggle button

This commit is contained in:
Josh birnholz
2023-02-18 19:18:45 -05:00
parent 8d9b549a8d
commit b7ac4cd351
4 changed files with 42 additions and 1 deletions

View File

@@ -123,3 +123,12 @@ document.addEventListener('DOMContentLoaded', function() {
document.body.dispatchEvent(new Event('doCreate'));
})
document.onkeyup = function(e) {
if (document.activeElement === document.getElementById('text-editor')) {
if (e.ctrlKey && e.which == 73) {
toggleTextTag('i');
e.preventDefault();
}
}
}