Hacker News new | ask | show | jobs
by hridyaagrawal 25 days ago
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
1 comments

there is a hidden "<div contenteditable=true>" which contains the entire line being edited, which causes IME to work
Yes, exactly that is the input surface. Canvas can not recieve the events otherwise, IME, clipboard and others events go thraugh that.