https://github.com/sweetwisdom/onlyoffice-web-local
vue-office, Perform common file preview and editing via the web.
https://github.com/sweetwisdom/onlyoffice-web-local
onlyoffice vue wasm web-office word
Last synced: 6 months ago
JSON representation
vue-office, Perform common file preview and editing via the web.
- Host: GitHub
- URL: https://github.com/sweetwisdom/onlyoffice-web-local
- Owner: sweetwisdom
- License: agpl-3.0
- Created: 2025-05-27T01:24:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-21T07:18:07.000Z (about 1 year ago)
- Last Synced: 2026-01-19T22:53:49.619Z (6 months ago)
- Topics: onlyoffice, vue, wasm, web-office, word
- Language: HTML
- Homepage: https://sweetwisdom.github.io/onlyoffice-web-local/
- Size: 90.3 MB
- Stars: 223
- Watchers: 5
- Forks: 54
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# office-web-local
A purely local project based on OnlyOffice, supporting local `opening and editing` of Office documents.
[Live Demoπͺ](https://sweetwisdom.github.io/onlyoffice-web-local/)
A local web-based document editor based on OnlyOffice, allowing you to edit documents directly in your browser without server-side processing, ensuring your privacy and security.
[English](README.md) | [δΈζ](readme.zh.md)
## β¨ Key Features
- π **Privacy-First**: All document processing happens locally in your browser, with no uploads to any server
- π **Multi-Format Support**: Supports DOCX, XLSX, PPTX, and many other document formats
- β‘ **Real-Time Editing**: Provides smooth real-time document editing experience
- π **No Server Required**: Pure frontend implementation with no server-side processing needed
- π― **Ready to Use**: Start editing documents immediately by opening the webpage
## π οΈ Technical Architecture
This project is built on the following core technologies:
- **OnlyOffice SDK**: Provides powerful document editing capabilities
- **WebAssembly**: Implements document format conversion through x2t-wasm
- **Pure Frontend Architecture**: All functionality runs in the browser
## π Opening Remote Files
### Functionality
Automatically downloads and opens remote Office files (e.g., `.docx`, `.pptx`) via route parameters, converting them into `File` objects for further use (e.g., preview or editing).
### Usage
The page URL must include the following parameters:
- `url` (required): Remote file address
- `filename` (optional): File name; if not provided, it will attempt to auto-resolve
Example:
[00.xlsx](https://sweetwisdom.github.io/onlyoffice-web-local/#/?url=https://sweetwisdom.github.io/react-filePreview/filePreview/00.xlsx)
```
?filename=00.pptx&url=https://example.com/files/00.pptx
```
### File Name Retrieval Priority
1. Route parameter `filename`
2. Parsed from `url`
3. Extracted from response header `Content-Disposition`
If the file name cannot be retrieved, the operation will terminate with an error prompt.
## Word

## Excel

## PPT

## Export Document

## Development Setup
```sh
pnpm install
```
### Compile and Hot-Reload for Development
```sh
pnpm dev
```
### Type-Check, Compile, and Minify for Production
```sh
pnpm build
```
## Docker Support
Build a custom image named `vue-local-office` (note: the `.` at the end of the command indicates using the Dockerfile in the current directory; adjust the path as needed):
```sh
docker build -t vue-local-office .
```
Map ports and start the Docker container (8080:80 maps the container's port 80 to the host's port 8080; `local-office` is the custom container name; `vue-local-office` is the custom image name):
```sh
docker run -dp 8080:80 --name local-office vue-local-office
```
After executing the above commands, open http://localhost:8080 in a browser to preview.
## Technical Details
- Uses `x2t-wasm` as a replacement for OnlyOffice services
- Utilizes OnlyOffice WebSDK for editing (sourced from `se-office`)
## References
- [Qihoo360/se-office: A full-featured office productivity suite based on open standards, enabling browser-based preview and editing of Office files.](https://github.com/Qihoo360/se-office)
- [cryptpad/onlyoffice-x2t-wasm: CryptPad WebAssembly file conversion tool](https://github.com/cryptpad/onlyoffice-x2t-wasm)