UNPKG

prism-react-editor

Version:

Lightweight, extensible code editor component for React apps

43 lines (42 loc) 1.52 kB
import { PrismEditor } from './types'; /** * Component adding the following extensions: * - {@link useBracketMatcher} * - {@link useHighlightBracketPairs} * - {@link useTagMatcher} * - {@link useHighlightMatchingTags} * - {@link useDefaultCommands} * - {@link useEditHistory} * - {@link useSearchWidget} * - {@link useHighlightSelectionMatches} * - {@link useShowInvisibles} * - {@link useCursorPosition} * - {@link IndentGuides} * * Requires styling from `prism-react-editor/search.css` for the search widget. * To highlight selected spaces and tabs, import `prism-react-editor/invisibles.css`. */ declare const BasicSetup: ({ editor }: { editor: PrismEditor; }) => import("react/jsx-runtime").JSX.Element; /** * Component adding the following extensions: * - {@link useBracketMatcher} * - {@link useHighlightBracketPairs} * - {@link useTagMatcher} * - {@link useHighlightMatchingTags} * - {@link useHighlightSelectionMatches} * - {@link IndentGuides} * - {@link useCopyButton} * - {@link useReadOnlyCodeFolding} with {@link bracketFolding}, {@link tagFolding}, * {@link blockCommentFolding}, and {@link markdownFolding} * * Intended to be used with read-only editors. * * Requires styling from `prism-react-editor/copy-button.css` for the copy button * and from `prism-react-editor/code-folding.css` for the code folding. */ declare const ReadOnlySetup: ({ editor }: { editor: PrismEditor; }) => import("react/jsx-runtime").JSX.Element; export { BasicSetup, ReadOnlySetup };