build error fixes
This commit is contained in:
@@ -46,6 +46,7 @@ export const ImageUpload = Extension.create({
|
||||
// Insert image
|
||||
editor.chain()
|
||||
.focus()
|
||||
// @ts-ignore
|
||||
.setImage({ src: url, filename })
|
||||
.run();
|
||||
|
||||
|
||||
@@ -87,14 +87,12 @@ export const CustomImage = Image.extend({
|
||||
},
|
||||
});
|
||||
|
||||
import type { SetImageOptions } from "@tiptap/extension-image";
|
||||
|
||||
// @ts-ignore
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
// @ts-ignore
|
||||
image: {
|
||||
// @ts-ignore
|
||||
setImage: (options: SetImageOptions & { filename?: string }) => ReturnType;
|
||||
setImage: (options: { src: string, alt?: string, title?: string, filename?: string }) => ReturnType;
|
||||
};
|
||||
}
|
||||
}
|
||||
// @ts-ignore
|
||||
|
||||
Reference in New Issue
Block a user