mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2025-07-12 22:03:29 +02:00
Initial add OnlyOffice
This commit is contained in:
25
OnlyOffice/coffees/main.coffee
Normal file
25
OnlyOffice/coffees/main.coffee
Normal file
@ -0,0 +1,25 @@
|
||||
class OnlyOffice extends this.OS.application.BaseApplication
|
||||
constructor: ( args ) ->
|
||||
super "OnlyOffice", args
|
||||
|
||||
main: () ->
|
||||
placeholder = @find "editor-area"
|
||||
@editor = new DocsAPI.DocEditor(placeholder, {
|
||||
"document": {
|
||||
"fileType": "docx",
|
||||
"key": "Khirz6zTPdfd7",
|
||||
"title": "Example Document Title.docx",
|
||||
"url": "https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.doc"
|
||||
},
|
||||
"documentType": "word"
|
||||
});
|
||||
|
||||
cleanup: () ->
|
||||
@editor.destroyEditor() if @editor
|
||||
@editor = undefined
|
||||
|
||||
OnlyOffice.dependencies = [
|
||||
"http://192.168.1.91/web-apps/apps/api/documents/api.js"
|
||||
]
|
||||
|
||||
this.OS.register "OnlyOffice", OnlyOffice
|
Reference in New Issue
Block a user