API: update demo page
This commit is contained in:
parent
592e5690df
commit
8e40cdb957
1 changed files with 7 additions and 3 deletions
|
@ -19,8 +19,11 @@ var blob = new Blob([mystring], {
|
||||||
var docUrl = URL.createObjectURL(blob);
|
var docUrl = URL.createObjectURL(blob);
|
||||||
|
|
||||||
|
|
||||||
var onSave = function (data) {
|
var onSave = function (data, cb) {
|
||||||
console.log('APP ONSAVE', data);
|
console.log('APP ONSAVE', _blob);
|
||||||
|
docUrl = URL.createObjectURL(_blob);
|
||||||
|
console.log('New doc URL', docUrl);
|
||||||
|
if (typeof (cb) === "function") { cb(); }
|
||||||
};
|
};
|
||||||
var onNewKey = function (newKey) {
|
var onNewKey = function (newKey) {
|
||||||
window.location.hash = newKey;
|
window.location.hash = newKey;
|
||||||
|
@ -30,7 +33,8 @@ var docUrl = URL.createObjectURL(blob);
|
||||||
Api(url, null, {
|
Api(url, null, {
|
||||||
document: {
|
document: {
|
||||||
url: docUrl,
|
url: docUrl,
|
||||||
key: key
|
key: key,
|
||||||
|
fileType: 'md'
|
||||||
},
|
},
|
||||||
documentType: 'code', // appname
|
documentType: 'code', // appname
|
||||||
events: {
|
events: {
|
||||||
|
|
Loading…
Reference in a new issue