');
  var $imageurl = $('#editor-imageurl');
  var $imageurlvisit = $('#editor-imageurl-visit');
  var $cropperbutton = $('#editor-crop');
  var $thumburl = $('#editor-thumburl');
  var $thumburlvisit = $('#editor-thumburl-visit');
  var $json = $('#editor-json');
  var $editorsave = $('#editor-save');
  var $addfromexternal = $('#editor-addfromexternal')

  function setupEditor() {
    $('#editor-cancel').click(function() {
      hideEditor();
    });

    $addfromexternal.click(function() {
      var url 