Commit Graph

19 Commits

Author SHA1 Message Date
0bc36d924f Write tests 2021-03-13 22:10:00 +00:00
870c222dd5 Allow custom text properties to be included 2020-08-03 17:08:04 +12:00
816cb54b14 Optimize XML output by properly constructing objects to send to the xml library so that it can produce proper empty elements.
Rework the way attributes are stored in ImportedXmlComponent to match elsewhere (required allowing for a null xmlKeys in the XmlAttributeComponent interface).
Rework the way paragraphs get added to the end of table cells if needed.
The goal in both reworks is to not mess around with the objects output from `prepForXml` if we can avoid it.
Made the output of RunProperties, ParagraphProperties, TableCellProperties, TableRowProperties, and TableProperties all optional based on whether they contain any attributes or children.  Changed code in PageBorders, TableCellMargin, and TableCellBorders that implemented this same thing by overriding `prepForXml` so that it uses the new XmlComponent subclass instead.
Removed commented out code that attempted to fix-up XML output and make proper empty elements.
Fixed all affected tests.
Turn off `no-null-keyword` in the linter as we need to use null to signal to the `xml` library to create an empty element with no attributes (`undefined` will not work in its place).

Fixes #306
2019-04-09 05:27:18 -04:00
db60270e1f fix: relationship and content type for settings 2019-03-05 15:40:00 +01:00
7980f14efb Introduce some functional programming techniques 2018-11-02 02:51:57 +00:00
4742cf0f3f Clean imports 2018-10-26 01:04:07 +01:00
5f594a822f Fix and enable linting on tests 2018-08-09 23:29:40 +01:00
6c85ad3188 Fix tests 2018-06-30 23:39:45 +01:00
b9e702086a Merge branch 'master' into feat/footnotes
# Conflicts:
#	demo/demo16.js
#	src/file/file.ts
2018-06-27 23:34:23 +01:00
84ebf8e6c3 Remove old implementation of first page header 2018-06-25 22:13:12 +01:00
99290d646e Add footnote support to API 2018-06-25 19:49:46 +01:00
f1ac646518 Merge branch 'feature/multiple-sections' of https://github.com/h4buli/docx into feat/multiple-headers
# Conflicts:
#	src/export/packer/compiler.ts
#	src/file/content-types/content-types.ts
#	src/file/document/body/section-properties/header-reference/header-reference.ts
#	src/file/document/body/section-properties/section-properties.ts
#	src/file/file.ts
#	src/file/media/media.ts
2018-06-22 22:59:38 +01:00
0b963ec3b8 feature: add support to add mutiple sections to the document inc. headers and footers
- write missing tests
2018-06-21 12:03:34 +02:00
7584671312 Fixed TSLint Errors 2018-05-18 09:21:27 -06:00
87648a742c Initial Commit 2018-05-12 20:04:54 -04:00
a78f06b41b Remove all references to template 2018-02-08 00:12:59 +00:00
ce7ef30806 Fix Prettier styling changes 2018-02-05 01:44:28 +00:00
69707a7207 Add more content type files 2018-02-03 20:56:20 +00:00
cfd3505414 Add content types initial files 2018-02-02 01:57:50 +00:00