Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
hridyaagrawal
· 3w ago · 0 comments
how are you handling IME and screen readers with canvas? also do you relayout per line or per block? only relaying out changed blocks was the biggest typing speedup in my markdown editor
Comments
[–]
orangea
3w ago
there is a hidden "<div contenteditable=true>" which contains the entire line being edited, which causes IME to work
[–]
hamza512b
3w ago
Yes, exactly that is the input surface. Canvas can not recieve the events otherwise, IME, clipboard and others events go thraugh that.