Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a method to render QR Code as an Html table. #15

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

igorshmukler
Copy link

No description provided.

@jp-ed
Copy link

jp-ed commented Jun 22, 2022

A useful addition - especially given the current lack of support for SVG in popular email clients like Gmail (link).

One issue I notice is that it's not possible to customize the table padding. This can be done later with CSS, but to remain consistent with the SVG parameters, I would suggest a couple of edits:

// new variable
var margin = options.padding;
...
// invisible margin added to outer table HTML
const aHTML = ['<table style="border:0;border-collapse:collapse;margin:' + margin + 'px">'];

One further improvement would allow users to customize the color of the padding, since the margin property inherits from the parent element.

@igorshmukler
Copy link
Author

A useful addition - especially given the current lack of support for SVG in popular email clients like Gmail (link).

One issue I notice is that it's not possible to customize the table padding. This can be done later with CSS, but to remain consistent with the SVG parameters, I would suggest a couple of edits:

// new variable
var margin = options.padding;
...
// invisible margin added to outer table HTML
const aHTML = ['<table style="border:0;border-collapse:collapse;margin:' + margin + 'px">'];

One further improvement would allow users to customize the color of the padding, since the margin property inherits from the parent element.

thank you for the suggestion. you are certainly welcome to raise a PR with the suggested enhancement against Diophant/qrcode-svg-table (https://github.com/Diophant/qrcode-svg-table).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants