@file-viewer/renderer-word 3.3.5 → 3.3.7
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.en.md +4 -0
- package/README.md +4 -0
- package/README.zh-CN.md +2 -0
- package/dist/wordDocx.js +4 -1
- package/package.json +4 -4
package/README.en.md
CHANGED
|
@@ -57,6 +57,10 @@ current preview without replacing the file. It does not accept/reject revisions
|
|
|
57
57
|
or rewrite the original bytes. Text revisions are not a claim of complete
|
|
58
58
|
Word review-history, formatting-change, or move-tracking support.
|
|
59
59
|
|
|
60
|
+
In DOCX preview, select a comment marker in `all` review mode to read its
|
|
61
|
+
contents. The `final` and `original` modes hide comment markers. Printing
|
|
62
|
+
and HTML export omit the comment overlays.
|
|
63
|
+
|
|
60
64
|
## Offline Assets
|
|
61
65
|
|
|
62
66
|
DOCX Worker defaults to viewer assets:
|
package/README.md
CHANGED
|
@@ -57,6 +57,10 @@ current preview without replacing the file. It does not accept/reject revisions
|
|
|
57
57
|
or rewrite the original bytes. Text revisions are not a claim of complete
|
|
58
58
|
Word review-history, formatting-change, or move-tracking support.
|
|
59
59
|
|
|
60
|
+
In DOCX preview, select a comment marker in `all` review mode to read its
|
|
61
|
+
contents. The `final` and `original` modes hide comment markers. Printing
|
|
62
|
+
and HTML export omit the comment overlays.
|
|
63
|
+
|
|
60
64
|
## Offline Assets
|
|
61
65
|
|
|
62
66
|
DOCX Worker defaults to viewer assets:
|
package/README.zh-CN.md
CHANGED
|
@@ -46,6 +46,8 @@ Word 2003 XML 按根元素及其完整命名空间识别,HTML 注释、正文
|
|
|
46
46
|
|
|
47
47
|
`options.docx.reviewMode` 同时适用于 DOC 和 DOCX:`all`(默认)用下划线显示实际插入、用删除线显示实际删除;`final` 显示定稿,`original` 显示修订前文字。同一组件修改该参数后会更新预览,不需要重新选择文件,也不会接受、拒绝修订或重写原始文件。文本修订支持不等于完整支持 Word 审阅历史、格式修订或移动记录。
|
|
48
48
|
|
|
49
|
+
在 DOCX 的 `all` 审阅预览中,点击标记可阅读批注。`final` 和 `original` 模式隐藏批注标记。打印和 HTML 导出省略批注浮层。
|
|
50
|
+
|
|
49
51
|
## 离线资产
|
|
50
52
|
|
|
51
53
|
DOCX Worker 默认读取 viewer assets 下的:
|
package/dist/wordDocx.js
CHANGED
|
@@ -115,10 +115,12 @@ export const createDocxOptions = (target, context, notifyProgressiveRender) => {
|
|
|
115
115
|
};
|
|
116
116
|
const externalLinkPolicy = (_b = docxOptions === null || docxOptions === void 0 ? void 0 : docxOptions.externalLinkPolicy) !== null && _b !== void 0 ? _b : 'block';
|
|
117
117
|
const externalResourcePolicy = (_c = docxOptions === null || docxOptions === void 0 ? void 0 : docxOptions.externalResourcePolicy) !== null && _c !== void 0 ? _c : 'block';
|
|
118
|
+
const reviewMode = (_d = docxOptions === null || docxOptions === void 0 ? void 0 : docxOptions.reviewMode) !== null && _d !== void 0 ? _d : 'all';
|
|
118
119
|
const options = {
|
|
119
120
|
useWorker,
|
|
120
121
|
exposeDisplayTargets: (docxOptions === null || docxOptions === void 0 ? void 0 : docxOptions.exposeDisplayTargets) === true,
|
|
121
|
-
reviewMode
|
|
122
|
+
reviewMode,
|
|
123
|
+
renderComments: reviewMode === 'all',
|
|
122
124
|
breakPages: true,
|
|
123
125
|
fixedPageHeight: usePagedLayout,
|
|
124
126
|
ignoreLastRenderedPageBreak: (_e = docxOptions === null || docxOptions === void 0 ? void 0 : docxOptions.ignoreLastRenderedPageBreak) !== null && _e !== void 0 ? _e : !usePagedLayout,
|
|
@@ -519,6 +521,7 @@ async function prepareDocxCloneForExport(target) {
|
|
|
519
521
|
const selector = '.docx-page-frame, .docx-flow-frame, .docx-canvas-sheet';
|
|
520
522
|
const liveFrames = Array.from(target.querySelectorAll(selector));
|
|
521
523
|
const clone = target.cloneNode(true);
|
|
524
|
+
clone.querySelectorAll('[data-docx-change-kind="comment"]').forEach(comment => comment.remove());
|
|
522
525
|
replaceFileViewerCanvasWithImages(target, clone);
|
|
523
526
|
const engineWrapper = clone.querySelector('.docx-wrapper');
|
|
524
527
|
const printDocument = engineWrapper
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@file-viewer/renderer-word",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Standalone DOCX, DOC, and OpenDocument renderer for File Viewer; RTF parsing is an explicit opt-in capability.",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"README.zh-CN.md"
|
|
82
82
|
],
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@file-viewer/core": "3.3.
|
|
85
|
-
"@file-viewer/doc": "3.3.
|
|
86
|
-
"@file-viewer/docx": "0.3.
|
|
84
|
+
"@file-viewer/core": "3.3.7",
|
|
85
|
+
"@file-viewer/doc": "3.3.7",
|
|
86
|
+
"@file-viewer/docx": "0.3.43",
|
|
87
87
|
"jszip": "3.10.2"
|
|
88
88
|
},
|
|
89
89
|
"fileViewer": {
|