add command scope

This commit is contained in:
Philipp Kühn
2021-02-16 11:27:58 +01:00
parent 87beee25b0
commit ca8d1a4245
74 changed files with 614 additions and 460 deletions

View File

@@ -14,9 +14,11 @@ export interface AnnotationOptions {
}
declare module '@tiptap/core' {
interface Commands {
addAnnotation: (content: any) => Command,
deleteAnnotation: (id: number) => Command,
interface AllCommands {
annotation: {
addAnnotation: (content: any) => Command,
deleteAnnotation: (id: number) => Command,
}
}
}

View File

@@ -8,11 +8,13 @@ export interface IframeOptions {
}
declare module '@tiptap/core' {
interface Commands {
/**
* Add an iframe
*/
setIframe: (options: { src: string }) => Command,
interface AllCommands {
iframe: {
/**
* Add an iframe
*/
setIframe: (options: { src: string }) => Command,
}
}
}