@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.
24 lines (23 loc) • 907 B
TypeScript
import { type Editor } from "@tiptap/react";
import { ClassValue } from "clsx";
export type ContentFormats = "text" | "json" | "html";
export type PagePadding = {
top: number;
right: number;
bottom: number;
left: number;
};
export type EditorOpts = {
padding: Partial<PagePadding>;
zoomLevel: number;
editorHeight: string;
editorWidth: string;
containerHeight: string;
containerWidth: string;
};
export declare const defaultEditorOpts: EditorOpts;
export declare function initializeEditor(userOpts?: Partial<EditorOpts>): EditorOpts;
export declare function cn(...inputs: ClassValue[]): string;
export declare function measureHeight(element: Node): number;
export declare function onSave(editor: Editor | null, format?: ContentFormats): string | import("@tiptap/react").JSONContent | undefined;
export declare function parseWordDocument(file: File): Promise<string>;