-
Notifications
You must be signed in to change notification settings - Fork 148
/
DomToModelFormatContext.ts
67 lines (58 loc) · 1.86 KB
/
DomToModelFormatContext.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import type { ContentModelBlockFormat } from '../contentModel/format/ContentModelBlockFormat';
import type { ContentModelBlockGroup } from '../contentModel/blockGroup/ContentModelBlockGroup';
import type { ContentModelCode } from '../contentModel/decorator/ContentModelCode';
import type { ContentModelLink } from '../contentModel/decorator/ContentModelLink';
import type { ContentModelListLevel } from '../contentModel/decorator/ContentModelListLevel';
import type { ContentModelParagraphDecorator } from '../contentModel/decorator/ContentModelParagraphDecorator';
import type { ContentModelSegmentFormat } from '../contentModel/format/ContentModelSegmentFormat';
/**
* Represents the context object used when do DOM to Content Model conversion and processing a List
*/
export interface DomToModelListFormat {
/**
* Current number of each level of current thread
*/
threadItemCounts: number[];
/**
* The list that is currently processing
*/
listParent?: ContentModelBlockGroup;
/**
* Current list type stack
*/
levels: ContentModelListLevel[];
}
/**
* Represents format info used by DOM to Content Model conversion
*/
export interface DomToModelFormatContext {
/**
* Format of current block
*/
blockFormat: ContentModelBlockFormat;
/**
* Format of current segment
*/
segmentFormat: ContentModelSegmentFormat;
/**
* Context of list that is currently processing
*/
listFormat: DomToModelListFormat;
}
/**
* Represents decorator info used by DOM to Content Model conversion
*/
export interface DomToModelDecoratorContext {
/**
* Context of hyper link info
*/
link: ContentModelLink;
/**
* Context of code info
*/
code: ContentModelCode;
/**
* Context for paragraph decorator
*/
blockDecorator: ContentModelParagraphDecorator;
}