From a49c76d57e0ddd482084b86e3660d10f0b8ff6ff Mon Sep 17 00:00:00 2001 From: Tomasz Kubacki Date: Mon, 1 Apr 2024 14:47:16 +0200 Subject: [PATCH] feat: clear code button --- index.html | 6 ++---- src/dotAndBoxEditor.ts | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index cfd5af5..6a14dc4 100644 --- a/index.html +++ b/index.html @@ -34,10 +34,8 @@

Dot And Box editor


diff --git a/src/dotAndBoxEditor.ts b/src/dotAndBoxEditor.ts index 51102cc..a773368 100644 --- a/src/dotAndBoxEditor.ts +++ b/src/dotAndBoxEditor.ts @@ -224,6 +224,7 @@ class DotAndBoxEditor extends HTMLElement {
experimental
editor
+
@@ -241,6 +242,8 @@ class DotAndBoxEditor extends HTMLElement { const reformatButton: HTMLElement = this.getControl('#reformat') reformatButton.onclick = (_: any) => this.reformat() + const clearButton: HTMLElement = this.getControl('#clear') + clearButton.onclick = (_: any) => this.updateEditorCode('title: new ') const runCodeButton: HTMLElement = this.getControl('#run-code') runCodeButton.onclick = (_: any) => this.runCode()