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?
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?
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.