import React, { InputHTMLAttributes } from 'react';
import { ProsemirrorService } from '@vendure/admin-ui/core';
export type RichTextEditorType = InputHTMLAttributes & {
/**
* @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;
label?: string;
readOnly?: boolean;
onMount?: (editor: ProsemirrorService) => void;
};
/**
* @description
* A rich text editor component which uses ProseMirror (rich text editor) under the hood.
*
* @example
* ```ts
* import { RichTextEditor } from '@vendure/admin-ui/react';
* import React from 'react';
*
* export function MyComponent() {
* const onSubmit = async (e: React.FormEvent) => {
* e.preventDefault();
* const form = new FormData(e.target as HTMLFormElement);
* const content = form.get("content");
* console.log(content);
* };
*
* return (
*
* );
* }
* ```
*
* @docsCategory react-components
*/
export declare const RichTextEditor: React.ForwardRefExoticComponent & {
/**
* @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;
label?: string;
readOnly?: boolean;
onMount?: (editor: ProsemirrorService) => void;
} & React.RefAttributes>;