UseRichTextEditor
useRichTextEditor
Provides access to the ProseMirror (rich text editor) instance.
Example
import { useRichTextEditor } from '@vendure/admin-ui/react';
import React from 'react';
export function Component() {
const { ref, editor } = useRichTextEditor({
attributes: { class: '' },
onTextInput: (text) => console.log(text),
isReadOnly: () => false,
});
return <div className="w-full" ref={ref} />
}