Try the fastest and simplest way to install ONLYOFFICE

Callbak URL in pure HTML and JS

Integration questions/issues

Callbak URL in pure HTML and JS

Postby 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.

[list=]
What is the url for callback xml file?
If I need to write it myself what do I have to write with pure JS?
[/list]

Thanks in advanced.
mahdi
 
Posts: 3
Joined: Mon Aug 14, 2017 8:11 am

Re: Callbak URL in pure HTML and JS

Postby 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.
Maxim
 
Posts: 1003
Joined: Tue Oct 11, 2016 2:34 pm


Return to API

Who is online

Users browsing this forum: No registered users and 1 guest

cron