@tiptap/extension-gapcursor
Advanced tools
Comparing version 2.0.0-alpha.11 to 2.0.0-alpha.12
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0-alpha.12](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-gapcursor@2.0.0-alpha.11...@tiptap/extension-gapcursor@2.0.0-alpha.12) (2021-02-26) | ||
**Note:** Version bump only for package @tiptap/extension-gapcursor | ||
# [2.0.0-alpha.11](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-gapcursor@2.0.0-alpha.10...@tiptap/extension-gapcursor@2.0.0-alpha.11) (2021-02-16) | ||
@@ -8,0 +16,0 @@ |
import { Extension } from '@tiptap/core'; | ||
declare module '@tiptap/core' { | ||
interface NodeConfig<Options> { | ||
/** | ||
* Allow gap cursor | ||
*/ | ||
allowGapCursor?: boolean | null | ((this: { | ||
options: Options; | ||
}) => boolean | null); | ||
} | ||
} | ||
export declare const Gapcursor: Extension<unknown>; |
@@ -15,2 +15,9 @@ 'use strict'; | ||
}, | ||
extendNodeSchema(extension) { | ||
var _a; | ||
const context = { options: extension.options }; | ||
return { | ||
allowGapCursor: (_a = core.callOrReturn(extension.config.allowGapCursor, context)) !== null && _a !== void 0 ? _a : null, | ||
}; | ||
}, | ||
}); | ||
@@ -17,0 +24,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { Extension } from '@tiptap/core'; | ||
import { Extension, callOrReturn } from '@tiptap/core'; | ||
import { gapCursor } from 'prosemirror-gapcursor'; | ||
@@ -11,2 +11,9 @@ | ||
}, | ||
extendNodeSchema(extension) { | ||
var _a; | ||
const context = { options: extension.options }; | ||
return { | ||
allowGapCursor: (_a = callOrReturn(extension.config.allowGapCursor, context)) !== null && _a !== void 0 ? _a : null, | ||
}; | ||
}, | ||
}); | ||
@@ -13,0 +20,0 @@ |
@@ -14,2 +14,9 @@ (function (global, factory) { | ||
}, | ||
extendNodeSchema(extension) { | ||
var _a; | ||
const context = { options: extension.options }; | ||
return { | ||
allowGapCursor: (_a = core.callOrReturn(extension.config.allowGapCursor, context)) !== null && _a !== void 0 ? _a : null, | ||
}; | ||
}, | ||
}); | ||
@@ -16,0 +23,0 @@ |
{ | ||
"name": "@tiptap/extension-gapcursor", | ||
"description": "gapcursor extension for tiptap", | ||
"version": "2.0.0-alpha.11", | ||
"version": "2.0.0-alpha.12", | ||
"homepage": "https://tiptap.dev", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "71d8fbbcb1eacd664bb6992e0086a589e4684e69" | ||
"gitHead": "2b9f6bc129221973a6ad0f41bb660795439189c0" | ||
} |
@@ -1,4 +0,16 @@ | ||
import { Extension } from '@tiptap/core' | ||
import { Extension, callOrReturn } from '@tiptap/core' | ||
import { gapCursor } from 'prosemirror-gapcursor' | ||
declare module '@tiptap/core' { | ||
interface NodeConfig<Options> { | ||
/** | ||
* Allow gap cursor | ||
*/ | ||
allowGapCursor?: | ||
| boolean | ||
| null | ||
| ((this: { options: Options }) => boolean | null), | ||
} | ||
} | ||
export const Gapcursor = Extension.create({ | ||
@@ -12,2 +24,10 @@ name: 'gapCursor', | ||
}, | ||
extendNodeSchema(extension) { | ||
const context = { options: extension.options } | ||
return { | ||
allowGapCursor: callOrReturn(extension.config.allowGapCursor, context) ?? null, | ||
} | ||
}, | ||
}) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
888137
784