diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-09-04 20:50:29 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-09-04 20:50:29 +0300 |
commit | 47e187ec94915d4c3cb4a98427f7adf56456645f (patch) | |
tree | d1096d243a4c373457b98098fd9b6708472cf184 /docs | |
parent | 76a6f153502328facae8a97d30050b5f26fc707f (diff) |
More flow docs
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/mobile_flow.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/mobile_flow.md b/docs/mobile_flow.md new file mode 100644 index 00000000..9b2a56e6 --- /dev/null +++ b/docs/mobile_flow.md @@ -0,0 +1,46 @@ +# 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 for the current file + + |