Skip to content

Commit 8ae9b23

Browse files
committed
Get content in text format
1 parent a7b426a commit 8ae9b23

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/my-shared-docprovider/src/drive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export class MySharedDrive extends Drive implements ICollaborativeDrive {
9393
await this._app.serviceManager.contents.get(localPath, { ...options, content: false }),
9494
provider.ready
9595
]);
96-
console.log('get model format:', options.format);
9796
// The server doesn't return a model with a format when content is false,
9897
// so set it back.
9998
return { ...model, format: options.format };
@@ -160,7 +159,8 @@ export class MySharedDrive extends Drive implements ICollaborativeDrive {
160159
translator: this._trans
161160
});
162161

163-
this._app.serviceManager.contents.get(options.path, { content: true }).then(model => {
162+
this._app.serviceManager.contents.get(options.path, { content: true, format: 'text' }).then(model => {
163+
console.log('set model source to:', model.content);
164164
provider.setSource(model.content);
165165
});
166166

packages/my-shared-docprovider/src/yprovider.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export class MyProvider implements IDocumentProvider {
4444
setSource(value: any): void {
4545
this._model.setSource(value);
4646
this._ready.resolve();
47-
console.log('set model source to:', value);
4847
}
4948

5049
/**

0 commit comments

Comments
 (0)