import { CreateEditorViewOptions, ProsemirrorService } from '@vendure/admin-ui/core'; export interface useRichTextEditorOptions extends Omit { /** * @description * Control the DOM attributes of the editable element. May be either an object or a function going from an editor state to an object. * By default, the element will get a class "ProseMirror", and will have its contentEditable attribute determined by the editable prop. * Additional classes provided here will be added to the class. For other attributes, the value provided first (as in someProp) will be used. * Copied from real property description. */ attributes?: Record; } /** * @description * Provides access to the ProseMirror (rich text editor) instance. * * @example * ```ts * 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
* } * ``` * * @docsCategory react-hooks */ export declare const useRichTextEditor: ({ attributes, onTextInput, isReadOnly }: useRichTextEditorOptions) => { ref: import("react").RefObject; editor: ProsemirrorService; };