add manual evaluation button

This commit is contained in:
2023-08-21 16:12:41 +02:00
parent 3968d902aa
commit 5a732dd03c
2 changed files with 18 additions and 4 deletions

View File

@ -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);