@digabi/exam-engine-core 22.1.6-alpha.3 → 22.1.6-alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__tests__/editor/ImageUploadButton.test.js +26 -1
- package/dist/__tests__/editor/ImageUploadButton.test.js.map +1 -1
- package/dist/__tests__/editor/spanLang.test.d.ts +2 -0
- package/dist/__tests__/editor/spanLang.test.d.ts.map +1 -0
- package/dist/__tests__/editor/spanLang.test.js +50 -0
- package/dist/__tests__/editor/spanLang.test.js.map +1 -0
- package/dist/__tests__/editor/spanWithLang.test.d.ts +2 -0
- package/dist/__tests__/editor/spanWithLang.test.d.ts.map +1 -0
- package/dist/__tests__/editor/spanWithLang.test.js +38 -0
- package/dist/__tests__/editor/spanWithLang.test.js.map +1 -0
- package/dist/__tests__/editor/sub.test.d.ts +2 -0
- package/dist/__tests__/editor/sub.test.d.ts.map +1 -0
- package/dist/__tests__/editor/sub.test.js +62 -0
- package/dist/__tests__/editor/sub.test.js.map +1 -0
- package/dist/__tests__/editor/subSup.test.d.ts +2 -0
- package/dist/__tests__/editor/subSup.test.d.ts.map +1 -0
- package/dist/__tests__/editor/subSup.test.js +50 -0
- package/dist/__tests__/editor/subSup.test.js.map +1 -0
- package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
- package/dist/components/grading-instructions/EditableGradingInstruction.d.ts.map +1 -1
- package/dist/components/grading-instructions/EditableGradingInstruction.js +12 -2
- package/dist/components/grading-instructions/EditableGradingInstruction.js.map +1 -1
- package/dist/components/grading-instructions/editor/schemas/imageSchema.d.ts.map +1 -1
- package/dist/components/grading-instructions/editor/schemas/imageSchema.js +18 -4
- package/dist/components/grading-instructions/editor/schemas/imageSchema.js.map +1 -1
- package/dist/components/grading-instructions/editor/schemas/spanLang.d.ts +3 -0
- package/dist/components/grading-instructions/editor/schemas/spanLang.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/spanLang.js +23 -0
- package/dist/components/grading-instructions/editor/schemas/spanLang.js.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.d.ts +3 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.js +19 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithLangSchema.js.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js +1 -1
- package/dist/components/grading-instructions/editor/schemas/spanWithNowrapSchema.js.map +1 -1
- package/dist/components/grading-instructions/editor/schemas/subSup.d.ts +3 -0
- package/dist/components/grading-instructions/editor/schemas/subSup.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/subSup.js +23 -0
- package/dist/components/grading-instructions/editor/schemas/subSup.js.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/subSupSchema.d.ts +3 -0
- package/dist/components/grading-instructions/editor/schemas/subSupSchema.d.ts.map +1 -0
- package/dist/components/grading-instructions/editor/schemas/subSupSchema.js +23 -0
- package/dist/components/grading-instructions/editor/schemas/subSupSchema.js.map +1 -0
- package/dist/main-bundle.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAA;
|
1
|
+
{"version":3,"file":"EditableGradingInstruction.d.ts","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAA;AAwE9D,iBAAS,0BAA0B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,qBAwFpE;AAED,eAAe,0BAA0B,CAAA"}
|
@@ -21,6 +21,8 @@ import { spanWithNowrapSchema } from './editor/schemas/spanWithNowrapSchema';
|
|
21
21
|
import { localization } from './editor/localization';
|
22
22
|
import { listSchema } from './editor/schemas/listSchema';
|
23
23
|
import { createListPlugin, ListButton } from './editor/List';
|
24
|
+
import { subSupSchema } from './editor/schemas/subSupSchema';
|
25
|
+
import { spanWithLangSchema } from './editor/schemas/spanWithLangSchema';
|
24
26
|
function Menu(props) {
|
25
27
|
const { onSaveImage } = useContext(GradingInstructionContext);
|
26
28
|
const [isFloating, setIsFloating] = useState(false);
|
@@ -64,7 +66,11 @@ function EditableGradingInstruction({ element }) {
|
|
64
66
|
.append(tableSchema)
|
65
67
|
.append(listSchema)
|
66
68
|
.update('image', imageInputSchema(resolveAttachment)),
|
67
|
-
marks: baseSchema.spec.marks
|
69
|
+
marks: baseSchema.spec.marks
|
70
|
+
.append(spanWithNowrapSchema)
|
71
|
+
.append(localization(true))
|
72
|
+
.append(subSupSchema)
|
73
|
+
.append(spanWithLangSchema)
|
68
74
|
});
|
69
75
|
const outputSchema = new Schema({
|
70
76
|
nodes: baseSchema.spec.nodes
|
@@ -72,7 +78,11 @@ function EditableGradingInstruction({ element }) {
|
|
72
78
|
.append(tableSchema)
|
73
79
|
.append(listSchema)
|
74
80
|
.update('image', imageOutputSchema),
|
75
|
-
marks: baseSchema.spec.marks
|
81
|
+
marks: baseSchema.spec.marks
|
82
|
+
.append(spanWithNowrapSchema)
|
83
|
+
.append(localization(false))
|
84
|
+
.append(subSupSchema)
|
85
|
+
.append(spanWithLangSchema)
|
76
86
|
});
|
77
87
|
const doc = ProseDOMParser.fromSchema(inputSchema).parse(element);
|
78
88
|
const [mount, setMount] = useState(null);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EditableGradingInstruction.js","sourceRoot":"","sources":["../../../src/components/grading-instructions/EditableGradingInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MA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CACf,oBAAC,YAAY,IACX,KAAK,EAAE,YAAY,EACnB,QAAQ,EAAE,GAAG,EAAE;gBACb,eAAe,CAAC,IAAI,CAAC,CAAA;YACvB,CAAC,GACD,CACH,CACW,CACf,CAAA;AACH,CAAC;AAED,eAAe,0BAA0B,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"imageSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/imageSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAK5C,eAAO,MAAM,gBAAgB,sBAAuB,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,KAAG,
|
1
|
+
{"version":3,"file":"imageSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/imageSchema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAK5C,eAAO,MAAM,gBAAgB,sBAAuB,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,KAAG,QAqCjF,CAAA;AAIF,eAAO,MAAM,iBAAiB,EAAE,QAgB/B,CAAA"}
|
@@ -3,12 +3,15 @@ import { schema as baseSchema } from 'prosemirror-schema-basic';
|
|
3
3
|
const existingImageNode = baseSchema.spec.nodes.get('image');
|
4
4
|
export const imageInputSchema = (resolveAttachment) => ({
|
5
5
|
...existingImageNode,
|
6
|
+
content: 'inline*',
|
7
|
+
marks: '_',
|
6
8
|
attrs: {
|
7
9
|
...existingImageNode === null || existingImageNode === void 0 ? void 0 : existingImageNode.attrs,
|
8
10
|
width: { default: null },
|
9
11
|
height: { default: null },
|
10
12
|
class: { default: null },
|
11
|
-
lang: { default: null }
|
13
|
+
lang: { default: null },
|
14
|
+
hasTitle: { default: false }
|
12
15
|
},
|
13
16
|
parseDOM: [
|
14
17
|
{
|
@@ -20,14 +23,20 @@ export const imageInputSchema = (resolveAttachment) => ({
|
|
20
23
|
}
|
21
24
|
const attrs = {
|
22
25
|
...Object.fromEntries(Array.from(element.attributes).map(attr => [attr.name, attr.value])),
|
23
|
-
src: resolveAttachment(element.getAttribute('src') || '')
|
26
|
+
src: resolveAttachment(element.getAttribute('src') || ''),
|
27
|
+
hasTitle: !!element.querySelector('[data-editor-id="e-image-title"]')
|
24
28
|
};
|
25
29
|
return attrs;
|
26
30
|
}
|
27
31
|
}
|
28
32
|
],
|
29
33
|
toDOM(node) {
|
30
|
-
|
34
|
+
if (node.attrs.hasTitle) {
|
35
|
+
return ['figure', {}, ['img', node.attrs], ['figcaption', {}, 0]];
|
36
|
+
}
|
37
|
+
else {
|
38
|
+
return ['img', node.attrs];
|
39
|
+
}
|
31
40
|
}
|
32
41
|
});
|
33
42
|
const pathToFilename = (path) => path.split('/').pop();
|
@@ -41,7 +50,12 @@ export const imageOutputSchema = {
|
|
41
50
|
}
|
42
51
|
return value;
|
43
52
|
});
|
44
|
-
|
53
|
+
if (node.attrs.hasTitle) {
|
54
|
+
return ['e:image', attributes, ['e:image-title', {}, 0]];
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
return ['e:image', attributes];
|
58
|
+
}
|
45
59
|
}
|
46
60
|
};
|
47
61
|
//# sourceMappingURL=imageSchema.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"imageSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/imageSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAE9B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE/D,MAAM,iBAAiB,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,iBAA+C,EAAY,EAAE,CAAC,CAAC;IAC9F,GAAG,iBAAiB;IACpB,KAAK,EAAE;QACL,GAAG,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,KAAK;QAC3B,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACxB,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACxB,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;
|
1
|
+
{"version":3,"file":"imageSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/imageSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAE9B,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE/D,MAAM,iBAAiB,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,iBAA+C,EAAY,EAAE,CAAC,CAAC;IAC9F,GAAG,iBAAiB;IACpB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,GAAG;IACV,KAAK,EAAE;QACL,GAAG,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,KAAK;QAC3B,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACxB,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACzB,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACxB,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;QACvB,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;KAC7B;IACD,QAAQ,EAAE;QACR;YACE,GAAG,EAAE,iCAAiC;YACtC,QAAQ,CAAC,OAAO;gBACd,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;gBAEvC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE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M,UAAU,GAAG,CAAC,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAC3D,IAAI,GAAG,KAAK,KAAK,EAAE,CAAC;gBAClB,OAAO,cAAc,CAAC,KAAK,CAAC,CAAA;YAC9B,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC,CAAC,CAAA;QACF,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACxB,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE,CAAC,eAAe,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAA;QAC1D,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;QAChC,CAAC;IACH,CAAC;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"spanLang.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanLang.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,eAAO,MAAM,YAAY,EAAE,QAqB1B,CAAA"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export const subSubSchema = {
|
2
|
+
sub: {
|
3
|
+
parseDOM: [
|
4
|
+
{
|
5
|
+
tag: 'sub'
|
6
|
+
}
|
7
|
+
],
|
8
|
+
toDOM() {
|
9
|
+
return ['sub', 0];
|
10
|
+
}
|
11
|
+
},
|
12
|
+
sup: {
|
13
|
+
parseDOM: [
|
14
|
+
{
|
15
|
+
tag: 'sup'
|
16
|
+
}
|
17
|
+
],
|
18
|
+
toDOM() {
|
19
|
+
return ['sup', 0];
|
20
|
+
}
|
21
|
+
}
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=spanLang.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"spanLang.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanLang.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAa;IACpC,GAAG,EAAE;QACH,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,KAAK;aACX;SACF;QACD,KAAK;YACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnB,CAAC;KACF;IACD,GAAG,EAAE;QACH,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,KAAK;aACX;SACF;QACD,KAAK;YACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnB,CAAC;KACF;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"spanWithLangSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanWithLangSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,mBAAmB,CAAA;AAElD,eAAO,MAAM,kBAAkB,EAAE,QAiBhC,CAAA"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export const spanWithLangSchema = {
|
2
|
+
spanWithLang: {
|
3
|
+
attrs: {
|
4
|
+
lang: { default: null }
|
5
|
+
},
|
6
|
+
parseDOM: [
|
7
|
+
{
|
8
|
+
tag: 'span[lang]',
|
9
|
+
getAttrs(dom) {
|
10
|
+
return { lang: dom.getAttribute('lang') || null };
|
11
|
+
}
|
12
|
+
}
|
13
|
+
],
|
14
|
+
toDOM(node) {
|
15
|
+
return ['span', { lang: node.attrs.lang }, 0];
|
16
|
+
}
|
17
|
+
}
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=spanWithLangSchema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"spanWithLangSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanWithLangSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,kBAAkB,GAAa;IAC1C,YAAY,EAAE;QACZ,KAAK,EAAE;YACL,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SACxB;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,YAAY;gBACjB,QAAQ,CAAC,GAAgB;oBACvB,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAA;gBACnD,CAAC;aACF;SACF;QACD,KAAK,CAAC,IAAU;YACd,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAc,EAAE,EAAE,CAAC,CAAC,CAAA;QACzD,CAAC;KACF;CACF,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"spanWithNowrapSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanWithNowrapSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC5C,
|
1
|
+
{"version":3,"file":"spanWithNowrapSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/spanWithNowrapSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC5C,cAAc,EAAE;QACd,KAAK,EAAE;YACL,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;SACzB;QACD,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,wBAAwB;gBAC7B,QAAQ,CAAC,GAAgB;oBACvB,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA;gBACrD,CAAC;aACF;SACF;QACD,KAAK,CAAC,IAAU;YACd,OAAO,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC,CAAA;QAC3D,CAAC;KACF;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subSup.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/subSup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,eAAO,MAAM,YAAY,EAAE,QAqB1B,CAAA"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export const subSubSchema = {
|
2
|
+
sub: {
|
3
|
+
parseDOM: [
|
4
|
+
{
|
5
|
+
tag: 'sub'
|
6
|
+
}
|
7
|
+
],
|
8
|
+
toDOM() {
|
9
|
+
return ['sub', 0];
|
10
|
+
}
|
11
|
+
},
|
12
|
+
sup: {
|
13
|
+
parseDOM: [
|
14
|
+
{
|
15
|
+
tag: 'sup'
|
16
|
+
}
|
17
|
+
],
|
18
|
+
toDOM() {
|
19
|
+
return ['sup', 0];
|
20
|
+
}
|
21
|
+
}
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=subSup.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subSup.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/subSup.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAa;IACpC,GAAG,EAAE;QACH,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,KAAK;aACX;SACF;QACD,KAAK;YACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnB,CAAC;KACF;IACD,GAAG,EAAE;QACH,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,KAAK;aACX;SACF;QACD,KAAK;YACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnB,CAAC;KACF;CACF,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subSupSchema.d.ts","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/subSupSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,eAAO,MAAM,YAAY,EAAE,QAqB1B,CAAA"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export const subSupSchema = {
|
2
|
+
sub: {
|
3
|
+
parseDOM: [
|
4
|
+
{
|
5
|
+
tag: 'sub'
|
6
|
+
}
|
7
|
+
],
|
8
|
+
toDOM() {
|
9
|
+
return ['sub', 0];
|
10
|
+
}
|
11
|
+
},
|
12
|
+
sup: {
|
13
|
+
parseDOM: [
|
14
|
+
{
|
15
|
+
tag: 'sup'
|
16
|
+
}
|
17
|
+
],
|
18
|
+
toDOM() {
|
19
|
+
return ['sup', 0];
|
20
|
+
}
|
21
|
+
}
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=subSupSchema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"subSupSchema.js","sourceRoot":"","sources":["../../../../../src/components/grading-instructions/editor/schemas/subSupSchema.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAa;IACpC,GAAG,EAAE;QACH,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,KAAK;aACX;SACF;QACD,KAAK;YACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnB,CAAC;KACF;IACD,GAAG,EAAE;QACH,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,KAAK;aACX;SACF;QACD,KAAK;YACH,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QACnB,CAAC;KACF;CACF,CAAA"}
|