How can I create a meme generator using js canvas?

I am trying to create a meme generator similar to imgflip.com
I know javascript but not sure how to implement this.
I want users to be able to move text around the canvas using mousemove event listener.
But I am not sure if they are moving the text on the canvas or are they creating an overlay div then transform the dimension's to canvas?