1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-07 16:50:24 +08:00

add w:u w:i w:b w:highlight

This commit is contained in:
源文雨
2023-02-26 15:31:13 +08:00
parent 0e18f8a163
commit f3265280e3
8 changed files with 88 additions and 22 deletions

View File

@@ -27,6 +27,28 @@ type Size struct {
Val string `xml:"w:val,attr"`
}
// Bold ...
type Bold struct {
XMLName xml.Name `xml:"w:b,omitempty"`
}
// Italic ...
type Italic struct {
XMLName xml.Name `xml:"w:i,omitempty"`
}
// Underline ...
type Underline struct {
XMLName xml.Name `xml:"w:u,omitempty"`
Val string `xml:"w:val,attr,omitempty"`
}
// Highlight ...
type Highlight struct {
XMLName xml.Name `xml:"w:highlight,omitempty"`
Val string `xml:"w:val,attr,omitempty"`
}
// Justification contains the way of the horizonal alignment
//
// w:jc 属性的取值可以是以下之一: