Draw here!

Wanna try the vanilla JavaScript version?

(function() {

    var $sketcher = $('#drawing-canvas').sketchable();
    var $outputEl = $('#drawing-data');

    $('#tosvg').click(function(evt) {
      evt.preventDefault();
      $sketcher.sketchable('svg.create', function(contents) {
        $outputEl.text(contents);
      });
    });

    $('a#clear').click(function(evt) {
      evt.preventDefault();
      $sketcher.sketchable('clear');
      $outputEl.empty();
    });

})();