-2

I am creating a post maker web app, where you can add image and a text on it, now I want to add a download button to ***

download image along with a text

*** on it.

i added <img> tag to add image , and a <input type="textarea"> to achieve this.

Eddie
  • 26,593
  • 6
  • 36
  • 58
  • By the way, there is no `type="textarea"` for inputs. – Mr Lister May 20 '19 at 06:10
  • Possible duplicate of [How to add text on image using Javascript and Canvas](https://stackoverflow.com/questions/41116851/how-to-add-text-on-image-using-javascript-and-canvas) – razdi May 20 '19 at 06:33

1 Answers1

1

I don't think you'll be able to do that with an <img> That said, you can use <canvas> and just save the finished canvas using JS:

var image = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream"); 

window.location.href=image;