1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-04 23:30:25 +08:00
Files
go-docx/apitext.go
2023-02-20 22:48:04 +08:00

18 lines
277 B
Go

package docxlib
// AddText adds text to paragraph
func (p *Paragraph) AddText(text string) *Run {
t := &Text{
Text: text,
}
run := &Run{
Text: t,
RunProperties: &RunProperties{},
}
p.Children = append(p.Children, ParagraphChild{Run: run})
return run
}