carta-md
Version:
A lightweight, fully customizable, Markdown editor
32 lines (31 loc) • 835 B
TypeScript
import type { Carta } from '../carta';
import type { UIEventHandler } from 'svelte/elements';
import { type Snippet } from 'svelte';
interface Props {
/**
* The Carta instance to use.
*/
carta: Carta;
/**
* The markdown content to render.
*/
value: string;
/**
* The element that wraps the rendered HTML.
*/
elem: HTMLDivElement | undefined;
/**
* Whether this component is hidden (display: none).
*/
hidden?: boolean;
children?: Snippet;
onscroll: UIEventHandler<HTMLDivElement>;
onrender: () => void;
}
/**
* This component wraps the Carta renderer and provides a debounced rendering
* for the editor.
*/
declare const Renderer: import("svelte").Component<Props, {}, "elem">;
type Renderer = ReturnType<typeof Renderer>;
export default Renderer;