mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
refactor(editor): extract note block (#9310)
This commit is contained in:
30
blocksuite/affine/block-note/src/note-spec.ts
Normal file
30
blocksuite/affine/block-note/src/note-spec.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
BlockViewExtension,
|
||||
CommandExtension,
|
||||
type ExtensionType,
|
||||
FlavourExtension,
|
||||
} from '@blocksuite/block-std';
|
||||
import { literal } from 'lit/static-html.js';
|
||||
|
||||
import {
|
||||
DocNoteBlockAdapterExtensions,
|
||||
EdgelessNoteBlockAdapterExtensions,
|
||||
} from './adapters/index.js';
|
||||
import { commands } from './commands/index.js';
|
||||
import { NoteBlockService } from './note-service.js';
|
||||
|
||||
export const NoteBlockSpec: ExtensionType[] = [
|
||||
FlavourExtension('affine:note'),
|
||||
NoteBlockService,
|
||||
CommandExtension(commands),
|
||||
BlockViewExtension('affine:note', literal`affine-note`),
|
||||
DocNoteBlockAdapterExtensions,
|
||||
].flat();
|
||||
|
||||
export const EdgelessNoteBlockSpec: ExtensionType[] = [
|
||||
FlavourExtension('affine:note'),
|
||||
NoteBlockService,
|
||||
CommandExtension(commands),
|
||||
BlockViewExtension('affine:note', literal`affine-edgeless-note`),
|
||||
EdgelessNoteBlockAdapterExtensions,
|
||||
].flat();
|
||||
Reference in New Issue
Block a user