mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 10:22:55 +08:00
feat(editor): reference, mention and latex inline extension (#11914)
Closes: BS-3215 Closes: BS-3218 Closes: BS-3217
This commit is contained in:
8
packages/common/nbstore/src/sync/indexer/bs-store.ts
Normal file
8
packages/common/nbstore/src/sync/indexer/bs-store.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { StoreExtensionManager } from '@blocksuite/affine/ext-loader';
|
||||
import { getInternalStoreExtensions } from '@blocksuite/affine/extensions/store';
|
||||
|
||||
const manager = new StoreExtensionManager(getInternalStoreExtensions());
|
||||
|
||||
export function getStoreManager() {
|
||||
return manager;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import { getMarkdownAdapterExtensions } from '@blocksuite/affine/adapters';
|
||||
import { Container } from '@blocksuite/affine/global/di';
|
||||
import type {
|
||||
AttachmentBlockModel,
|
||||
@@ -28,6 +27,7 @@ import {
|
||||
} from 'yjs';
|
||||
|
||||
import { IndexerDocument } from '../../storage';
|
||||
import { getStoreManager } from './bs-store';
|
||||
|
||||
const blocksuiteSchema = new Schema();
|
||||
blocksuiteSchema.register([...AffineSchemas]);
|
||||
@@ -119,9 +119,11 @@ function generateMarkdownPreviewBuilder(
|
||||
};
|
||||
|
||||
const container = new Container();
|
||||
getMarkdownAdapterExtensions().forEach(ext => {
|
||||
ext.setup(container);
|
||||
});
|
||||
getStoreManager()
|
||||
.get('store')
|
||||
.forEach(ext => {
|
||||
ext.setup(container);
|
||||
});
|
||||
|
||||
const provider = container.provider();
|
||||
const markdownAdapter = new MarkdownAdapter(
|
||||
|
||||
Reference in New Issue
Block a user