Skip to content

Commit

Permalink
Merge pull request #9841 from LukasHirt/feat/embed-actions
Browse files Browse the repository at this point in the history
feat: add actions into the embed mode
  • Loading branch information
JammingBen committed Oct 24, 2023
1 parent c19e87c commit 31abfe4
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions embed-mode/_index.md
Original file line number Diff line number Diff line change
@@ -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
<iframe src="<web-url>?mode=embed"></iframe>
```

## 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 |

0 comments on commit 31abfe4

Please sign in to comment.