code: function saveText() {
          var uriContent = "data:application/octet-stream," + encodeURIComponent(editor.getSession().getValue());
          document.location.href = uriContent;
      }
docs: /* Save written content