Callbak URL in pure HTML and JS

Integration questions/issues
Post Reply
mahdi
Posts: 3
Joined: Mon Aug 14, 2017 8:11 am

Callbak URL in pure HTML and JS

Post by mahdi » Mon Aug 14, 2017 8:47 am

Hi all,

I want to use OnlyOffice editor inside of a pure HTML and JavaScript webpage. So I installed integrated server.

The following code shows the editor and load the file and save it:

Code: Select all

<html>
<head>
</head>
<body>
<div id="placeholder"></div>
<script type="text/javascript" src="http://localhost/web-apps/apps/api/documents/api.js"></script>
<script>
var config = {
    "document": {
        "fileType": "docx",
        "key": "Khirz6zTPdfd7",
        "permissions": {
            "comment": true,
            "download": true,
            "edit": true,
            "print": true,
            "review": true
        },
        "title": "Example Document Title.docx",
        "url": "http://localhost:9500/mahdi/new.docx"
    },
    "documentType": "text",
    "editorConfig": {
        "callbackUrl": "http://example.com/url-to-callback.ashx"
    }
};
var docEditor = new DocsAPI.DocEditor("placeholder", config);

</script>
</body>
</html>


But the only missing part is callback url.
  • What is the url for callback xml file?
    If I need to write it myself what do I have to write with pure JS?
Thanks in advanced.

Maxim
Posts: 1751
Joined: Tue Oct 11, 2016 2:34 pm

Re: Callbak URL in pure HTML and JS

Post by Maxim » Mon Aug 14, 2017 11:05 am

Hello mahdi!
Please visit our API about Callback handler and API JavaScript. I hope it will help you. Anyway feel free to post you questions.
Also i advise you to take a look at Integration examples where you will find JAVA Example.

Post Reply