timwis / vizwit

An interactive data visualization tool
http://vizwit.io
GNU General Public License v2.0
100 stars 35 forks source link

Allow gist to be passed to editor #165

Open marks opened 8 years ago

marks commented 8 years ago

Demo: http://marks.github.io/vizwit/editor.html?gist=4258cdf5ab44d5197792

timwis commented 8 years ago

Heh, I actually had this working but realized that vizwit-editor.js looked nearly identical to vizwit-loader.js. The logical question was, "well why not combine them?" perhaps using an &editor=true querystring to enable the editor. Definitely possible, but then every vizwit page would be running with ace and split.js unnecessarily.

The alternative, of course, is to have some redundancy between those two files.

One of the coolest benefits of this feature would be to add an 'edit' button to every vizwit page.

marks commented 8 years ago

Heh, looks like I took the easy route, as intended, and created "some redundancy between those two files."

marks commented 8 years ago

I'll let you make the tough decisions.. let me know if you want me to send a PR. This suits my needs for now!

marks commented 8 years ago

One more thought - you could keep them separate for simplicity and an "edit" button could simply link to the editor view with the gist ID