code: function() {
        var t = this,
            val = t.editor.val();
        if (val) {
          try {
            // Throw away parse errors while typing
            t.model.set(JSON.parse(val));
          } catch (e) {
            return false;
          }
        } else {
          // Confirm deletion if user removes everything in the JSON window
          if (window.confirm('Are you sure you want to remove this component?')) {
            t.pageView.model.get('components').remove(t.model);
            $('#nm-cv-settings').modal('hide');
          } else {
            // Reset source data
            t.fillSourceData();
          }
        }
        return true;
      }
docs: Validate the raw source in the editor, setting the model if valid and returning true/false based on valid JSON