Create the following HTML structure to place the input box on the canvas.
<div id="container" style="width:500px; height:500px; position:relative;">
<canvas id="drawing-surface" width="500px" height="500px"></canvas>
<input type="text" style="position:absolute; left=?; top=?;" />
</div>
Hope this solves your problem. Replace left=?and top=?to the proper positions.
source
share