refactor(editor): should not rely on doc collection type (#9501)

This commit is contained in:
Saul-Mirone
2025-01-03 06:30:27 +00:00
parent cb5d7eaabc
commit 897c7d4284
55 changed files with 200 additions and 158 deletions

View File

@@ -145,18 +145,9 @@ export const markdownToSnapshot = async (
middlewares: [defaultImageProxyMiddleware, pasteMiddleware(host.std)],
});
const markdownAdapter = new MixTextAdapter(job, host.std.provider);
const { blockVersions, workspaceVersion, pageVersion } =
host.std.doc.collection.meta;
if (!blockVersions || !workspaceVersion || !pageVersion)
throw new Error(
'Need blockVersions, workspaceVersion, pageVersion meta information to get slice'
);
const payload = {
file: markdown,
assets: job.assetsManager,
blockVersions,
pageVersion,
workspaceVersion,
workspaceId: host.std.doc.collection.id,
pageId: host.std.doc.id,
};