diff --git a/index.html b/index.html index aaaadac..1e8f6c0 100644 --- a/index.html +++ b/index.html @@ -57,6 +57,12 @@ + + + + + @@ -105,7 +112,6 @@
- diff --git a/src/main.ts b/src/main.ts index 3d35648..7b6e3ee 100644 --- a/src/main.ts +++ b/src/main.ts @@ -102,6 +102,9 @@ export class Editor { documentation_button: HTMLButtonElement = document.getElementById( "doc-button-1" ) as HTMLButtonElement; + eval_button: HTMLButtonElement = document.getElementById( + "eval-button-1" + ) as HTMLButtonElement; // Script selection elements local_button: HTMLButtonElement = document.getElementById( @@ -401,6 +404,11 @@ export class Editor { this.showDocumentation(); }); + this.eval_button.addEventListener("click", () => { + this.currentFile().candidate = this.view.state.doc.toString(); + this.flashBackground("#2d313d", 200); + }); + this.pause_buttons.forEach((button) => { button.addEventListener("click", () => { this.setButtonHighlighting("pause", true);