feat: Add extension storage (#2069)

This commit is contained in:
Philipp Kühn
2021-10-22 08:52:54 +02:00
committed by GitHub
parent 6987505fda
commit 7ffabf251c
26 changed files with 555 additions and 105 deletions

View File

@@ -66,13 +66,14 @@ declare module '@tiptap/core' {
}
}
interface NodeConfig<Options> {
interface NodeConfig<Options, Storage> {
/**
* Table Role
*/
tableRole?: string | ((this: {
name: string,
options: Options,
storage: Storage,
parent: ParentConfig<NodeConfig<Options>>['tableRole'],
}) => string),
}
@@ -245,6 +246,7 @@ export const Table = Node.create<TableOptions>({
const context = {
name: extension.name,
options: extension.options,
storage: extension.storage,
}
return {