1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-12 11:40:28 +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

@@ -69,3 +69,11 @@ func (p *Paragraph) AddPageBreaks() *Run {
p.Children = append(p.Children, run)
return run
}
func (p *Paragraph) AddStyle(val string) *Paragraph {
if p.Properties == nil {
p.Properties = &ParagraphProperties{}
}
p.Properties.Style = &Style{Val: val}
return p
}