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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
| <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>OnlyOffice</title> <style> html, body { padding: 0; margin: 0; } </style> </head> <body> <script type="text/javascript" src="https://example.com/web-apps/apps/api/documents/api.js" ></script> <div id="preview"></div> <script type="module"> let config = { document: { documentType: 'text', width: '100%', height: '100%', fileType: fileType, key: key, title: title, url: url, info: { owner: '', sharingSettings: [ { permissions: 'Full Access', user: '', }, { permissions: 'Read Only', user: '', }, ], uploaded: '', }, permissions: { edit: true, fillForms: true, print: true, review: false, comment: true, copy: true, download: true, modifyContentControl: true, modifyFilter: true, }, }, editorConfig: { createUrl: 'http://docServer:port/url-to-create-document/', mode: model, callbackUrl: callbackUrl, lang: 'zh-CN', customization: { help: false, hideRightMenu: false, autosave: false, forcesave: true, chat: false, commentAuthorOnly: false, comments: false, compactHeader: false, compactToolbar: false, compatibleFeatures: false, macros: false, macrosMode: 'warn', plugins: false, showReviewChanges: false, spellcheck: false, toolbarNoTabs: false, unit: 'cm', zoom: 100, customer: { address: 'My City, 123a-45', info: 'Some additional information', logo: 'https://example.com/logo-big.png', mail: 'john@example.com', name: '欧阳锋', www: 'example.com', }, feedback: { url: 'https://example.com', visible: false, }, goback: { blank: true, requestClose: false, text: 'Open file location', url: 'https://example.com', }, logo: { image: 'https://example.com/logo.png', imageEmbedded: 'https://example.com/logo_em.png', url: 'https://www.baidu.com', }, }, user: { id: 'admin', name: '操作员', }, embedded: { embedUrl: 'https://example.com/embedded?doc=exampledocument1.docx', fullscreenUrl: 'https://example.com/embedded?doc=exampledocument1.docx#fullscreen', saveUrl: 'https://example.com/download?doc=exampledocument1.docx', shareUrl: 'https://example.com/view?doc=exampledocument1.docx', toolbarDocked: 'top', }, },
events: { }, } const docEditor = new DocsAPI.DocEditor('preview', config) </script> </body> </html>
|