@furystack/shades-common-components
Version:
Common UI components for FuryStack Shades
39 lines • 2.04 kB
TypeScript
import { type MarkdownInputProps } from './markdown-input.js';
export type MarkdownEditorLayout = 'side-by-side' | 'tabs' | 'above-below';
export type MarkdownEditorProps = {
/** The current Markdown string */
value: string;
/** Called when the value changes (from either the input or checkbox toggle) */
onValueChange?: (newValue: string) => void;
/** Layout mode for the editor. Defaults to 'side-by-side'. */
layout?: MarkdownEditorLayout;
/** Maximum image file size in bytes for base64 paste */
maxImageSizeBytes?: number;
/** When true, the editor is read-only */
readOnly?: boolean;
/** Inline styles applied to the host element */
style?: Partial<CSSStyleDeclaration>;
} & Pick<MarkdownInputProps, 'name' | 'required' | 'labelTitle' | 'disabled' | 'placeholder' | 'rows' | 'getValidationResult' | 'getHelperText'>;
/**
* Combined Markdown editor with an input pane and a live preview pane.
* Supports three layouts: side-by-side, tabs (Edit/Preview), or above-below.
*/
export declare const MarkdownEditor: (props: {
/** The current Markdown string */
value: string;
/** Called when the value changes (from either the input or checkbox toggle) */
onValueChange?: (newValue: string) => void;
/** Layout mode for the editor. Defaults to 'side-by-side'. */
layout?: MarkdownEditorLayout;
/** Maximum image file size in bytes for base64 paste */
maxImageSizeBytes?: number;
/** When true, the editor is read-only */
readOnly?: boolean;
/** Inline styles applied to the host element */
style?: Partial<CSSStyleDeclaration>;
} & Pick<MarkdownInputProps, "name" | "disabled" | "placeholder" | "required" | "rows" | "labelTitle" | "getValidationResult" | "getHelperText"> & Omit<Partial<HTMLElement>, "style"> & {
style?: Partial<CSSStyleDeclaration>;
} & {
ref?: import("@furystack/shades").RefObject<Element>;
}, children?: import("@furystack/shades").ChildrenList) => JSX.Element;
//# sourceMappingURL=markdown-editor.d.ts.map