forked from substance/texture
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFigure.js
More file actions
47 lines (41 loc) · 1.39 KB
/
Copy pathFigure.js
File metadata and controls
47 lines (41 loc) · 1.39 KB
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
import { DocumentNode } from 'substance'
class Figure extends DocumentNode {
}
Figure.type = 'figure'
/*
Attribute
fig-type Type of Figure
id Document Internal Identifier
orientation Orientation
position Position
specific-use Specific Use
xml:base Base
xml:lang Language
Content
(
(object-id)*,
label?, (caption)*, (abstract)*, (kwd-group)*,
(alt-text | long-desc | email | ext-link | uri)*,
(disp-formula | disp-formula-group | chem-struct-wrap | disp-quote | speech |
statement | verse-group | table-wrap | p | def-list | list | alternatives |
array | code | graphic | media | preformat)*,
(attrib | permissions)*
)
*/
Figure.schema = {
attributes: { type: 'object', default: {} },
objectIds: { type: ['string'], default: [] },
label: { type: 'label', optional: true },
captions: { type: ['caption'], default: [] },
abstracts: { type: ['abstract'], default: [] },
kwdGroups: { type: ['kwd-group'], default: [] },
altTexts: { type: ['alt-text'], default: [] },
longDescs: { type: ['long-desc'], default: [] },
emails: { type: ['email'], default: [] },
extLinks: { type: ['ext-link'], default: [] },
uris: { type: ['uri'], default: [] },
contentNodes: { type: ['id'], default: [] },
attribs: { type: ['attrib'], default: [] },
permissions: { type: ['permissions'], default: [] }
}
export default Figure