forked from react-office-viewer/react-office-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
50 lines (48 loc) · 1.79 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import "./scss/index.scss";
import ReactDocumentViewer from "./ReactDocumentViewer";
window.ReactDocumentViewer = ReactDocumentViewer;
if (process.env.NODE_ENV !== "production") {
window.addEventListener("load", () => {
window.ReactDocumentViewer = new ReactDocumentViewer({
rootElement: document.getElementById("root"),
// files: [],
files: [
{ src: '/docs/test.jpg', name: '', mime: '' },
{ src: '/docs/test.webp', name: 'Image #2', mime: '' },
],
downloadInNewWindow: false,
// disablePlugins: ["pdf"],
// locale: 'es',
// allowOpenFile: true,
// noResetZoomAfterChange: true,
// activeIndex: 0,
// container: '',
// drag: false,
// showAttributes: false,
// showFileName: false,
// zoomable: false,
// rotatable: false,
// scalable: false,
// noImgDetails: true,
noNavbar: false,
// noToolbar: true,
// noFooter: true,
// allowLoop: false,
// changeable: false,
// customToolbar: () =>{},
// zoomSpeed: 0.1,
// defaultSize: { width: 100, height: 200 },
// disableKeyboardSupport: false,
// noResetZoomAfterChange: false,
// noLimitInitializationSize: false,
// defaultScale: 0.5,
// disableMouseZoom: false,
// showTotal: false,
// maxScale: 1.5,
// minScale: 0.5,
// allowDownloadFile: false,
// pdfWorkerUrl: 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/4.5.136/pdf.worker.mjs'
});
window.ReactDocumentViewer.render();
});
}