Get feedback from a html canvas element

Hey there,

I m trying to give the feedback of a canvas element into node-red using a templade node. unfortunately I can't do that at the moment


.wrapper {
  position: relative;
  width: 400px;
  height: 200px;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
img {
  position: absolute;
  left: 0;
  top: 0;

.signature-pad {
  position: absolute;
  left: 0;
  top: 0;

  Draw over image
<div class="wrapper" style="background-color:white;">
  <canvas id="signature-pad" class="signature-pad" width=400 height=200></canvas>
  <button id="save">Save</button>
  <button id="clear">Clear</button>

var signaturePad = new SignaturePad(document.getElementById('signature-pad'), {
  backgroundColor: 'rgba(255, 255, 255, 0)',
  penColor: 'rgb(0, 0, 0)'
var saveButton = document.getElementById("save");
var cancelButton = document.getElementById('clear');

saveButton.addEventListener('click', function (event) {
    var data = signaturePad;
    this.scope.action = function() {return data;}


cancelButton.addEventListener('click', function (event) {


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.