How to use Office in a WeChat mini‑program for online editing and viewing of documents?

Problem Description

Background:
We are developing a system that requires online document editing capabilities. On the PC side, we have successfully integrated OnlyOffice to enable online document viewing and editing. Users can upload documents through the PC web interface and open and edit them normally in the browser.

Goal:
We now want to extend this functionality to the WeChat mini‑program. Users should be able to open and edit documents previously uploaded on the PC side directly within the mini‑program, enabling a cross‑platform, mobile document processing experience.

Issue:
In the WeChat mini‑program, we attempted to load the PC‑side OnlyOffice online editing page via the component to open documents. However, the page displays an access error and fails to load the document editor properly, preventing users from viewing or editing documents within the mini‑program.

Technical Environment:

PC side: Online document editing service based on OnlyOffice (self‑hosted server or private deployment)

Mini‑program side: Uses the WeChat mini‑program component to embed H5 pages

Document storage: Files uploaded from the PC side are stored on our own server or in cloud storage

Checks already performed:

PC‑side editing works normally, ruling out issues with the OnlyOffice service itself

The document URL can be accessed directly in a browser, ruling out invalid links

Additional question:
Since OnlyOffice officially supports integration through WebView components in mobile applications, is the solution I envision—“mini‑program + web‑view + OnlyOffice H5 page”—actually feasible? (Given that we are still encountering access errors, we would like to confirm whether this approach is technically viable within the WeChat environment.)

Hello, @wllln !
Thank you for your message.

First of all, could you please clarify which ONLYOFFICE Docs edition or license you are using? Mobile web editors are not available in the Community version, so this scenario needs to be verified first.

Also, please share the exact error you encounter in the WeChat mini-program, preferably with a screenshot. At this point, we cannot determine whether the issue is related to licensing limitations, an integration problem, or restrictions of the WeChat web-view environment without seeing the exact error.

To investigate the issue on our side, please provide the files related to your integration scenario, including the code and configuration used to open and initialize the editor in the mini-program environment. If possible, also attach any additional relevant files that may help us reproduce the issue. If these files contain any private data, feel free to send them via private message and mask any sensitive information.

This information will help us determine whether the issue is caused by the editor configuration itself or by the WeChat mini-program environment.