toDataURL css isn't captured code example
Example 1: convert canvas to DataUrl and insert image in google sheet
function savejSigToSht() {
var dataURL = canvas.toDataURL('image/png');
google.script.run.insertSig(dataURL);
google.script.host.close();
}
Example 2: convert canvas to DataUrl and insert image in google sheet
function insertSiginSht(blb) {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
sheet.insertImage(blb, 2,2);
}