UNPKG

raonkeditor-react

Version:

React component for RAON K Editor

87 lines (86 loc) 4.41 kB
/** * @license Copyright (c) 2003-2022, RAONWIZ DevTeam. All rights reserved. */ /// <reference types="react" /> import * as PropTypes from 'prop-types'; import { ComponentProps, ComponentMode, ComponentRuntimes } from './types'; /** * `RAONWIZ` component is a convenient wrapper around low-level hooks. * It's useful for simpler use cases. For advanced usage see `useRaonkEditor` hook. */ declare function RaonkEditor<EventHandlerProp>({ debug, id, config, componentUrl, runtimes, mode, readOnly, /** * `handlers` object must contain event handlers props only! */ ...handlers }: ComponentProps<EventHandlerProp>): JSX.Element; declare namespace RaonkEditor { var propTypes: { onFocus: PropTypes.Requireable<(...args: any[]) => any>; onDrag: PropTypes.Requireable<(...args: any[]) => any>; onBeforeLoad: PropTypes.Requireable<(...args: any[]) => any>; onNamespaceLoaded: PropTypes.Requireable<(...args: any[]) => any>; onLoaded: PropTypes.Requireable<(...args: any[]) => any>; onCreationComplete: PropTypes.Requireable<(...args: any[]) => any>; onDestroy: PropTypes.Requireable<(...args: any[]) => any>; onAfterChangeMode: PropTypes.Requireable<(...args: any[]) => any>; onOnError: PropTypes.Requireable<(...args: any[]) => any>; onOnLanguageDefinition: PropTypes.Requireable<(...args: any[]) => any>; onAfterPopupShow: PropTypes.Requireable<(...args: any[]) => any>; onAgentInstall: PropTypes.Requireable<(...args: any[]) => any>; onBeforeInsertUrl: PropTypes.Requireable<(...args: any[]) => any>; onMouse: PropTypes.Requireable<(...args: any[]) => any>; onCommand: PropTypes.Requireable<(...args: any[]) => any>; onKey: PropTypes.Requireable<(...args: any[]) => any>; onResized: PropTypes.Requireable<(...args: any[]) => any>; onDocumentEditComplete: PropTypes.Requireable<(...args: any[]) => any>; onPasteImage: PropTypes.Requireable<(...args: any[]) => any>; onWordCount: PropTypes.Requireable<(...args: any[]) => any>; onBeforePaste: PropTypes.Requireable<(...args: any[]) => any>; onCustomAction: PropTypes.Requireable<(...args: any[]) => any>; onFullScreen: PropTypes.Requireable<(...args: any[]) => any>; onSetComplete: PropTypes.Requireable<(...args: any[]) => any>; onSetInsertComplete: PropTypes.Requireable<(...args: any[]) => any>; onCloseInstallPopup: PropTypes.Requireable<(...args: any[]) => any>; onSetForbiddenWordComplete: PropTypes.Requireable<(...args: any[]) => any>; onDialogLoaded: PropTypes.Requireable<(...args: any[]) => any>; onBeforeInsertHyperlink: PropTypes.Requireable<(...args: any[]) => any>; /** * Config object passed to component's constructor. * * A new instance of component will be created everytime a new instance of `config` is provided. * If this is not expected behavior then ensure referential equality of `config` between renders. */ config: PropTypes.Requireable<object>; /** * Toggles debugging. Logs info related to component lifecycle events. */ debug: PropTypes.Requireable<boolean>; /** * Url with component's source code. */ componentUrl: PropTypes.Requireable<string>; /** * A unique identifier of component instance. */ id: PropTypes.Requireable<string>; /** * This prop has two-fold effect: * * - Serves as a convenience prop to start component in edit/view mode. * It's an equivalent of passing `{ mode: 'edit' }` in `config` but takes precedence over it. */ mode: PropTypes.Requireable<ComponentMode>; /** * This prop has two-fold effect: * * - Serves as a convenience prop to start component in readonly mode. * It's an equivalent of passing `{ readOnly: true }` in `config` but takes precedence over it. */ readOnly: PropTypes.Requireable<boolean>; /** * Setups component in either `html5` or `agent` mode. */ runtimes: PropTypes.Requireable<ComponentRuntimes>; }; } export default RaonkEditor;