Canvas2ImagePlugin icon indicating copy to clipboard operation
Canvas2ImagePlugin copied to clipboard

Canvas2ImagePlugin not working in phonegap

Open TarneemOmar opened this issue 8 years ago • 0 comments

Hi,

I am using phonegap to build cross-platform version of my app, I tried to test Canvas2ImagePlugin but I am not getting any result. I test it using Android Studio simulator on my phone .

Here is my code:

html:

<canvas id="myCanvas" width="250px" height="300px"></canvas> <input type="submit" onclick="capture()" value="testing">

JavaScript:

` function capture() {

window.canvas2ImagePlugin.saveImageDataToLibrary( function(msg){ var tvalue= document.getElementById("t1"); var c = document.getElementById('myCanvas'); var ctx = c.getContext("2d"); ctx.font = "30px Arial"; ctx.fillText(tvalue.value,10,50); console.log(msg); }, function(err){ console.log(err); }, document.getElementById('myCanvas') );

}`

Thanks

TarneemOmar avatar Jul 27 '16 23:07 TarneemOmar