UNPKG

prism-react-editor

Version:

Lightweight, extensible code editor component for React apps

13 lines (12 loc) 538 B
import { PrismEditor } from '../../types'; /** * Creates a static copy button that can be added to the overlays of an editor or code * block. The `firstChild` of the element returned is the button itself. */ declare const createCopyButton: () => HTMLDivElement; /** * Hook that adds a copy button to the editor. Probably best used with a read-only editor. * Requires styles from `prism-react-editor/copy-button.css` to work. */ declare const useCopyButton: (editor: PrismEditor) => void; export { useCopyButton, createCopyButton };