Versions in this module Expand all Collapse all v1 v1.1.0 Sep 3, 2021 Changes in this version type Document + func (d *Document) InsertBlockAfterBlockByID(i int, wp WP) error + func (d *Document) RemoveBlockByID(i int) error v0 v0.1.1 Aug 27, 2021 Changes in this version + const Open + const Self + var Black = "000000" + var Blue = "0000FF" + var Cyan = "00FFFF" + var Gray = "808080" + var Green = "008000" + var Lime = "00FF00" + var Magenta = "FF00FF" + var Maroon = "800000" + var Navy = "000080" + var Olive = "808000" + var Purple = "800080" + var Red = "FF0000" + var Silver = "C0C0C0" + var Teal = "008080" + var White = "FFFFFF" + var Yellow = "FFFF00" + func AtomicWPTokensToString(token WPTokens) string + func ExtractWPToArrayTextString(wp WP) ([]string, error) + func GetTextFromXML(src string) (string, error) + func RebuildBlocks(pattern string, source []string) ([]string, int, error) + func Screening(s string) string + type Block struct + Body string + Footer string + Head Font + type Document struct + SectPr SectPr + WP []WP + func (d *Document) AddNewBlock(s string) + func (d *Document) AppendWPBlockInToEnd(block WP) + func (d *Document) BodyToString() string + func (d *Document) CreateMarkedStringList(mp MarkerParams, letter ...string) []WP + func (d *Document) EditBlockByID(id int) + func (d *Document) GetBlockByID(id int) WP + func (d *Document) GetBlockIDByTag(tag string) (int, error) + func (d *Document) GetCopyBlockByTag(pattern string) (WP, error) + func (d *Document) InstertBlockAfterBlockByID(i int, wp WP) error + func (d *Document) ReplaceTextByTag(pattern string, text string) error + type Docx struct + func (d *Docx) AddBlockAfterElement(elemNum int, element string, body []string) []string + func (d *Docx) AddBlockAtTheBeginning(element string, body []string) []string + func (d *Docx) AddBlockAtTheEnd(element string, body []string) []string + func (d *Docx) AddBlockBeforeElement(elemNum int, element string, body []string) []string + func (d *Docx) BlockToString(block Block) string + func (d *Docx) BodyGlue(body []string) string + func (d *Docx) BodyParse(body string) []string + func (d *Docx) Compile(path string, doc Document) error + func (d *Docx) CreateNewBlock(simpleword string) string + func (d *Docx) CreateStructedBlock(simpleword string, arr ...Font) Block + func (d *Docx) EditStructedBlockParams(block Block) Block + func (d *Docx) EditTextInStringBlock(block string, newText string) string + func (d *Docx) GetContent() string + func (d *Docx) GetFirstElementContain(word string, body []string) (int, error) + func (d *Docx) GetTextInBlock(s string) string + func (d *Docx) GlueNodes(header, body, footer string) + func (d *Docx) ParseBlockToStruct(s string) Block + func (d *Docx) ParseNode() (string, string, string) + func (d *Docx) Parser() (Document, error) + func (d *Docx) Replace(oldString string, newString string, num int) (err error) + func (d *Docx) ReplaceBlockToBlocks(bodypart []string, id int, blocks []Block) []string + func (d *Docx) ReplaceFooter(oldString string, newString string) (err error) + func (d *Docx) ReplaceHeader(oldString string, newString string) (err error) + func (d *Docx) ReplaceLink(oldString string, newString string, num int) (err error) + func (d *Docx) ReplaceRaw(oldString string, newString string, num int) + func (d *Docx) ReplaceTextInBlock(old, new string, body []string) []string + func (d *Docx) ReplaceWithTag(oldString string, newString string) (err error) + func (d *Docx) SetContent(content string) + func (d *Docx) Write(ioWriter io.Writer) (err error) + func (d *Docx) WriteToFile(path string) (err error) + type Font struct + Another string + Bold bool + Color string + FontName string + FontSize int + Italic bool + Strike bool + type MarkerParams struct + type RPr struct + Body string + Tag string + type ReplaceDocx struct + func ReadDocx(reader ZipData) (*ReplaceDocx, error) + func ReadDocxFile(path string) (*ReplaceDocx, error) + func ReadDocxFromMemory(data io.ReaderAt, size int64) (*ReplaceDocx, error) + func (r *ReplaceDocx) Close() error + func (r *ReplaceDocx) Editable() *Docx + type SectPr struct + Body string + Tag string + type WP struct + Body []WPTokens + Tag string + func BuildArrayTextStringToWP(wp WP, bodyStrings []string) (WP, error) + type WPTokens struct + Attr string + Body string + Status int + Tag string + type WR struct + Body string + Tag string + type WpPr struct + Body string + Tag string + type ZipData interface + type ZipFile struct + type ZipInMemory struct