feat(core): adjust web clipper page (#10779)

This commit is contained in:
EYHN
2025-03-13 10:59:50 +08:00
committed by GitHub
parent 5ed8541cb1
commit 86729fb447
5 changed files with 92 additions and 13 deletions

View File

@@ -13,6 +13,7 @@ export interface ClipperInput {
contentMarkdown: string;
contentHtml: string;
attachments: Record<string, Blob>;
workspace?: 'select-by-user' | 'last-open-workspace';
}
export class ImportClipperService extends Service {
@@ -37,6 +38,7 @@ export class ImportClipperService extends Service {
const docsService = workspace.scope.get(DocsService);
if (docId) {
// only support page mode for now
await docsService.changeDocTitle(docId, clipperInput.title);
docsService.list.setPrimaryMode(docId, 'page');
workspace.engine.doc.addPriority(workspace.id, 100);
workspace.engine.doc.addPriority(docId, 100);