From a2a447c532b53588d80c5a03f7492887326700b0 Mon Sep 17 00:00:00 2001 From: kaBeech Date: Sat, 18 Mar 2023 19:27:08 -0700 Subject: [PATCH] Fix exampleText enter functionality --- index.html | 8 ++++---- index.js | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 021d42f..9a5dae8 100644 --- a/index.html +++ b/index.html @@ -46,7 +46,7 @@
-
+
Apply to - +

-
+
- +

Downloads

diff --git a/index.js b/index.js index 0a6998d..7f8114a 100644 --- a/index.js +++ b/index.js @@ -115,6 +115,12 @@ seriousLightItalicButton.addEventListener("click", function () { mainClasses.add("seriousLightItalic"); }); +newExampleText.addEventListener("keydown", function (event) { + if (event.code === "Enter") { + exampleText.setHTML(newExampleText.value); + } +}); + newExampleTextButton.addEventListener("click", function () { exampleText.setHTML(newExampleText.value); });