UNPKG

pm-react-text-editor

Version:

A customizable and lightweight rich-text editor for React, built with hooks and modern styling. Supports common formatting tools like bold, italic, lists, headings, links, and more.

18 lines (17 loc) 634 B
import { ReactNode } from 'react'; interface EditorContextType { content: string; setContent: (content: string) => void; wordCount: number; characterCount: number; execCommand: (command: string, value?: string) => void; formatBlock: (blockType: string) => void; } interface EditorProviderProps { children: ReactNode; initialContent?: string; onChange?: (content: string) => void; } export declare function EditorProvider({ children, initialContent, onChange }: EditorProviderProps): import("react/jsx-runtime").JSX.Element; export declare function useEditorContext(): EditorContextType; export {};