Docspace embedded sample does not appear

I’m trying to use docspace embed.

I used the embed code provided by docspace, but the screen does not appear.

I want to add a docspace window to another site

Is this due to X-Frame-Options : SAMEORIGIN?

So which file should I modify to solve this?

I installed it with docker on Debian Linux.

Hello @yejin

Please specify version of DocSpace and also let us know where you are trying to embed it.


The version I use is:
docspace version: 1.1.3
docs version :

I want to embed the docspace on the homepage so that I can check the room within the homepage as well.

The server where the homepage is located and the server where docspace is installed are different.

Please let me know how exactly you are trying to embed DocSpace in your site/application. Are you using JavaScript SDK? Can you share an example?


This screen has added the code provided by docsapce using the HTML editor provided by the WordPress site.

I try to output docspace simply by writing HTML separately, the same console error is displayed.

<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>[S]DocSpace JavaScript SDK</title>
    <script src="https://<my-docspace-domain>/static/scripts/api.js"></script>

    <div id="frameTest" name="iframeTest">Fallback text</div>

<script type="text/javascript">
    const test0 = {
        width: "100%",
        height: "800px",
        frameId: "frameTest",
        showHeader: true,
        showMenu: true,
        showTitle: true,
        id: 2
    var docSpace = DocSpace.SDK.initFrame(test0); 


When using a plugin to bypass CORS, docspace is displayed correctly, and the documents also open well.

So I would like to know a way to handle Accept-Control-Allow-Origin.

Since you are using WordPress, you can try using our plugin for it:

It’s quite a pleasant surprise to learn that OnlyOffice is available on WordPress!

However, my goal is to use the embed feature introduced by OnlyOffice to display DocSpace on the homepage.
It seems a bit different from using a plugin to display it.

Please try using JavaScript SDK for that purpose: