Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mobile_flow.md « docs - github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9aa8f941e5582b045152a7f1bf062a852e464f1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Mobile flow

To enable collabora editor into a client there are a few things that need to be 
care off.

## 1. Check for support

Check the capabilities API

`<server>/ocs/v2.php/cloud/capabilities`

If this contains a richdocument section then mobile editing is supported.
There is a list of mimetypes that can be edited with collabora supplied.

## 2. Open a file with a fileid

This happens via the OCS api described [here](./mobile_editor.md)
This returns an URL that you have to open in a full screen webview.
Be sure to have javascript enabled.

## 3. Interacting with the document

The richdocuments app looks for a javscript handler that the client can
register. This is: `RichDocumentsMobileInterface`

It expects the following functions:

### close()

This closed the webview.

### insertGraphic()

open a filepicker to select a file from your nextcloud.
The file has to be submitted to the [asset api](./asset_api.md).

Then the client has to call the function (on the webui):
`OCA.RichDocuments.documentsMain.postAsset(filename, url)`

This will make sure the assets is added to the document.

### share()

opens the share sidebar or dialog for the current file

### documentLoaded()

This method is called once the Collabora has loaded and can take over the loading screen

### paste()

This is triggered to enable integrating applications passing though the clipboard content properly

### fileRename()

Notifies the integrating application that the current file has been renamed.

### downloadAs()

Hands over the link to download a file to the integrating application