Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Aikakakah committed Dec 19, 2024
1 parent 8790ccb commit fb49ff6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ document.addEventListener('DOMContentLoaded', () => {
event.preventDefault(); // Prevent default browser behavior
insertTag('italic');
}
if (event.ctrlKey && event.key.toLowerCase() === 'b') {
event.preventDefault(); // Prevent default browser behavior
insertTag('bold');
}
if (event.ctrlKey && event.key.toLowerCase() === 'u') {
event.preventDefault(); // Prevent default browser behavior
insertTag('bolditalic');
}
});

window.changeHeaderLevel = function() {
Expand Down

0 comments on commit fb49ff6

Please sign in to comment.