Skip to content

Editor.Markdown

A WYSIWYG Markdown editor component.

import { useState } from 'react';
import { Editor } from '@fintech-sandpit/ui/react';
const [value, setValue] = useState('### Lorem ipsum\nLorem ipsum dolor sit amet, consectetur adipiscing elit.');
return (
<Editor.Markdown
value={value}
onChange={setValue}
/>
);
NameTypeDefaultDescription
valuestringThe Markdown content (controlled)
defaultValuestringThe Markdown content (uncontrolled)
disabledbooleanfalseWhether the editor is disabled
NameTypeDescription
onChange(value: string) => voidCallback fired when the Markdown content changes