You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `docx` instance from the example above provides access to some interesting helper classes that
21
+
are roughly organised in the way that a DOCX archive is itself;
22
+
23
+
-`docx.bookmarks` to add bookmarks that can be shared between ranges and links. [Read more about cross-referencing to bookmarks](../examples/bookmarks.md).
24
+
-`docx.document` to control the document contents, and relationships directly to `word/document.xml`
25
+
-`docx.document.styles` to read/write custom style definitions
26
+
-`docx.document.numbering` to read/write list numbering schemes. [Read more about creating lists and numbering](../examples/lists.md).
27
+
-`docx.document.settings` to read or write `settings.xml`
28
+
-`docx.document.headers` and `docx.document.headers` to add those things. [Read more about setting page headers and footers](../examples/headers-and-footers.md).
29
+
30
+
### Starting from a file
31
+
32
+
For all intents and purposes a `.dotx` template file is the same as the `.docx` document instance. You can instantiate
33
+
`docxml` from them:
34
+
35
+
```tsx
36
+
const docx =Docx.fromArchive('my-template.dotx');
37
+
```
38
+
39
+
The `docx` instance that returns can be used in all the same ways as if you were to instantiate `docxml` in another way,
40
+
but it'll be prepopulated with all the styles, numberings, headers/footers, settings, document contents, etc. that already
0 commit comments