UNPKG

tiptap-editor-codeveda

Version:

A powerful, feature-rich WYSIWYG editor built with Tiptap, React, and TypeScript

37 lines (30 loc) 1.03 kB
import { default as default_2 } from 'react'; import { JSX } from 'react/jsx-runtime'; export declare type EditorContentPayload = { html: string; json: any; }; export declare const TiptapEditor: default_2.FC<TiptapProps>; declare interface TiptapProps { onImageUpload?: (file: File) => Promise<string>; onVideoUpload?: (file: File) => Promise<string>; onImageDelete?: (url: string) => Promise<void>; onVideoDelete?: (url: string) => Promise<void>; content?: string; setEditorContent?: (content: { html: string; json: any; }) => void; } export declare const TiptapViewer: ({ styles, editorContent, immediatelyRender, }: { styles?: string; editorContent?: string; immediatelyRender?: boolean; }) => JSX.Element | null; export declare function useEditorContent(initial?: EditorContentPayload): { content: EditorContentPayload; html: string; json: any; setContent: (next: EditorContentPayload) => void; }; export { }