import React, { useState } from 'react' import { Container } from '@toptal/picasso' import { SPACING_4, SPACING_8 } from '@toptal/picasso-utils' import { CodeBlockPlugin, CodePlugin, RichTextEditor, } from '@toptal/picasso-rich-text-editor' import { htmlToHast } from '@toptal/picasso-rich-text-editor/utils' import type { RichTextEditorChangeHandler } from '../types' // we expect defaultValue to be HAST from BE const defaultValue = htmlToHast( `
foo bar baz
qux quux quuz
<CodeBlock` ) const Example = () => { const [value, setValue] = useState
{...props}
/>