UNPKG

1.62 kBTypeScriptView Raw
1/**
2 * Copyright (c) 2017-present, Ephox, Inc.
3 *
4 * This source code is licensed under the Apache 2 license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 */
8import { IEventPropTypes } from './components/EditorPropTypes';
9import { IAllProps } from './components/Editor';
10import { Editor as TinyMCEEditor, EditorEvent } from 'tinymce';
11export declare const isFunction: (x: unknown) => x is Function;
12declare type PropLookup = <K extends keyof IAllProps>(key: K) => IAllProps[K] | undefined;
13export declare const configHandlers2: <H>(handlerLookup: PropLookup, on: (name: string, handler: H) => void, off: (name: string, handler: H) => void, adapter: <K extends keyof import("./Events").IEvents>(lookup: PropLookup, key: K) => H, prevProps: Partial<IAllProps>, props: Partial<IAllProps>, boundHandlers: Record<string, H>) => void;
14export declare const configHandlers: (editor: TinyMCEEditor, prevProps: Partial<IAllProps>, props: Partial<IAllProps>, boundHandlers: Record<string, (event: EditorEvent<any>) => unknown>, lookup: PropLookup) => void;
15export declare const uuid: (prefix: string) => string;
16export declare const isTextareaOrInput: (element: Element | null) => element is HTMLInputElement | HTMLTextAreaElement;
17export declare const mergePlugins: (initPlugins: string | string[] | undefined, inputPlugins: string | string[] | undefined) => string[];
18export declare const isBeforeInputEventAvailable: () => boolean;
19export declare const isInDoc: (elem: Node) => boolean;
20export declare const setMode: (editor: TinyMCEEditor | undefined, mode: 'readonly' | 'design') => void;
21export {};