import React, { ChangeEvent } from 'react'; import MediumEditor, { MediumEditor as IMediumEditor } from 'medium-editor'; import 'medium-editor/dist/css/medium-editor.min.css'; import 'medium-editor/dist/css/themes/flat.min.css'; import './InlineTextEditor.css'; export declare type Editor = IMediumEditor; export declare type ToolbarOption = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'subscript' | 'superscript' | 'anchor' | 'image' | 'imageCaption' | 'quote' | 'pre' | 'orderedlist' | 'unorderedlist' | 'indent' | 'outdent' | 'justifyLeft' | 'justifyCenter' | 'justifyRight' | 'justifyFull' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'removeFormat' | 'html'; export interface InlineTextEditorProps { /** * <@default=`'false'`> */ isReadonly?: boolean; /** * <@default=`'ztopia-inline-text-editor'`> */ id?: string; /** * Used when instantiating MediemEditor(selector) * * <@default=`'#ztopia-inline-text-editor'`> */ selector?: string; /** * <@default=`''`> */ defaultValue?: string; /** * <@default=`'Type your text here...'`> */ placeholder?: string; className?: string; /** * <@default=`['bold', 'italic', 'underline', 'anchor', 'h1', 'h2', 'quote', 'orderedlist', 'unorderedlist']`> */ toolbarOptions?: ToolbarOption[] | MediumEditor.Button[]; onChange?: (e: ChangeEvent, newValue: string) => void; onReady?: (editor: Editor) => void; } export declare const sleep: (ms: number) => Promise; export declare const InlineTextEditor: React.NamedExoticComponent;