Files
luma-editor/main.js
T
2026-06-30 21:31:35 +02:00

20 lines
547 B
JavaScript

import { render } from "./lib/render.js";
import { setupInput } from "./lib/keyboard.js";
const buffer = ["Hello, world!", "Second line."];
const cursor = { line: 0, col: 0 };
const selection = { anchor: null, head: null };
function onChange() {
render(buffer, cursor, selection);
try {
console.log(buffer.map((line) => JSON.parse(App.testing(line))));
} catch (e) {
console.error(e);
}
document.getElementById("text").innerHTML += "<br>";
}
setupInput(buffer, cursor, selection, onChange);
render(buffer, cursor, selection);