render(domRoot, { div { attrs { tabIndex = "0" onKeyPressFunction = { onKeyPress(it as KeyboardEvent) } onKeyDownFunction = { console.log(it.type) onKeyDown(it as KeyboardEvent) } } editor.root.render(this) } })