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
[👉 Main article](https://github.com/fontoxml/docxml/wiki/Deno-or-Node)
24
24
25
-
`docxml` can be used in [NodeJS](https://nodejs.org/) and [Deno](https://deno.land) according to the traditions in those
26
-
ecosystems. For Node users, simply `npm install docxml` and then `require()` or `import` as you wish. For Deno users,
27
-
`import "deno.land/x/docxml/mod.ts"` or use an import map if you wish.
25
+
`docxml` can be used in [NodeJS](https://nodejs.org/) and [Deno](https://deno.land) according to the conventions of those ecosystems. For Node users, simply `npm install docxml` and then `require()` or `import` as you wish. For Deno users, `import "deno.land/x/docxml/mod.ts"` or use an import map.
[👉 Main article](https://github.com/fontoxml/docxml/wiki/JSX-or-Not)
43
41
44
-
`docxml` is designed to be used in vanilla JavaScript using class component instances, or using JSX if you're on Deno or
45
-
want to use NodeJS and a transpiler like Babel:
42
+
`docxml` is designed to be used in vanilla JavaScript using class component instances, or using JSX if you're on Deno or want to use NodeJS and a transpiler like Babel:
46
43
47
44
```ts
48
45
const para =newParagraph({ alignment: 'center' }, newText({}, 'I want a cookie'));
@@ -82,10 +79,10 @@ await Docx.fromNothing()
82
79
83
80
#### Features
84
81
85
-
To great or small extend, the following features work in the current version of `docxml`. Some items are not ticked off
82
+
To great or small extent, the following features work in the current version of `docxml`. Some items are not ticked off
86
83
yet -- they are not available, but hopefully soon.
87
84
88
-
[👉 See code examples of some or the more intricate features](https://github.com/wvbe/docxml/wiki/Examples)
85
+
[👉 See code examples of some or the more intricate features](https://github.com/fontoxml/docxml/wiki/Examples)
89
86
90
87
**API features:**
91
88
@@ -143,22 +140,13 @@ yet -- they are not available, but hopefully soon.
143
140
144
141
#### Differences with actual MS Word DOCX
145
142
146
-
Obviously `docxml` is a TypeScript project, which is already very different from how you would normally interact
147
-
with a DOCX document. More meaningfully however, `docxml` is meant to make writing DOCX _easier_ than going straight
148
-
to OOXML. For example;
149
-
150
-
- All sizes are of type `Length`, which means it doesn't matter wether you input them as points, centimeters,
151
-
inches, 1/2, 1/8th or 1/20th points, English Metric Units, and so on.
152
-
- The JSX pragma will try to correct components that would lead to invalid XML structures, by splitting the parents of
153
-
invalidly placed components recursively until the new position is valid. Moreover, string content in unexpected places
154
-
is automatically wrapped in `<Text>` when using JSX. This makes the configuration of a new DOCX a little more
155
-
forgiving.
143
+
Obviously `docxml` is a TypeScript project, which is already very different from how you would normally interact with a `.docx` file. More meaningfully however, `docxml` is meant to make writing Word document files _easier_ than going straight to OOXML. For example:
144
+
- All sizes are of type `Length`, which means it doesn't matter wether you input them as points, centimeters, inches, 1/2, 1/8th or 1/20th points, English Metric Units, and so on.
145
+
- The JSX pragma will try to correct components that would lead to invalid XML structures, by splitting the parents of invalidly placed components recursively until the new position is valid. Moreover, string content in unexpected places is automatically wrapped in `<Text>` when using JSX. This makes the configuration of a new DOCX a little more forgiving.
156
146
- Using the `<Image>` or `<Comment>` components will automatically create all required relationships etc.
157
147
- Some of the words have changed, generally speaking `docxml` is more verbose than the DOCX verbiage.
158
-
- Generally speaking `docxml` prefers formal (JS) references over references-by-identifier. In those cases the
159
-
identifiers are randomly generated for you when the `.docx` file is written.
160
-
- Especially in tables and images, a lot of formatting details are automatically applied. In a lot of cases there
161
-
is no API _yet_ to change them.
148
+
- Generally speaking `docxml` prefers formal (JS) references over references-by-identifier. In those cases the identifiers are randomly generated for you when the `.docx` file is written.
149
+
- Especially in tables and images, a lot of formatting details are automatically applied. In a lot of cases there is no API _yet_ to change them.
0 commit comments