If you want people to use it on the web: do not under any circumstances use the pure-canvas approach. You must use real DOM, or it will be an endless frustration that turns many people away. I’ve written about the problems quite a few times, look through https://hn.algolia.com/?type=comment&query=chrismorgan+pure+... if you’re interested. If you’re not intending it to be used via the web, don’t worry. But it’s a gene…
> Authors should avoid implementing text editing controls using the canvas element. Doing so has a large number of disadvantages:
> [...]
> This is a huge amount of work, and authors are most strongly encouraged to avoid doing any of it by instead using the input element, the textarea element, or the contenteditable attribute.
[1] https://html.spec.whatwg.org/multipage/canvas.html#best-prac...