Files
SimpleWriting/使用说明.md
T
2026-07-10 17:09:39 +08:00

85 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 简单写作 · 使用说明
## 启动项目
在项目目录下执行:
```bash
node src/start.js
```
看到 `[简单写作] 已启动 → http://localhost:8080` 后,浏览器打开该地址即可使用。
也可以用 `npm start` 一键启动。
指定端口:`PORT=9000 node src/start.js`PowerShell 用 `$env:PORT=9000; node src/start.js`
---
## 安装为桌面应用(PWA
打开 http://localhost:8080 后,浏览器地址栏右侧会出现安装图标 ⊕,点击即可安装到桌面,以后像本地软件一样打开,支持离线写作。
---
## 基本功能
| 功能 | 操作 |
|---|---|
| 新建文章 | 左侧列表点 |
| 切换文章 | 左侧列表点击对应项 |
| 删除文章 | 左侧列表点 🗑 |
| 重命名文章 | 点笔图标(移动端)或直接在顶栏编辑(桌面端) |
| 导出 | 工具栏点「导出」→ 选 TXT / Markdown / 复制全文 |
| 字数统计 | 自动显示在顶栏 |
| 专注模式 | 按 F11,隐藏一切 UI |
---
## 排版设置
点齿轮图标打开设置面板:
- **行间距**:文字行之间的间距
- **段间距**:段落之间的间距
- **段首缩进**:每段开头缩进(纯 CSS,不写入正文)
- **打字机滚动**:输入行始终保持在屏幕中央
---
## 多端同步(WebDAV
1. 点右上角 ☁ 打开同步面板
2. 填写 WebDAV 信息:
- **服务器地址**:如坚果云 `https://dav.jianguoyun.com/dav/`
- **存储路径**:默认 `jiandan-sync.json`
- **用户名 / 密码**:网盘账号
- **加密密码**:端到端加密密码(请牢记)
3. 点「登录并同步」
**注意:** 必须通过 `node src/start.js` 启动才能使用同步,直接用 `file://` 打开不行。
---
## 构建 Android APK
```bash
scripts\build_apk.bat
```
首次构建前需配置环境:
```bash
powershell -File scripts\install_android_build.ps1
```
---
## 目录结构
```
src/ 源代码(网页、样式、JS、图标、服务器)
android/ Android 构建工程
scripts/ 构建/安装脚本
```