fix: add name to context

This commit is contained in:
Philipp Kühn
2021-04-20 23:12:15 +02:00
parent 12f60abb73
commit a43d4c7bcb

View File

@@ -72,8 +72,9 @@ declare module '@tiptap/core' {
* Table Role * Table Role
*/ */
tableRole?: string | ((this: { tableRole?: string | ((this: {
name: string,
options: Options, options: Options,
parentConfig: ParentConfig<NodeConfig<Options>>, parent: ParentConfig<NodeConfig<Options>>['tableRole'],
}) => string), }) => string),
} }
} }
@@ -231,6 +232,7 @@ export const Table = Node.create<TableOptions>({
extendNodeSchema(extension) { extendNodeSchema(extension) {
const context = { const context = {
name: extension.name,
options: extension.options, options: extension.options,
} }