Skip to content

Commit

Permalink
italics
Browse files Browse the repository at this point in the history
  • Loading branch information
Aikakakah committed Dec 19, 2024
1 parent 4e230e5 commit 8790ccb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ document.addEventListener('DOMContentLoaded', () => {
});
});

document.addEventListener('keydown', (event) => {
if (event.ctrlKey && event.key.toLowerCase() === 'i') {
event.preventDefault(); // Prevent default browser behavior
insertTag('italic');
}
});

window.changeHeaderLevel = function() {
const selectElement = document.getElementById('header-select-select');
const selectedValue = selectElement.value;
Expand Down

0 comments on commit 8790ccb

Please sign in to comment.