feat:rich text editor by canvas

This commit is contained in:
黄云飞
2021-11-12 22:22:05 +08:00
commit 2739d4069f
36 changed files with 1251 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
export interface IElement {
type?: 'TEXT' | 'IMAGE';
value: string;
font?: string;
size?: number;
width?: number;
height?: number;
bold?: boolean;
color?: string;
italic?: boolean;
underline?: boolean;
strikeout?: boolean;
}
export interface IElementPosition {
index: number;
value: string,
rowNo: number;
lineHeight: number;
metrics: TextMetrics;
isLastLetter: boolean,
coordinate: {
leftTop: number[];
leftBottom: number[];
rightTop: number[];
rightBottom: number[];
}
}