1 | import { NodeSpec, Node } from 'prosemirror-model';
|
2 | import { MediaDefinition as Media } from './media';
|
3 | import { LinkDefinition } from '../marks/link';
|
4 | import { RichMediaAttributes } from './types/rich-media-common';
|
5 | import { CaptionDefinition as Caption } from './caption';
|
6 | export declare type MediaSingleDefinition = MediaSingleFullDefinition | MediaSingleWithCaptionDefinition;
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export interface MediaSingleBaseDefinition {
|
12 | type: 'mediaSingle';
|
13 | attrs?: RichMediaAttributes;
|
14 | marks?: Array<LinkDefinition>;
|
15 | }
|
16 |
|
17 |
|
18 |
|
19 | export interface MediaCaptionContent {
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 | content: [Media, Caption?];
|
26 | }
|
27 |
|
28 |
|
29 |
|
30 | export declare type MediaSingleWithCaptionDefinition = MediaSingleBaseDefinition & MediaCaptionContent;
|
31 |
|
32 |
|
33 |
|
34 | export interface MediaSingleFullContent {
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 | content: Array<Media>;
|
41 | }
|
42 |
|
43 |
|
44 |
|
45 | export declare type MediaSingleFullDefinition = MediaSingleBaseDefinition & MediaSingleFullContent;
|
46 | export declare const defaultAttrs: {
|
47 | width: {
|
48 | default: null;
|
49 | };
|
50 | layout: {
|
51 | default: string;
|
52 | };
|
53 | };
|
54 | export declare const mediaSingle: NodeSpec;
|
55 | export declare const mediaSingleWithCaption: NodeSpec;
|
56 | export declare const toJSON: (node: Node) => {
|
57 | attrs: any;
|
58 | };
|