Added random array generator and force eval using Shift+Ctrl+Enter

This commit is contained in:
2023-09-08 17:18:30 +03:00
parent d2161eb5bc
commit 61096a5510
5 changed files with 40 additions and 8 deletions

View File

@ -358,6 +358,16 @@ export class Editor {
this.flashBackground("#404040", 200);
}
// Shift + Ctrl + Enter: Evaluate the currently visible code block
if (
(event.key === "Enter" && event.shiftKey && event.ctrlKey))
{
event.preventDefault();
this.currentFile().candidate = this.view.state.doc.toString();
tryEvaluate(this, this.currentFile());
this.flashBackground("#404040", 200);
}
// This is the modal to switch between universes
if (event.ctrlKey && event.key === "b") {
event.preventDefault();