Skip to content

Instantly share code, notes, and snippets.

@stefandobre
Created February 5, 2021 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefandobre/5eaca0a784ecbf568965731b877b158a to your computer and use it in GitHub Desktop.
Save stefandobre/5eaca0a784ecbf568965731b877b158a to your computer and use it in GitHub Desktop.
// calling our custom requireModule function
const qrcode = requireModule('qrcode');
// library specific options
const code = qrcode(4, 'L');
code.addData(apex.env.P1_QR_DATA);
code.make();
// saving the base64 result into a page item of type Display Image
apex.env.P1_QR_CODE = code.createDataURL(4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment