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 += "
"; } setupInput(buffer, cursor, selection, onChange); render(buffer, cursor, selection);