Skip to content

Commit 7cd444d

Browse files
committed
update schema for formattedText
1 parent 3e80695 commit 7cd444d

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

packages/dds/tree/src/test/domain-schema-compatibility-snapshots/formattedText/2.92.0.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,34 @@
8181
"allowUnknownOptionalFields": false
8282
}
8383
},
84+
"com.fluidframework.text.formatted.lineTag.checked": {
85+
"object": {
86+
"kind": 2,
87+
"fields": {},
88+
"allowUnknownOptionalFields": false
89+
}
90+
},
91+
"com.fluidframework.text.formatted.lineTag.unchecked": {
92+
"object": {
93+
"kind": 2,
94+
"fields": {},
95+
"allowUnknownOptionalFields": false
96+
}
97+
},
8498
"com.fluidframework.text.formatted.lineTag.blockquote": {
8599
"object": {
86100
"kind": 2,
87101
"fields": {},
88102
"allowUnknownOptionalFields": false
89103
}
90104
},
105+
"com.fluidframework.text.formatted.lineTag.codeBlock": {
106+
"object": {
107+
"kind": 2,
108+
"fields": {},
109+
"allowUnknownOptionalFields": false
110+
}
111+
},
91112
"com.fluidframework.leaf.number": {
92113
"leaf": {
93114
"kind": 3,
@@ -122,8 +143,17 @@
122143
"com.fluidframework.text.formatted.lineTag.ol": {
123144
"isStaged": false
124145
},
146+
"com.fluidframework.text.formatted.lineTag.checked": {
147+
"isStaged": false
148+
},
149+
"com.fluidframework.text.formatted.lineTag.unchecked": {
150+
"isStaged": false
151+
},
125152
"com.fluidframework.text.formatted.lineTag.blockquote": {
126153
"isStaged": false
154+
},
155+
"com.fluidframework.text.formatted.lineTag.codeBlock": {
156+
"isStaged": false
127157
}
128158
},
129159
"storedKey": "tag"

packages/dds/tree/src/text/textDomainFormatted.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ export namespace FormattedTextAsTree {
415415
"h5",
416416
"li",
417417
"ol",
418+
"checked",
419+
"unchecked",
418420
"blockquote",
419421
"codeBlock",
420422
]);

packages/framework/react/src/text/formatted/quillFormattedView.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ const headerToLineTag = {
7777
4: "h4",
7878
5: "h5",
7979
} as const satisfies Readonly<Record<number, LineTagValue>>;
80+
/** Quill list tags → LineTag values. */
81+
const listToLineTag = {
82+
bullet: "li",
83+
ordered: "ol",
84+
checked: "checked",
85+
unchecked: "unchecked",
86+
} as const satisfies Readonly<Record<string, LineTagValue>>;
8087
/** LineTag values → Quill attributes. Used by buildDeltaFromTree (tree → Quill). */
8188
const lineTagToQuillAttributes = {
8289
h1: { header: 1 },
@@ -86,6 +93,8 @@ const lineTagToQuillAttributes = {
8693
h5: { header: 5 },
8794
li: { list: "bullet" },
8895
ol: { list: "ordered" },
96+
checked: { list: "checked" },
97+
unchecked: { list: "unchecked" },
8998
blockquote: { blockquote: true },
9099
codeBlock: { "code-block": "plain" },
91100
} as const satisfies Readonly<Record<LineTagValue, Record<string, unknown>>>;

0 commit comments

Comments
 (0)