UNPKG

nuxt-tiptap-editor

Version:

Essentials to Quickly Integrate TipTap Editor into your Nuxt App

22 lines (21 loc) 1 kB
import { Slice } from 'prosemirror-model'; import type { Node } from 'prosemirror-model'; import 'prosemirror-replaceattrs'; import { Plugin } from 'prosemirror-state'; import type { EditorView } from 'prosemirror-view'; import type { ImageUploaderPluginOptions } from './imageUpload.js'; export declare function imageUploader(options: ImageUploaderPluginOptions): Plugin<any>; export declare class ImageUploaderPlugin { config: ImageUploaderPluginOptions; view: EditorView; constructor(config: ImageUploaderPluginOptions); handleDrop(event: DragEvent): true | undefined; transformPasted(slice: Slice): Slice; handlePaste(event: ClipboardEvent): boolean; beforeUpload(fileOrUrl: File | string, at: number): void; newUploadingImageNode(attrs: any): Node; uploadImageForId(fileOrUrl: File | string, id: string): Promise<void>; setView(view: EditorView): this; private isOurOwnPic; } export declare function getFileCache(key: string): string | File | undefined;