diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 7248f8a2a..748edf2d3 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -114,6 +114,7 @@ nav: - Searching: development/searching.md - Timelines: development/timelines.md - Useful Snippets: development/useful-snippets.md + - Collabora & webdav document edition: development/edit-documents-collabora-wopi.md - User Interface: - CSS Classes: development/user-interface/css-classes.md - JS Functions: development/user-interface/js-functions.md diff --git a/docs/source/development/edit-documents-collabora-wopi.md b/docs/source/development/edit-documents-collabora-wopi.md new file mode 100644 index 000000000..0af337586 --- /dev/null +++ b/docs/source/development/edit-documents-collabora-wopi.md @@ -0,0 +1,50 @@ +# Editing documents + +Chill allows editing documents directly from the web interface using two different methods: +- **Collabora Online**: An online office suite that allows multiple users to edit the same document simultaneously in their browser. +- **WebDAV (LibreOffice Desktop)**: Use your local LibreOffice installation to edit documents stored on the server. + +This document explains how to set up these features for development. + +## Editing with Collabora Online + +To make Collabora Online work in a development environment, the Collabora server and your local Symfony server must be able to communicate with each other. This is typically achieved using a tunnel like **ngrok**. + +### 1. Install Collabora + +You can install Collabora Online (CODE) on a remote server or run it locally (e.g., using Docker). + +### 2. Serve the local Symfony server via ngrok + +Collabora needs to access your local development server through a public URL. Use ngrok to expose your local server: + +```bash +# assuming your symfony server is running on port 8000 +ngrok http 8000 +``` + +### 3. Configure Collabora to trust the ngrok domain + +Collabora must be configured to allow connections from your ngrok domain. This is done by adding your ngrok domain to the `aliasgroup` in Collabora's configuration (usually `coolwsd.xml` or via environment variables if using Docker). + +For example, if you are using Docker, you might add: +`-e "aliasgroup1=https://your-ngrok-subdomain.ngrok-free.app"` + +### 4. Browse the development instance through ngrok + +To use the feature, you must access your Chill instance using the ngrok URL (e.g., `https://your-ngrok-subdomain.ngrok-free.app`) instead of `localhost`. + +1. Open your browser and go to your ngrok URL. +2. Navigate to a document. +3. Click on "Edit with Collabora". + +## Editing with WebDAV (LibreOffice Desktop) + +This feature allows you to open documents directly in your desktop's LibreOffice. + +- **Local HTTP**: If you are serving your application through `http` on `localhost`, it should work without any additional configuration. +- **Local HTTPS**: If you are using `https` locally, LibreOffice might have trouble with self-signed certificates. In this case, it is recommended to use an **ngrok domain** as described above to provide a valid HTTPS connection. + +!!! tip + + The web interface of ngrok (usually available at `http://127.0.0.1:4040`) allows you to easily inspect the requests from and to your web server. This is extremely useful for understanding how Collabora or LibreOffice interacts with the application and for debugging WOPI or WebDAV requests. diff --git a/docs/source/development/index.md b/docs/source/development/index.md index bb685dbd2..80508987e 100644 --- a/docs/source/development/index.md +++ b/docs/source/development/index.md @@ -26,6 +26,7 @@ As Chill relies on the [symfony ](http://symfony.com) framework, reading the fra - [Manual](manual/index.md) - [Assets](assets.md) - [Cron Jobs](cronjob.md) +- [Editing documents (Collabora, WebDAV)](edit-documents-collabora-wopi.md) - [Info about entities](entity-info.md) - [Info about database (in French)](database-principles.md) - [Developer FAQ](FAQ.md)