Skip to content

Commit

Permalink
feat(docx): bw addon
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Jun 15, 2022
1 parent 2f11c3e commit d935e00
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/better-write-plugin-docx/src/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ export const PluginDocxSet = (
return final
}

const addons = () => {
const bw = (arr: Array<docx.Paragraph | docx.Table | docx.TableOfContents>) => {
arr.push(create().entities().pageBreak())
arr.push(create().entities().headingThree('Documento produzido por betterwrite.io'))
}

return { bw }
}

const create = () => {
const properties = (): docx.ISectionPropertiesOptions => {
return {
Expand Down Expand Up @@ -349,6 +358,8 @@ export const PluginDocxSet = (
})
})

addons().bw(arr)

return arr
}

Expand Down

0 comments on commit d935e00

Please sign in to comment.