JsQRScanner
JsQRScanner copied to clipboard
use the function inside ui template of node red project
Hi, Thank you for your fanstatic project. I would like use it inside ui-template node of Node-red. I can run it and capture the qr code but I cannot send the result to node red payload. I tried using scope.send({payload: "scannedText") inside your function as follow
function onQRCodeScanned(scannedText,scope,payload) { var scannedTextMemo = document.getElementById("scannedTextMemo"); if(scannedTextMemo) { scannedTextMemo.value = scannedText; console.log({payload: scannedText}); scope.send({payload: scannedText}); } }
but not works can you help me? many thanks and thank you very much again