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>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<form>
|
<div>
|
||||||
Apply to
|
Apply to
|
||||||
<label for="entirePageRadio">entire page:</label>
|
<label for="entirePageRadio">entire page:</label>
|
||||||
<input
|
<input
|
||||||
@@ -63,13 +63,13 @@
|
|||||||
value="exampleTextOnly"
|
value="exampleTextOnly"
|
||||||
checked
|
checked
|
||||||
/>
|
/>
|
||||||
</form>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<form>
|
<div>
|
||||||
<label for="newExampleText">Example Text:</label>
|
<label for="newExampleText">Example Text:</label>
|
||||||
<input type="text" id="newExampleText" name="newExampleText" />
|
<input type="text" id="newExampleText" name="newExampleText" />
|
||||||
<input type="button" id="newExampleTextButton" value="Update" />
|
<input type="button" id="newExampleTextButton" value="Update" />
|
||||||
</form>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<h2>Downloads</h2>
|
<h2>Downloads</h2>
|
||||||
<div id="downloads">
|
<div id="downloads">
|
||||||
|
|||||||
6
index.js
6
index.js
@@ -115,6 +115,12 @@ seriousLightItalicButton.addEventListener("click", function () {
|
|||||||
mainClasses.add("seriousLightItalic");
|
mainClasses.add("seriousLightItalic");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
newExampleText.addEventListener("keydown", function (event) {
|
||||||
|
if (event.code === "Enter") {
|
||||||
|
exampleText.setHTML(newExampleText.value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
newExampleTextButton.addEventListener("click", function () {
|
newExampleTextButton.addEventListener("click", function () {
|
||||||
exampleText.setHTML(newExampleText.value);
|
exampleText.setHTML(newExampleText.value);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user