yishn / tikzcd-editor

A simple visual editor for creating commutative diagrams.
https://tikzcd.yichuanshen.de/
MIT License
1.87k stars 100 forks source link

Add saving and loading from URL hash #12

Closed cemulate closed 6 years ago

cemulate commented 6 years ago

This addresses issue #8 in a slightly different way.

Instead of saving and loading JSON (just another type of markup along with TikZ), this adds a button that encodes the current diagram and puts it in the URL hash, copying the resulting URL to the clipboard at the same time. This allows the same diagram to be loaded by navigating to the copied URL.

The new button is next to the TikZ button: image

and works essentially the same way.

cemulate commented 6 years ago

So, I tried to do some dark git magic to rebase my branch so I could have your fix from master. But, I've never done that in conjunction with a fork and a pull request, so I wasn't sure how this would turn out. The only odd thing is that your commit on master is included in this branch -- but once the merge happens I think it'll just show up as one.

EDIT: I cleaned it up with a little shuffle and push --force

yishn commented 6 years ago

Thank you so much!

cemulate commented 6 years ago

No problem - thanks for the extremely helpful tool!