Open marks opened 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.
Heh, looks like I took the easy route, as intended, and created "some redundancy between those two files."
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!
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
Demo: http://marks.github.io/vizwit/editor.html?gist=4258cdf5ab44d5197792