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

@@ -7,7 +7,7 @@ import {
import { gapCursor } from 'prosemirror-gapcursor'
declare module '@tiptap/core' {
interface NodeConfig<Options> {
interface NodeConfig<Options, Storage> {
/**
* Allow gap cursor
*/
@@ -17,6 +17,7 @@ declare module '@tiptap/core' {
| ((this: {
name: string,
options: Options,
storage: Storage,
parent: ParentConfig<NodeConfig<Options>>['allowGapCursor'],
}) => boolean | null),
}
@@ -35,6 +36,7 @@ export const Gapcursor = Extension.create({
const context = {
name: extension.name,
options: extension.options,
storage: extension.storage,
}
return {