* 处理文本节点转换为TextRun
($: any, node: any, baseFontSize: number, baseFontFamily: string)
| 833 | * 处理文本节点转换为TextRun |
| 834 | */ |
| 835 | private processTextNodeToTextRun($: any, node: any, baseFontSize: number, baseFontFamily: string): any { |
| 836 | const rawText = $(node).text(); |
| 837 | const sanitizedText = this.sanitizeHtml(rawText); |
| 838 | if (sanitizedText.trim()) { |
| 839 | return new TextRun({ |
| 840 | text: sanitizedText, |
| 841 | size: baseFontSize, |
| 842 | font: baseFontFamily, |
| 843 | }); |
| 844 | } |
| 845 | return null; |
| 846 | } |
| 847 | |
| 848 | /** |
| 849 | * 处理标签节点转换为TextRun |
no test coverage detected