Initial commit
Have the basic workplace worked out
This commit is contained in:
commit
9f2fa96b92
29 changed files with 1889 additions and 0 deletions
30
frontend/src/main.js
Normal file
30
frontend/src/main.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import './style.css';
|
||||
import './app.css';
|
||||
|
||||
import {EditorView, basicSetup} from "codemirror";
|
||||
import {keymap} from "@codemirror/view";
|
||||
import { Application } from "@hotwired/stimulus";
|
||||
|
||||
import CommandsController from "./controllers/commands_controller.js";
|
||||
|
||||
const view = new EditorView({
|
||||
parent: document.querySelector("#app"),
|
||||
doc: "",
|
||||
extensions: [
|
||||
basicSetup,
|
||||
keymap.of([{
|
||||
key: "Cmd-p",
|
||||
run: () => {
|
||||
let event = new CustomEvent('dq-showcommands');
|
||||
window.dispatchEvent(event);
|
||||
|
||||
return true;
|
||||
}
|
||||
}]),
|
||||
]
|
||||
})
|
||||
|
||||
window.Stimulus = Application.start()
|
||||
Stimulus.register("commands", CommandsController);
|
||||
|
||||
view.focus();
|
||||
Loading…
Add table
Add a link
Reference in a new issue