API: update demo page

This commit is contained in:
yflory 2023-01-26 18:41:55 +01:00 committed by Wolfgang Ginolas
parent 592e5690df
commit 8e40cdb957

View file

@ -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: {