From 31abfe44f79a4e84d27eae8271ba9165377f89f8 Mon Sep 17 00:00:00 2001 From: Jannik Stehle <50302941+JammingBen@users.noreply.github.com> Date: Tue, 24 Oct 2023 11:49:59 +0000 Subject: [PATCH] Merge pull request #9841 from LukasHirt/feat/embed-actions feat: add actions into the embed mode --- embed-mode/_index.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 embed-mode/_index.md diff --git a/embed-mode/_index.md b/embed-mode/_index.md new file mode 100644 index 00000000000..b443b085854 --- /dev/null +++ b/embed-mode/_index.md @@ -0,0 +1,31 @@ +--- +title: 'Embed Mode' +date: 2023-10-23T00:00:00+00:00 +weight: 60 +geekdocRepo: https://github.com/owncloud/web +geekdocEditPath: edit/master/docs/embed-mode +geekdocFilePath: _index.md +geekdocCollapseSection: true +--- + +{{< toc >}} + +The ownCloud Web can be consumed by another application in a stripped down version called "Embed mode". This mode is supposed to be used in the context of selecting or sharing resources. If you're looking for even more minimalistic approach, you can take a look at the [File picker](https://owncloud.dev/integration/file_picker/). + +## Getting started + +To integrate ownCloud Web into your application, add an iframe element pointing to your ownCloud Web deployed instance with additional query parameter `mode=embed`. + +```html + +``` + +## Events + +The app is emitting various events depending on the goal of the user. All events are prefixed with `owncloud-embed:` to prevent any naming conflicts with other events. + +| Event name | Payload | Description | +| --- | --- | --- | +| **owncloud-embed:select** | Resource[] | Gets emitted when user selects resources via the "Attach as copy" action | +| **owncloud-embed:share** | string[] | Gets emitted when user selects resources and shares them via the "Share links" action | +| **owncloud-embed:cancel** | void | Gets emitted when user attempts to close the embedded instance via "Cancel" action |