Try now

Click the buttons with the format names below to try the main functionality of ONLYOFFICE Document Server. You can open various file types for editing, viewing, co-editing, review or see how the rebranding works. Use the </> buttons to view the corresponding example source code.

DocumentsSpreadsheetsPresentations
EditDOCX</>
DOCXF</>
DOC</>
ODT</>
TXT</>
XLSX</>
XLS</>
ODS</>
CSV</>
PPTX</>
PPT</>
ODP</>
Co-EditDOCX</>XLSX</>PPTX</>
Strict Co-EditDOCX</>XLSX</>PPTX</>
Local filterXLSX</>
ReviewDOCX</>
Restricted reviewDOCX</>
Filling in formsOFORM</>
Content control
settings restricted
DOCX</>
CommentDOCX</>XLSX</>PPTX</>
Restricted commentDOCX</>
ViewDOCX</>
PDF</>
XLSX</>PPTX</>
RebrandingDOCX</>XLSX</>PPTX</>
Edit on mobileDOCX</>XLSX</>PPTX</>
View on mobileDOCX</>XLSX</>PPTX</>
Embedded viewDOCX</>XLSX</>PPTX</>

Open docx for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "E7FAFC9C22A8",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open docxf for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docxf",
  14. "key": "D05D6A33",
  15. "title": "Example Form Template Title.docxf",
  16. "url": "https://example.com/url-to-example-document.docxf"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open xlsx for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "53500B46FCA9",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open pptx for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "9E2BDFCD1D75",
  15. "title": "Example Presentation Title.pptx",
  16. "url": "https://example.com/url-to-example-presentation.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open doc for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "doc",
  14. "key": "D21889C484E9",
  15. "title": "Example Document Title.doc",
  16. "url": "https://example.com/url-to-example-document.doc"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open xls for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xls",
  14. "key": "D01A6B57CD96",
  15. "title": "Example Spreadsheet Title.xls",
  16. "url": "https://example.com/url-to-example-spreadsheet.xls"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open ppt for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "ppt",
  14. "key": "EEE93333E5F3",
  15. "title": "Example Presentation Title.ppt",
  16. "url": "https://example.com/url-to-example-presentation.ppt"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open odt for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "odt",
  14. "key": "B95B853D3B1E",
  15. "title": "Example Document Title.odt",
  16. "url": "https://example.com/url-to-example-document.odt"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open ods for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "ods",
  14. "key": "000C2F39D5A4",
  15. "title": "Example Spreadsheet Title.ods",
  16. "url": "https://example.com/url-to-example-spreadsheet.ods"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open odp for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "odp",
  14. "key": "47BAE2E8A54F",
  15. "title": "Example Presentation Title.odp",
  16. "url": "https://example.com/url-to-example-presentation.odp"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open txt for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "txt",
  14. "key": "B2D7ACF65806",
  15. "title": "Example Document Title.txt",
  16. "url": "https://example.com/url-to-example-document.txt"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open csv for editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "csv",
  14. "key": "B04E56B18519",
  15. "title": "Example Spreadsheet Title.csv",
  16. "url": "https://example.com/url-to-example-spreadsheet.csv"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open pdf for viewing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pdf",
  14. "key": "9B9F6EFE8937",
  15. "title": "Example Document Title.pdf",
  16. "url": "https://example.com/url-to-example-document.pdf"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "mode": "view"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open docx for viewing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "D24A86BDE9A2",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "mode": "view"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open xlsx for viewing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "138E9734B413",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "mode": "view"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open pptx for viewing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "37195B2B9BF4",
  15. "title": "Example Presentation Title.pptx",
  16. "url": "https://example.com/url-to-example-presentation.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "mode": "view"
  21. },
  22. "height": "100%",
  23. "width": "100%"
  24. });
  25. </script>
  26. </body>
  27. </html>

Open docx for co-editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "B143195F47A0",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "user": {
  22. "id": "78e1e841",
  23. "name": "John Smith"
  24. }
  25. },
  26. "height": "100%",
  27. "width": "100%"
  28. });
  29. </script>
  30. </body>
  31. </html>
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "B143195F47A0",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "user": {
  22. "id": "F89d8069ba2b",
  23. "name": "Kate Cage"
  24. }
  25. },
  26. "height": "100%",
  27. "width": "100%"
  28. });
  29. </script>
  30. </body>
  31. </html>

Open xlsx for co-editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "6FB60FE9E548",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "user": {
  22. "id": "78e1e841",
  23. "name": "John Smith"
  24. }
  25. },
  26. "height": "100%",
  27. "width": "100%"
  28. });
  29. </script>
  30. </body>
  31. </html>
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "6FB60FE9E548",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "user": {
  22. "id": "F89d8069ba2b",
  23. "name": "Kate Cage"
  24. }
  25. },
  26. "height": "100%",
  27. "width": "100%"
  28. });
  29. </script>
  30. </body>
  31. </html>

Open pptx for co-editing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "B6C57F1FC447",
  15. "title": "Example Presentation Title.pptx",
  16. "url": "https://example.com/url-to-example-presentation.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "user": {
  22. "id": "78e1e841",
  23. "name": "John Smith"
  24. }
  25. },
  26. "height": "100%",
  27. "width": "100%"
  28. });
  29. </script>
  30. </body>
  31. </html>
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "B6C57F1FC447",
  15. "title": "Example Presentation Title.pptx",
  16. "url": "https://example.com/url-to-example-presentation.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "user": {
  22. "id": "F89d8069ba2b",
  23. "name": "Kate Cage"
  24. }
  25. },
  26. "height": "100%",
  27. "width": "100%"
  28. });
  29. </script>
  30. </body>
  31. </html>

Open docx for co-editing in strict mode

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "491BD667CABA",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "autosave": false
  23. },
  24. "user": {
  25. "id": "78e1e841",
  26. "name": "John Smith"
  27. }
  28. },
  29. "height": "100%",
  30. "width": "100%"
  31. });
  32. </script>
  33. </body>
  34. </html>
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "491BD667CABA",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "autosave": false
  23. },
  24. "user": {
  25. "id": "F89d8069ba2b",
  26. "name": "Kate Cage"
  27. }
  28. },
  29. "height": "100%",
  30. "width": "100%"
  31. });
  32. </script>
  33. </body>
  34. </html>

Open xlsx for co-editing in strict mode

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "DB1788E4AF4A",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "autosave": false
  23. },
  24. "user": {
  25. "id": "78e1e841",
  26. "name": "John Smith"
  27. }
  28. },
  29. "height": "100%",
  30. "width": "100%"
  31. });
  32. </script>
  33. </body>
  34. </html>
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "DB1788E4AF4A",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "autosave": false
  23. },
  24. "user": {
  25. "id": "F89d8069ba2b",
  26. "name": "Kate Cage"
  27. }
  28. },
  29. "height": "100%",
  30. "width": "100%"
  31. });
  32. </script>
  33. </body>
  34. </html>

Open pptx for co-editing in strict mode

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "5664FFF42E4E",
  15. "title": "Example Presentation Title.pptx",
  16. "url": "https://example.com/url-to-example-presentation.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "autosave": false
  23. },
  24. "user": {
  25. "id": "78e1e841",
  26. "name": "John Smith"
  27. }
  28. },
  29. "height": "100%",
  30. "width": "100%"
  31. });
  32. </script>
  33. </body>
  34. </html>
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "5664FFF42E4E",
  15. "title": "Example Presentation Title.pptx",
  16. "url": "https://example.com/url-to-example-presentation.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "autosave": false
  23. },
  24. "user": {
  25. "id": "F89d8069ba2b",
  26. "name": "Kate Cage"
  27. }
  28. },
  29. "height": "100%",
  30. "width": "100%"
  31. });
  32. </script>
  33. </body>
  34. </html>

Open docx with rebranding

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "D97815D69205",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "customer": {
  23. "address": "My City, 123a-45",
  24. "info": "Some additional information",
  25. "logo": "https://example.com/logo-big.png",
  26. "mail": "john@example.com",
  27. "name": "John Smith and Co.",
  28. "www": "example.com"
  29. },
  30. "logo": {
  31. "image": "https://example.com/logo.png",
  32. "url": "https://example.com"
  33. }
  34. }
  35. },
  36. "height": "100%",
  37. "width": "100%"
  38. });
  39. </script>
  40. </body>
  41. </html>

Open xlsx with rebranding

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "6CDE57CAF31F",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "customer": {
  23. "address": "My City, 123a-45",
  24. "info": "Some additional information",
  25. "logo": "https://example.com/logo-big.png",
  26. "mail": "john@example.com",
  27. "name": "John Smith and Co.",
  28. "www": "example.com"
  29. },
  30. "logo": {
  31. "image": "https://example.com/logo.png",
  32. "url": "https://example.com"
  33. }
  34. }
  35. },
  36. "height": "100%",
  37. "width": "100%"
  38. });
  39. </script>
  40. </body>
  41. </html>

Open pptx with rebranding

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "E9B24523F469",
  15. "title": "Example Presentation Title.pptx",
  16. "url": "https://example.com/url-to-example-presentation.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "customization": {
  22. "customer": {
  23. "address": "My City, 123a-45",
  24. "info": "Some additional information",
  25. "logo": "https://example.com/logo-big.png",
  26. "mail": "john@example.com",
  27. "name": "John Smith and Co.",
  28. "www": "example.com"
  29. },
  30. "logo": {
  31. "image": "https://example.com/logo.png",
  32. "url": "https://example.com"
  33. }
  34. }
  35. },
  36. "height": "100%",
  37. "width": "100%"
  38. });
  39. </script>
  40. </body>
  41. </html>

Open docx for review

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "9B5D4A67A9A9",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx",
  17. "permissions": {
  18. "edit": false,
  19. "review": true
  20. }
  21. },
  22. "documentType": "word",
  23. "editorConfig": {
  24. "callbackUrl": "https://example.com/url-to-callback.ashx",
  25. "mode": "edit"
  26. },
  27. "height": "100%",
  28. "width": "100%"
  29. });
  30. </script>
  31. </body>
  32. </html>

Open docx for restricted review

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "CE661B77",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx",
  17. "permissions": {
  18. "edit": true,
  19. "review": true,
  20. "reviewGroups": [ "Group2", "" ]
  21. }
  22. },
  23. "documentType": "word",
  24. "editorConfig": {
  25. "callbackUrl": "https://example.com/url-to-callback.ashx",
  26. "mode": "edit"
  27. },
  28. "height": "100%",
  29. "width": "100%"
  30. });
  31. </script>
  32. </body>
  33. </html>

Open oform for filling in forms

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "oform",
  14. "key": "DEEC57D9",
  15. "title": "Example Form Title.oform",
  16. "url": "https://example.com/url-to-example-document.oform",
  17. "permissions": {
  18. "edit": false,
  19. "fillForms": true
  20. }
  21. },
  22. "documentType": "word",
  23. "editorConfig": {
  24. "callbackUrl": "https://example.com/url-to-callback.ashx",
  25. "mode": "edit"
  26. },
  27. "height": "100%",
  28. "width": "100%"
  29. });
  30. </script>
  31. </body>
  32. </html>

Open docx for commenting

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "5C5D4CCA7674",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx",
  17. "permissions": {
  18. "comment": true,
  19. "edit": false
  20. }
  21. },
  22. "documentType": "word",
  23. "editorConfig": {
  24. "callbackUrl": "https://example.com/url-to-callback.ashx",
  25. "mode": "edit"
  26. },
  27. "height": "100%",
  28. "width": "100%"
  29. });
  30. </script>
  31. </body>
  32. </html>

Open xlsx for commenting

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "B62D0C4B9C09",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx",
  17. "permissions": {
  18. "comment": true,
  19. "edit": false
  20. }
  21. },
  22. "documentType": "cell",
  23. "editorConfig": {
  24. "callbackUrl": "https://example.com/url-to-callback.ashx",
  25. "mode": "edit"
  26. },
  27. "height": "100%",
  28. "width": "100%"
  29. });
  30. </script>
  31. </body>
  32. </html>

Open pptx for commenting

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "DA7CC0B9",
  15. "title": "Example Presentation Title.pptx",
  16. "url": "https://example.com/url-to-example-presentation.pptx",
  17. "permissions": {
  18. "comment": true,
  19. "edit": false
  20. }
  21. },
  22. "documentType": "slide",
  23. "editorConfig": {
  24. "callbackUrl": "https://example.com/url-to-callback.ashx",
  25. "mode": "edit"
  26. },
  27. "height": "100%",
  28. "width": "100%"
  29. });
  30. </script>
  31. </body>
  32. </html>

Open docx for restricted commenting

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "CEEC2F6D",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx",
  17. "permissions": {
  18. "comment": true,
  19. "commentGroups": [
  20. "edit": ["Group2", ""],
  21. "remove": ["Group2"],
  22. "view": ""
  23. ],
  24. "edit": false
  25. }
  26. },
  27. "documentType": "word",
  28. "editorConfig": {
  29. "callbackUrl": "https://example.com/url-to-callback.ashx",
  30. "mode": "edit"
  31. },
  32. "height": "100%",
  33. "width": "100%"
  34. });
  35. </script>
  36. </body>
  37. </html>

Open xlsx without access to change the filter

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "B0823482653D",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx",
  17. "permissions": {
  18. "edit": true,
  19. "modifyFilter": false
  20. }
  21. },
  22. "documentType": "cell",
  23. "editorConfig": {
  24. "callbackUrl": "https://example.com/url-to-callback.ashx",
  25. "user": {
  26. "id": "78e1e841",
  27. "name": "John Smith"
  28. }
  29. },
  30. "height": "100%",
  31. "width": "100%"
  32. });
  33. </script>
  34. </body>
  35. </html>
  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "B0823482653D",
  15. "title": "Example Spreadsheet Title.xlsx",
  16. "url": "https://example.com/url-to-example-spreadsheet.xlsx",
  17. "permissions": {
  18. "edit": true,
  19. "modifyFilter": false
  20. }
  21. },
  22. "documentType": "cell",
  23. "editorConfig": {
  24. "callbackUrl": "https://example.com/url-to-callback.ashx",
  25. "user": {
  26. "id": "F89d8069ba2b",
  27. "name": "Kate Cage"
  28. }
  29. },
  30. "height": "100%",
  31. "width": "100%"
  32. });
  33. </script>
  34. </body>
  35. </html>

Open docx without access to the content control settings

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "779591724609",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx",
  17. "permissions": {
  18. "edit": true,
  19. "modifyContentControl": false
  20. }
  21. },
  22. "documentType": "word",
  23. "editorConfig": {
  24. "callbackUrl": "https://example.com/url-to-callback.ashx",
  25. "mode": "edit"
  26. },
  27. "height": "100%",
  28. "width": "100%"
  29. });
  30. </script>
  31. </body>
  32. </html>

Open DOCX file for editing on mobile

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "16CD6FB5",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. },
  22. "height": "100%",
  23. "type": "mobile",
  24. "width": "100%"
  25. });
  26. </script>
  27. </body>
  28. </html>

Open XLSX file for editing on mobile

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "1259E255",
  15. "title": "Example Spreadsheet Title.docx",
  16. "url": "https://example.com/url-to-example-document.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. },
  22. "height": "100%",
  23. "type": "mobile",
  24. "width": "100%"
  25. });
  26. </script>
  27. </body>
  28. </html>

Open PPTX file for editing on mobile

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "0CA91EC8",
  15. "title": "Example Presentation Title.docx",
  16. "url": "https://example.com/url-to-example-document.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. },
  22. "height": "100%",
  23. "type": "mobile",
  24. "width": "100%"
  25. });
  26. </script>
  27. </body>
  28. </html>

Open DOCX file for viewing on mobile

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "EFF21C3C",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "mode": "view"
  22. },
  23. "height": "100%",
  24. "type": "mobile",
  25. "width": "100%"
  26. });
  27. </script>
  28. </body>
  29. </html>

Open XLSX file for viewing on mobile

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "ECDAF251",
  15. "title": "Example Spreadsheet Title.docx",
  16. "url": "https://example.com/url-to-example-document.xlsx"
  17. },
  18. "documentType": "cell",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "mode": "view"
  22. },
  23. "height": "100%",
  24. "type": "mobile",
  25. "width": "100%"
  26. });
  27. </script>
  28. </body>
  29. </html>

Open PPTX file for viewing on mobile

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "7F789833",
  15. "title": "Example Presentation Title.docx",
  16. "url": "https://example.com/url-to-example-document.pptx"
  17. },
  18. "documentType": "slide",
  19. "editorConfig": {
  20. "callbackUrl": "https://example.com/url-to-callback.ashx",
  21. "mode": "view"
  22. },
  23. "height": "100%",
  24. "type": "mobile",
  25. "width": "100%"
  26. });
  27. </script>
  28. </body>
  29. </html>

Open DOCX file for embedded viewing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "docx",
  14. "key": "B949CB79",
  15. "title": "Example Document Title.docx",
  16. "url": "https://example.com/url-to-example-document.docx"
  17. },
  18. "documentType": "word",
  19. "height": "100%",
  20. "type": "embedded",
  21. "width": "100%"
  22. });
  23. </script>
  24. </body>
  25. </html>

Open XLSX file for embedded viewing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "xlsx",
  14. "key": "9CB47328",
  15. "title": "Example Spreadsheet Title.docx",
  16. "url": "https://example.com/url-to-example-document.xlsx"
  17. },
  18. "documentType": "cell",
  19. "height": "100%",
  20. "type": "embedded",
  21. "width": "100%"
  22. });
  23. </script>
  24. </body>
  25. </html>

Open PPTX file for embedded viewing

  1. <!DOCTYPE html>
  2. <html style="height: 100%;">
  3. <head>
  4. <title>ONLYOFFICE Api Documentation</title>
  5. </head>
  6. <body style="height: 100%; margin: 0;">
  7. <div id="placeholder" style="height: 100%"></div>
  8. <script type="text/javascript" src="https://documentserver/web-apps/apps/api/documents/api.js"></script>
  9. <script type="text/javascript">
  10. window.docEditor = new DocsAPI.DocEditor("placeholder",
  11. {
  12. "document": {
  13. "fileType": "pptx",
  14. "key": "1CA69995",
  15. "title": "Example Presentation Title.docx",
  16. "url": "https://example.com/url-to-example-document.pptx"
  17. },
  18. "documentType": "slide",
  19. "height": "100%",
  20. "type": "embedded",
  21. "width": "100%"
  22. });
  23. </script>
  24. </body>
  25. </html>

Copy code Close

×