@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
35 lines (34 loc) • 863 B
TypeScript
import { NodeSpec, Node as PMNode } from '../../prosemirror';
export declare type MediaType = 'file' | 'link';
export declare type DisplayType = 'file' | 'thumbnail';
/**
* @name media_node
*/
export interface Definition {
type: 'media';
/**
* @minItems 1
*/
attrs: Attributes;
}
export interface Attributes {
/**
* @minLength 1
*/
id: string;
type: MediaType;
collection: string;
/**
* @minLength 1
*/
occurrenceKey?: string;
__fileName?: string | null;
__fileSize?: number | null;
__fileMimeType?: string | null;
__displayType?: DisplayType | null;
}
export declare const media: NodeSpec;
export declare const copyOptionalAttrs: (from: Object, to: Object, map?: ((string: any) => string) | undefined) => void;
export declare const toJSON: (node: PMNode) => {
attrs: {};
};