Proposal: Seamless Document Creation and Editing with OnlyOffice in Discourse (via Nextcloud Integration)
As part of our ongoing efforts to establish Discourse as a true enterprise-ready intranet solution, we are working towards a seamless document workflow within Discourse—enabling users to create and edit Office documents (e.g., .docx, .xlsx, .pptx) directly inside the platform.
Vision:
Our long-term goal is to allow users to collaboratively edit documents in OnlyOffice, without ever having to leave Discourse or interact with backend storage layers like Nextcloud. From a user perspective, document creation and editing should feel native to Discourse, making powerful collaborative content possible within discussions, wikis, or knowledge bases.
Technical Approach (Phase 1):
-
Composer Extension:
- A custom plugin adds a toolbar button to the Discourse composer.
- When clicked, users can specify a filename and file type.
-
Automatic Document Provisioning:
- The plugin’s backend generates an empty Office document (from a local template) and uploads it to a shared Nextcloud instance using WebDAV.
- The resulting public (share) link is automatically inserted into the post.
-
OnlyOffice Editing:
- With Nextcloud’s OnlyOffice integration, clicking the link opens the document in the OnlyOffice online editor, enabling real-time collaborative editing—without managing files outside Discourse.
-
Transparent Storage:
- All document management (creation, sharing, storage) is handled by the backend; Nextcloud remains invisible to end users.
Security & Scope:
- Documents reside in a shared Nextcloud folder with public edit links (security by obscurity, trading fine-grained control for ease of use).
- No per-user accounts or uploads—just one backend service account and standardized templates.
Next Steps:
We are currently developing a proof-of-concept for this workflow and will share our progress and source code in the coming weeks.
Feedback, ideas, and collaborators are very welcome!
We see this as an important step towards making Discourse a first-class, open source enterprise intranet — including modern document workflows and real-time collaborative editing — without additional barriers for end users.