mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-12 11:40:28 +08:00
feat: embed template xmls
This commit is contained in:
17
apitext.go
Normal file
17
apitext.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user