UNPKG

reactjs-tiptap-editor

Version:

A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React

19 lines (18 loc) 692 B
import { Extension } from '@tiptap/core'; import { default as Mammoth } from 'mammoth'; import { GeneralOptions } from '../../types'; export * from './components/RichTextImportWord'; interface ImportWordOptions extends GeneralOptions<ImportWordOptions> { /** Function for converting Word files to HTML */ convert?: (file: File) => Promise<string>; /** Function for uploading images */ upload?: (files: File[]) => Promise<unknown>; /** * File Size limit(10 MB) * * @default 1024 * 1024 * 10 */ limit?: number; mammothOptions?: Parameters<typeof Mammoth['convertToHtml']>[1]; } export declare const ImportWord: Extension<ImportWordOptions, any>;