Skip to content

Editor.Html

A WYSIWYG HTML editor component.

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