reactjs-tiptap-editor
Version:
A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React
16 lines (15 loc) • 532 B
TypeScript
import { Node } from '@tiptap/core';
import { GeneralOptions } from '../../types';
declare module '@tiptap/core' {
interface Commands<ReturnType> {
attachment: {
setAttachment: (attrs?: unknown) => ReturnType;
};
}
}
export interface AttachmentOptions extends GeneralOptions<AttachmentOptions> {
/** Function for uploading files */
upload?: (file: File) => Promise<string>;
}
export * from './components/RichTextAttachment';
export declare const Attachment: Node<AttachmentOptions, any>;