@file-viewer/docx 0.3.31 → 0.3.33
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 +15 -0
- package/dist/docx-preview.d.ts +2 -0
- package/dist/docx-preview.js +1 -1
- package/dist/docx-preview.min.js +1 -1
- package/dist/docx-preview.min.mjs +1 -1
- package/dist/docx-preview.mjs +1 -1
- package/dist/docx-preview.worker.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -329,6 +329,21 @@ python3 -m http.server 8000
|
|
|
329
329
|
|
|
330
330
|
The demo is self-contained for normal DOCX files, includes sample documents, page navigation, light/dark rendering and an options panel. TIFF support is loaded only when a document actually contains TIFF media.
|
|
331
331
|
|
|
332
|
+
## Optional display targets
|
|
333
|
+
|
|
334
|
+
Pass `exposeDisplayTargets: true` to `renderAsync` (or to both `parseAsync`
|
|
335
|
+
and `renderDocument` when used separately) to expose paragraph identities as
|
|
336
|
+
`data-office-target` attributes. The value is the OOXML part path followed by
|
|
337
|
+
`#p:<w14:paraId>`, or `#xpath:<structural-path>` when no paragraph ID is stored.
|
|
338
|
+
Repeated headers and split paragraph fragments may share an identity.
|
|
339
|
+
|
|
340
|
+
This option is disabled by default and works with the matching Worker bundle.
|
|
341
|
+
It adds read-only identity metadata, not an editing or document write-back API.
|
|
342
|
+
An external display adapter may use it to locate rendered text. Reloading or
|
|
343
|
+
repaginating the document can replace DOM nodes; adapters must reapply their
|
|
344
|
+
own cached display state. Identities are scoped to the source package and are
|
|
345
|
+
not guaranteed across structural edits to the original file.
|
|
346
|
+
|
|
332
347
|
## Notes on fidelity
|
|
333
348
|
|
|
334
349
|
The renderer follows OOXML semantics and uses browser-native layout. It is designed for production preview and regression testing, not for claiming byte-for-byte or pixel-perfect identity with Microsoft Word's private layout engine. Use `LayoutSnapshot` and the supplied regression fixture to monitor the remaining differences that depend on browser fonts, font fallback and shaping engines.
|
package/dist/docx-preview.d.ts
CHANGED