How to add moving text on canvas

I want to make a photo editing app so i need a function where in you can add text on the image and move it wherever you want on the canvas

The way I would do this would be quite complicated but is generally this: store the text in a variable and use the ‘when dragged’ and ‘when touched’ components to keep clearing canvas and writing text at the new coordinates. You would have to store each text along with their coordinates so you dont lose these texts when you are clearing the canvas.

Again, this might not be the best way but the only way I can think of without any extensions (not that i know of any)