://docs.google.com/uc?id=' + val);
        editorFieldsToJson();
        updateEditorState();
      }
    });

    $('#editor-json').bind('input', function() {
      editorJsonToFields();
      updateEditorState();
    });

    $detailsurlvisit.click(function() {
      window.open($detailsurl.val());
    });
    $imageurlvisit.click(function() {
      window.open($imageurl.val());
    });
    $thumburlvisit.click(function() {
      window.open($thumburl.val());
    });
  }

  function editorFieldsToJson() {