mirror of
https://github.com/dtinth/comic-mono-font.git
synced 2026-02-21 22:43:59 +00:00
Fix exampleText enter functionality
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<form>
|
||||
<div>
|
||||
Apply to
|
||||
<label for="entirePageRadio">entire page:</label>
|
||||
<input
|
||||
@@ -63,13 +63,13 @@
|
||||
value="exampleTextOnly"
|
||||
checked
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<form>
|
||||
<div>
|
||||
<label for="newExampleText">Example Text:</label>
|
||||
<input type="text" id="newExampleText" name="newExampleText" />
|
||||
<input type="button" id="newExampleTextButton" value="Update" />
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<h2>Downloads</h2>
|
||||
<div id="downloads">
|
||||
|
||||
6
index.js
6
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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user