1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-11 19:10:24 +08:00

add AddInlineDrawingFrom

This commit is contained in:
源文雨
2023-02-20 22:48:04 +08:00
parent f07b5dd914
commit 292a298c57
27 changed files with 634 additions and 130 deletions

View File

@@ -39,13 +39,13 @@ func main() {
fmt.Printf("\tWe've found a new run with the text ->%s\n", child.Run.Text.Text)
}
if child.Run.Drawing != nil {
fmt.Printf("\tWe've found a new run with the drawing ->%s\n", child.Run.Drawing.Inline.DistT) // TODO: replace to refid
fmt.Printf("\tWe've found a new run with the drawing ->%d\n", child.Run.Drawing.Inline.DistT) // TODO: replace to refid
}
}
if child.Link != nil {
id := child.Link.ID
text := child.Link.Run.InstrText
link, err := doc.Refer(id)
link, err := doc.ReferHref(id)
if err != nil {
fmt.Printf("\tWe found a link with id %s and text %s without target\n", id, text)
} else {