This plugin can generate a QrCode from any String or URL.
It is based on the node-qrcode source code written by soldair and released under MIT license
Based on its Author description, the plugin implements the following features:
Save QR code as image
Support for Numeric, Alphanumeric, Kanji and Byte mode
Support for mixed modes
Support for chinese, cyrillic, greek and japanese characters
Support for multibyte characters (like emojis 😄)
Auto generates optimized segments for best data compression and smallest QR Code size
App agnostic readability, QR Codes by definition are app agnostic
This plugin is only available with the Developer Edition of Thorium
In order to use this plugin, you must install it and activate it from the project parameters (Read the Plugin Installation documentation for more details)
You can download a Working example template here: qrcode_generator
This components does not implement any setting or parameter, once it is enabled for a project, just drop it from the widget list to your project page.
The Plugin will be in charge of displaying the generated QRCode, so you should at least set a size of 128x128px if you want to display a readable QRCode.
Now we will learn how to call the QRCode generator Plugin with a text we want to convert to QRCode.
The QRCode Plugin implements a JavaScript object named nodeQrcode.
It exposes a single function named drawQR.
In order to convert a text to QRCode, you just have to call this function, for example:
nodeQrcode.drawQR(elt,v);
Elt is a reference to a js element ( for instance: var elt=document.getElementById(“myID"); ), and v is the text to convert.
The sample template shows how to pass dynamic text using a form, just check the custom code in this sample to understand how it's done.
...