Embedded

Description

The embedded section is for the embedded document type only (see the config section to find out how to define the embedded document type). It allows to change the settings which define the behavior of the buttons in the embedded mode.

Parameters

NameDescriptionTypeExample
embedUrlDefines the absolute URL to the document serving as a source file for the document embedded into the web page.stringhttps://example.com/embedded?doc=exampledocument1.docx
fullscreenUrlDefines the absolute URL to the document which will open in full screen mode.stringhttps://example.com/embedded?doc=exampledocument1.docx#fullscreen
saveUrlDefines the absolute URL that will allow the document to be saved onto the user personal computer.stringhttps://example.com/download?doc=exampledocument1.docx
shareUrlDefines the absolute URL that will allow other users to share this document.stringhttps://example.com/view?doc=exampledocument1.docx
toolbarDockedDefines the place for the embedded viewer toolbar, can be either top or bottom.string“top”
Embedded - 图1

Example

  1. var docEditor = new DocsAPI.DocEditor("placeholder", {
  2. "editorConfig": {
  3. "embedded": {
  4. "embedUrl": "https://example.com/embedded?doc=exampledocument1.docx",
  5. "fullscreenUrl": "https://example.com/embedded?doc=exampledocument1.docx#fullscreen",
  6. "saveUrl": "https://example.com/download?doc=exampledocument1.docx",
  7. "shareUrl": "https://example.com/view?doc=exampledocument1.docx",
  8. "toolbarDocked": "top"
  9. },
  10. ...
  11. },
  12. ...
  13. });

Where the example.com is the name of the server where document manager and document storage service are installed. See the How it works section to find out more on Document Server service client-server interactions.