mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 20:16:26 +08:00
feat(core): use new print pdf api (#7932)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { DocMode } from '@blocksuite/blocks';
|
||||
import type { AffineEditorContainer } from '@blocksuite/presets';
|
||||
import type { DocService, WorkspaceService } from '@toeverything/infra';
|
||||
import { Entity, LiveData } from '@toeverything/infra';
|
||||
|
||||
@@ -14,6 +15,8 @@ export class Editor extends Entity<{ defaultMode: DocMode }> {
|
||||
readonly isSharedMode =
|
||||
this.workspaceService.workspace.openOptions.isSharedMode;
|
||||
|
||||
readonly editorContainer$ = new LiveData<AffineEditorContainer | null>(null);
|
||||
|
||||
toggleMode() {
|
||||
this.mode$.next(this.mode$.value === 'edgeless' ? 'page' : 'edgeless');
|
||||
}
|
||||
@@ -22,6 +25,10 @@ export class Editor extends Entity<{ defaultMode: DocMode }> {
|
||||
this.mode$.next(mode);
|
||||
}
|
||||
|
||||
setEditorContainer(editorContainer: AffineEditorContainer | null) {
|
||||
this.editorContainer$.next(editorContainer);
|
||||
}
|
||||
|
||||
constructor(
|
||||
private readonly docService: DocService,
|
||||
private readonly workspaceService: WorkspaceService
|
||||
|
||||
Reference in New Issue
Block a user