mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-22 19:40:42 +08:00
add w:jc & w:tab
This commit is contained in:
16
apipara.go
16
apipara.go
@@ -11,3 +11,19 @@ func (f *Docx) AddParagraph() *Paragraph {
|
||||
|
||||
return p
|
||||
}
|
||||
|
||||
// Justification allows to set para's horizonal alignment
|
||||
//
|
||||
// w:jc 属性的取值可以是以下之一:
|
||||
// start:左对齐。
|
||||
// center:居中对齐。
|
||||
// end:右对齐。
|
||||
// both:两端对齐。
|
||||
// distribute:分散对齐。
|
||||
func (p *Paragraph) Justification(val string) *Paragraph {
|
||||
if p.Properties == nil {
|
||||
p.Properties = &ParagraphProperties{}
|
||||
}
|
||||
p.Properties.Justification = &Justification{Val: val}
|
||||
return p
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user