-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9841 from LukasHirt/feat/embed-actions
feat: add actions into the embed mode
- Loading branch information
1 parent
c19e87c
commit 31abfe4
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |