@explita/editor
Version:
`@explita/editor` is a versatile, modern rich-text editor built on TipTap for seamless integration into React applications. It provides extensive customization options and advanced features to cater to diverse content creation needs.
48 lines (47 loc) • 1.67 kB
TypeScript
import { JSONContent } from "@tiptap/react";
import { EditorOpts } from "../lib/utils";
type InitialContent = {
editorOpts?: Partial<EditorOpts> | undefined;
editorContent?: string | JSONContent;
};
type EditorProps = {
readOnly?: boolean;
initialContent?: InitialContent | string;
getTextContent?: (text: string) => void;
getJSONContent?: (json: JSONContent) => void;
getHTMLContent?: (html: string) => void;
onSave?: (content: string) => void;
onClose?: () => void;
onCreateNew?: () => void;
toolbarRight?: React.ReactNode | string | null | undefined;
editorOpts?: Partial<EditorOpts>;
getEditorOpts?: (editorOpts: EditorOpts) => void;
hideToolbar?: boolean;
hideFooter?: boolean;
};
export declare function FullEditor({ readOnly, initialContent, getTextContent, getJSONContent, getHTMLContent, onSave, onClose, onCreateNew, toolbarRight, editorOpts, getEditorOpts, hideToolbar, hideFooter, }: EditorProps): import("react/jsx-runtime").JSX.Element;
export declare namespace FullEditor {
var defaultProps: {
initialContent: string;
readOnly: boolean;
toolbarRight: null;
getHTMLContent: () => void;
getJSONContent: () => void;
getTextContent: () => void;
onClose: () => void;
onSave: () => void;
onCreateNew: () => void;
getEditorOpts: () => void;
editorOpts: {
padding: {
top: number;
bottom: number;
left: number;
right: number;
};
};
hideToolbar: boolean;
hideFooter: boolean;
};
}
export {};