UNPKG

@atlaskit/editor-plugin-media

Version:

Media plugin for @atlaskit/editor-core

21 lines (20 loc) 1.62 kB
import type { EditorAnalyticsAPI, InputMethodInsertMedia } from '@atlaskit/editor-common/analytics'; import type { WidthPluginState } from '@atlaskit/editor-plugin-width'; import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { MediaState } from '../types'; export interface MediaSingleState extends MediaState { dimensions: { width: number; height: number; }; scaleFactor?: number; contextId?: string; } export declare const isMediaSingle: (schema: Schema, fileMimeType?: string) => boolean; export type InsertMediaAsMediaSingle = (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia) => boolean; export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => boolean; export declare const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, newInsertionBehaviour?: boolean, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean; export declare const createMediaSingleNode: (schema: Schema, collection: string, maxWidth?: number, minWidth?: number, alignLeftOnInsert?: boolean) => (mediaState: MediaSingleState) => PMNode; export declare function isCaptionNode(editorView: EditorView): boolean; export declare const isVideo: import("memoize-one").MemoizedFn<(fileType?: string) => boolean>;