No. It's impossible.
If you want to use text fields, then your answers:
This is a lot of work compared to CSS.
So, technically, yes, you can do something like an input window, if you want to write something that can be hundreds of lines of uninfected code, do the same thing as you would if you were drawing a text box with a mouse / keyboard on an empty screen using only C ++ ...
But you cannot add DOM elements and make them part of the canvas, with all their events and natural behavior.
There are several libraries that can help, but I don’t understand why you want to go through all this work without a good reason.
source share