From fb49ff644c35d6e0322658815094adc5775e0d3e Mon Sep 17 00:00:00 2001 From: Aikakakah <145503852+Aikakakah@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:11:06 -0500 Subject: [PATCH] Update index.js --- js/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/index.js b/js/index.js index 387ed8e..0de8b99 100644 --- a/js/index.js +++ b/js/index.js @@ -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() {