mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-02 11:37:08 +00:00
Added first version of QR code generator plugin
This commit is contained in:
24
plugins/tiddlywiki/qrcode/doc/usage.tid
Normal file
24
plugins/tiddlywiki/qrcode/doc/usage.tid
Normal file
@@ -0,0 +1,24 @@
|
||||
title: $:/plugins/tiddlywiki/qrcode/usage
|
||||
|
||||
! `makeqr` Macro
|
||||
|
||||
The <<.def makeqr>> [[macro|Macros]] converts text data into an image of the corresponding QR code. The image is returned as [[base64-encoded data URI|https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs]].
|
||||
|
||||
!! Parameters
|
||||
|
||||
;text
|
||||
: The text to encode
|
||||
;size
|
||||
: The size of the image in pixels (defaults to 500)
|
||||
;errorCorrectLevel
|
||||
: Determines the amount of error correction applied to the image; see below (defaults to "M").
|
||||
;fallback
|
||||
: The fallback image to be returned in case of an error (see below)
|
||||
|
||||
The conversion will fail if the text is too long and/or complex and the macro will return the provided fallback image. If no fallback image is provided then an error image is generated.
|
||||
|
||||
The error correction level is a [[QR code feature|http://www.qrcode.com/en/about/error_correction.html]]:
|
||||
|
||||
<<<
|
||||
QR Code has error correction capability to restore data if the code is dirty or damaged. ... Level Q or H may be selected for factory environment where QR Code get dirty, whereas Level L may be selected for clean environment with the large amount of data. Typically, Level M (15%) is most frequently selected.
|
||||
<<<
|
||||
Reference in New Issue
Block a user