File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
test/domain-schema-compatibility-snapshots/formattedText
framework/react/src/text/formatted Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 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 ,
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"
Original file line number Diff line number Diff line change @@ -415,6 +415,8 @@ export namespace FormattedTextAsTree {
415415 "h5" ,
416416 "li" ,
417417 "ol" ,
418+ "checked" ,
419+ "unchecked" ,
418420 "blockquote" ,
419421 "codeBlock" ,
420422 ] ) ;
Original file line number Diff line number Diff 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). */
8188const 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 > > > ;
You can’t perform that action at this time.
0 commit comments