@rifrocket/fdt-plugin-qrcode
v3.0.4
Published
QR code object type (content generation, validation, styling) for the FabricJS Design Tool v2, registered via the core plugin system.
Downloads
59
Readme
@rifrocket/fdt-plugin-qrcode
The "qrcode" object type for Fabric Design Tool — content generation, validation, and styling.
A pure engine plugin that registers a "qrcode" object type on top of qr-code-styling. Generation is asynchronous — it renders an SVG and loads it as a Fabric image — which is why ObjectTypeDefinition.create() is async across the whole framework.
Features
contentTypecovers more than plain URLs: email, phone, SMS, vCard, and calendar-event, each with its owncontentDatashape typed byQRCodeContentMapstyle: QRCodeStyleOptions— dot/corner shapes, gradients, error-correction levelgenerateContentString/validateContent— build and validate the raw QR content string independent of placing an object on the canvasgenerateQRCodeSVG— the raw SVG generator, if you need the image outside the object-type flow
Included in <DesignEditor preset="default">; dropped from preset="minimal".
Install
npm install @rifrocket/fdt-plugin-qrcodePeer dependencies: fabric, react, react-dom.
Depends on @rifrocket/fabricjs-design-tool and @rifrocket/fdt-plugin-media-fields, plus qr-code-styling.
Quick start
import { qrCodePlugin } from "@rifrocket/fdt-plugin-qrcode";
engine.use(qrCodePlugin);
await engine.addObjectOfType("qrcode", {
contentType: "url",
contentData: { url: "https://example.com" },
});Documentation
License
MIT © Fabric Design Tool Contributors
