Reputation: 1
I have this input text code:
$("#text1").keyup(function() {
$('#text2').text($('#text1').val());
});
$('#text2').draggable({
containment: 'parent'
});
Question: how to convert it to image in jquery?
Upvotes: 0
Views: 854
Reputation: 359966
If I understand the question correctly, you want to convert a piece of text to an image.
Use a <canvas>
tag to render text, and then call toDataURL()
to get a base64 representation of the image data.
Upvotes: 2