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

Add SVG support #5

Merged
merged 1 commit into from Jul 12, 2013
Merged

Add SVG support #5

merged 1 commit into from Jul 12, 2013

Conversation

ysangkok
Copy link
Contributor

The SVG support is used if the documentElement's tag name is "svg". I also made a demo page, it was tested in Chrome and Firefox, but it works a bit better in Firefox.

davidshimjs added a commit that referenced this pull request Jul 12, 2013
@davidshimjs davidshimjs merged commit 2b64de0 into davidshimjs:master Jul 12, 2013
@davidshimjs
Copy link
Owner

Thank you :) When you need the QRCode with SVG document?

@ysangkok
Copy link
Contributor Author

I use it to generate static QRCode images. I put the text in textarea in index.svg and run window.btoa($("#qrcode").innerHTML) in the console. I copy this prepended with data:image/svg+xml;base64, to the clipboard. Now I can use this Data-URI with a QRCode everywhere I can use images. And it even prints too. The canvas solution doesn't print, and the table solution is a hack, and it can't be used everywhere images can be used :).

@roy-mdr
Copy link

roy-mdr commented Jul 21, 2014

sorry for my newbieness but how can I save an SVG (or at least put the SVG data on a textfield) from index.html?

@ysangkok
Copy link
Contributor Author

From index.svg, you can write $("#qrcode").innerHTML in the console (Control-Shift-K on Firefox, F12 on Chrome) and just copy that. In copy you can call the copy function on something in the console to copy it to the clipboard.

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.

None yet

4 participants