@docx-editor.dev/docx-to-markdown 2.21.0 → 2.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -77,7 +77,6 @@ The package uses the Apache 2.0 license, including comment and tracked-change ex
77
77
  ## Next steps
78
78
 
79
79
  - [Configure fonts and troubleshoot page layout](docs/fonts.md).
80
-
81
80
  - [Include and deliver images](docs/images.md).
82
81
  - [Connect the converter to your application](docs/integrations.md).
83
82
  - [Review export options and result fields](docs/api.md).
@@ -10,6 +10,8 @@ Install the packages, then create one LangChain document for each exported page:
10
10
  npm install @docx-editor.dev/docx-to-markdown @docx-editor.dev/core @langchain/core
11
11
  ```
12
12
 
13
+ Convert the file and map its pages to LangChain documents:
14
+
13
15
  ```ts
14
16
  import { readFile } from 'node:fs/promises';
15
17
  import { Document } from '@langchain/core/documents';
@@ -40,7 +42,7 @@ const records = result.pages.map((page) => ({
40
42
  }));
41
43
  ```
42
44
 
43
- Map these fields to your pipeline's document schema. For Python applications, expose the Node.js converter through a service that returns JSON.
45
+ Map these fields to your pipeline's document schema. For Python applications, use the [Python package](../../../python/docx-to-markdown/README.md).
44
46
 
45
47
  ## Next.js
46
48
 
@@ -57,6 +59,8 @@ export default {
57
59
  };
58
60
  ```
59
61
 
62
+ Add a route handler that converts DOCX bytes and returns JSON:
63
+
60
64
  ```ts
61
65
  // app/api/convert/route.ts
62
66
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docx-editor.dev/docx-to-markdown",
3
- "version": "2.21.0",
3
+ "version": "2.21.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -49,7 +49,7 @@
49
49
  "@docx-editor.dev/core": "~2.21.0"
50
50
  },
51
51
  "dependencies": {
52
- "@docx-editor.dev/fonts": "~2.21.0",
52
+ "@docx-editor.dev/fonts": "~2.21.1",
53
53
  "fflate": "^0.8.2"
54
54
  },
55
55
  "devDependencies": {