1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-12 03:20:23 +08:00

feat: enable table customization and styles for paragraphs (#39)

This commit is contained in:
David Johnson
2024-09-24 11:15:22 -04:00
committed by GitHub
parent f03badc77c
commit 7782d22c85
6 changed files with 114 additions and 19 deletions

View File

@@ -83,6 +83,15 @@ func (r *Run) Highlight(val string) *Run {
return r
}
func (r *Run) Strike(val bool) *Run {
trueFalseStr := "false"
if val {
trueFalseStr = "true"
}
r.RunProperties.Strike = &Strike{Val: trueFalseStr}
return r
}
// AddTab add a tab in front of the run
func (r *Run) AddTab() *Run {
r.Children = append(r.Children, &Tab{})