tiptap-editor-codeveda
Version:
A powerful, feature-rich WYSIWYG editor built with Tiptap, React, and TypeScript
33 lines (26 loc) • 853 B
TypeScript
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>;
setEditorContent?: (content: {
html: string;
json: any;
}) => void;
}
export declare const TiptapViewer: ({ styles, editorContent, }: {
styles?: string;
editorContent?: string;
}) => JSX.Element | null;
export declare function useEditorContent(initial?: EditorContentPayload): {
content: EditorContentPayload;
html: string;
json: any;
setContent: (next: EditorContentPayload) => void;
};
export { }