mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-05 07:40:24 +08:00
18 lines
277 B
Go
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
|
|
}
|