Преглед изворни кода

feat(types): Expand editor type definitions with text styling and table layout options

- Add strike-through style support to RichTextStyle interface
- Update font_name documentation to clarify eastAsia font support
- Add width property to TableCell for cell-level width control
- Add height property to TableRow for row-level height control
- Enable more granular control over table layout and text formatting options
Zhang Yice пре 1 месец
родитељ
комит
1b362a0709
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      src/types/editor.ts

+ 4 - 1
src/types/editor.ts

@@ -22,8 +22,9 @@ export interface RichTextStyle {
22
   bold?: boolean;
22
   bold?: boolean;
23
   italic?: boolean;
23
   italic?: boolean;
24
   underline?: boolean;
24
   underline?: boolean;
25
+  strike?: boolean;       // 删除线
25
   color?: string;         // 十六进制颜色,如"FF0000"
26
   color?: string;         // 十六进制颜色,如"FF0000"
26
-  font_name?: string;     // 字体名称
27
+  font_name?: string;     // 字体名称(包括eastAsia字体)
27
   font_size?: number;     // 字号(磅)
28
   font_size?: number;     // 字号(磅)
28
 }
29
 }
29
 
30
 
@@ -118,6 +119,7 @@ export interface TableCell {
118
   text: string | RichText[];
119
   text: string | RichText[];
119
   rowspan: number;
120
   rowspan: number;
120
   colspan: number;
121
   colspan: number;
122
+  width?: number;         // 单元格宽度(磅)
121
   style: CellStyleOverrides;
123
   style: CellStyleOverrides;
122
 }
124
 }
123
 
125
 
@@ -126,6 +128,7 @@ export interface TableCell {
126
  */
128
  */
127
 export interface TableRow {
129
 export interface TableRow {
128
   cells: TableCell[];
130
   cells: TableCell[];
131
+  height?: number;        // 行高(磅)
129
 }
132
 }
130
 
133
 
131
 /**
134
 /**