Hello! I just completed the Bonsai project. I was wondering, how would one go about in order to give the user the option to save their meme? What code can be used? Thanks in advance!
To the best of my knowledge, there's currently no way to save the meme without having the user manually screenshot it, which definitely isn't the ideal way to do it.
If you're interested, it could be done using the HTML5
<canvas>, though - please let me know if you have any questions about that :)
Thanks for the reply.
That's too bad.
How would I use in this situation?
Once you get your basic canvas set up, see: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_text to draw text. I don't think drawing text will be too hard, but let me know if you need help with that :)
To save the meme, I think you'd get your code looking like this:
<!-- html --> <!-- other stuff --> <button id="save">Save meme</button> <canvas id="c">Sorry, <canvas> doesn't seem to be supported</canvas> <!-- ↑ this will get shown if the stuff in the canvas can't be --> <!-- other stuff -->
I think that code will mostly work. I haven't tested it yet though, because it's getting late and as a human, I need sleep. I'll try to get around to testing it tomorrow morning, or you can work on it yourself :)
best written as,
... <canvas> ...
Thanks for all this info.
I'm gonna have to study this to understand better.
Thanks a million for all of your help!