mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 13:02:21 +08:00
feat(editor): simple table block (#9740)
close: BS-2122, BS-2125, BS-2124, BS-2420, PD-2073, BS-2126, BS-2469, BS-2470, BS-2478, BS-2471
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { AddButton } from './add-button';
|
||||
import type { insertTableBlockCommand } from './commands';
|
||||
import { SelectionLayer } from './selection-layer';
|
||||
import { TableBlockComponent } from './table-block';
|
||||
import { TableCell } from './table-cell';
|
||||
|
||||
export function effects() {
|
||||
customElements.define('affine-table', TableBlockComponent);
|
||||
customElements.define('affine-table-cell', TableCell);
|
||||
customElements.define('affine-table-add-button', AddButton);
|
||||
customElements.define('affine-table-selection-layer', SelectionLayer);
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace BlockSuite {
|
||||
interface CommandContext {
|
||||
insertedTableBlockId?: string;
|
||||
}
|
||||
|
||||
interface Commands {
|
||||
insertTableBlock: typeof insertTableBlockCommand;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user