mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 11:30:04 +08:00
@@ -19,6 +19,7 @@ import './left-side-panel.js';
|
||||
import { defaultImageProxyMiddleware } from '@blocksuite/affine/blocks/image';
|
||||
import { ExportManager } from '@blocksuite/affine/blocks/surface';
|
||||
import { toast } from '@blocksuite/affine/components/toast';
|
||||
import { StoreExtensionManagerIdentifier } from '@blocksuite/affine/ext-loader';
|
||||
import {
|
||||
BlockSuiteError,
|
||||
ErrorCode,
|
||||
@@ -331,6 +332,10 @@ export class StarterDebugMenu extends ShadowlessElement {
|
||||
);
|
||||
}
|
||||
|
||||
private _getStoreManager() {
|
||||
return this.editor.std.get(StoreExtensionManagerIdentifier);
|
||||
}
|
||||
|
||||
private async _importHTML() {
|
||||
try {
|
||||
const files = await openFileOrFiles({
|
||||
@@ -349,6 +354,7 @@ export class StarterDebugMenu extends ShadowlessElement {
|
||||
schema: this.editor.doc.schema,
|
||||
html: text,
|
||||
fileName,
|
||||
extensions: this._getStoreManager().get('store'),
|
||||
});
|
||||
if (pageId) {
|
||||
pageIds.push(pageId);
|
||||
@@ -372,6 +378,7 @@ export class StarterDebugMenu extends ShadowlessElement {
|
||||
collection: this.collection,
|
||||
schema: this.editor.doc.schema,
|
||||
imported: file,
|
||||
extensions: this._getStoreManager().get('store'),
|
||||
});
|
||||
if (!this.editor.host) return;
|
||||
toast(
|
||||
@@ -401,6 +408,7 @@ export class StarterDebugMenu extends ShadowlessElement {
|
||||
schema: this.editor.doc.schema,
|
||||
markdown: text,
|
||||
fileName,
|
||||
extensions: this._getStoreManager().get('store'),
|
||||
});
|
||||
if (pageId) {
|
||||
pageIds.push(pageId);
|
||||
@@ -424,6 +432,7 @@ export class StarterDebugMenu extends ShadowlessElement {
|
||||
collection: this.collection,
|
||||
schema: this.editor.doc.schema,
|
||||
imported: file,
|
||||
extensions: this._getStoreManager().get('store'),
|
||||
});
|
||||
if (!this.editor.host) return;
|
||||
toast(
|
||||
@@ -463,6 +472,7 @@ export class StarterDebugMenu extends ShadowlessElement {
|
||||
collection: this.collection,
|
||||
schema: this.editor.doc.schema,
|
||||
imported: file,
|
||||
extensions: this._getStoreManager().get('store'),
|
||||
});
|
||||
if (!this.editor.host) return;
|
||||
toast(
|
||||
|
||||
Reference in New Issue
Block a user