ONLYOFFICE provides open API that exposes the solution functionality, describes the main methods that allow you to interact with different ONLYOFFICE components thus giving you programmatic access to it.
ONLYOFFICE Docs API is used to let the developers integrate the editors into their own web sites, setup and manage the suite.
Please, be clear in the description of your issue/request and provide as many details as possible. We also recommend that you add relevant tags.
Please note: answering your question may take some time. We will answer as soon as possible!
1 Like
Hello, I used Docker to build an onlyOffice server and created a document server object in the Vue framework to read the server created using the Java language. Saving a document involves calling a callback function (the address of the callback Url), which is automatically requested by the document server for saving. The Vue framework is not involved, so how can I obtain the success of the save result? The following code is part of my code for creating a document server object in Vue: //创建文档服务器对象方法
getDocEdit(){
// 调用js创建预览对象
this.docEditor= new DocsAPI.DocEditor(‘vabOnlyOffice’, // 元素id
{
“document”: {
“permissions”: {
“edit”: this.editType,
“char”:false,
“comment”:false,
“commentGroups”:[]
},
// 展示文件的类型
“fileType”: “docx”,
“title”: this.documentFileName,
//读取文件进行展示
“url”:this.fileUrl
},
“documentType”: “text”,
“editorConfig”: {
“lang” : “zh-CN”,
// 回调接口,用于编辑后实现保存的功能,(关闭页面5秒左右会触发)
“callbackUrl”: this.callbackUrl, //保存文件的接口
“customization”:{
“plugins”:false
}
},
"height": "1000PX",
"width": "100%"
});
}