@norio-office/rich-text 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -21
- package/dist/index.js +978 -911
- package/dist/index.umd.cjs +25 -3
- package/dist/style.css +1 -1
- package/docs/editor-preview.png +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# @norio-office/rich-text
|
|
2
|
+

|
|
2
3
|
|
|
3
4
|
Vue 3 + Tiptap 3 富文本编辑器。支持单人编辑、Yjs 协作、评论、图片/视频/文件、表格、公式、Markdown 导入、大纲、预览,以及可选的 AI 局部编辑。
|
|
4
5
|
|
|
@@ -134,25 +135,6 @@ const collaboration = {
|
|
|
134
135
|
|
|
135
136
|
当前仓库版本采用 [Proprietary](LICENSE):允许非商业使用及随非商业应用分发**未修改**组件,须遵守署名和许可告知;不授权商业使用或分发修改版。已发布的 `0.8.0` 仍适用其发布时的 MIT 许可证。第三方依赖遵循各自许可证。
|
|
136
137
|
|
|
137
|
-
## English
|
|
138
|
-
|
|
139
|
-
File headers are shown by default. Configure `documentName` / `v-model:documentName`, hide the row with `showFileHeader: false`, and call `getFileName()` / `setFileName(name)` to read or change it. `file-name-change` reports `{ fileName, previousFileName }`. Names are separate host-owned metadata, not body JSON or undo history. See the bilingual [file header guide](docs/file-header.md) for validation, preview behavior and collaboration integration.
|
|
140
|
-
|
|
141
|
-
Vue 3 + Tiptap 3 rich-text editor with optional Yjs collaboration, comments, media, tables, Markdown import, outline, preview, export APIs and AI-assisted local edits.
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
npm install @norio-office/rich-text
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
```ts
|
|
148
|
-
import { RichTextEditor } from '@norio-office/rich-text'
|
|
149
|
-
import '@norio-office/rich-text/style.css'
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
Bind Tiptap JSON with `v-model`; the host owns persistence, uploads, permissions and collaboration services. `mode="preview"` is read-only. Export and print buttons are not built in; export methods remain on the component instance. For AI, opt in with `showAiTargetButton`, bind a Bridge and register tool handlers. See the [working AI example](examples/ai/browser/README.md). A matching Skill will be bundled starting with a future release; the published 0.8.0 package does not contain it.
|
|
153
|
-
|
|
154
|
-
The current source uses [CC BY-NC-ND 4.0](LICENSE) for noncommercial use and distribution of unmodified copies; commercial use and distribution of modified copies are not licensed. Published 0.8.0 retains its original MIT license.
|
|
155
|
-
|
|
156
138
|
|
|
157
139
|
## 协作状态与成员头像
|
|
158
140
|
|
|
@@ -181,6 +163,4 @@ const presence: CollaborationPresence = {
|
|
|
181
163
|
|
|
182
164
|
集成平台从现有 WebSocket awareness 收集成员及连接状态,通过 Go 的 `GET /api/weboffice/avatar/{userId}` 获取图片。客户 Provider 可选实现 `GET /noriooffice/v1/avatar/{userId}`,返回 `image/*` 原始图片;不存在时返回 204/404/405/501,平台自动使用默认头像。签名、token 与其他基础接口相同,不把 token 放进头像 URL。
|
|
183
165
|
|
|
184
|
-
### Collaboration presence (English)
|
|
185
166
|
|
|
186
|
-
Pass `collaborationPresence: { enabled, status, members }` from the host. Status is `connected`, `offline`, or `connecting`; member fields are `userId`, optional `name`, and optional `avatar`. The view is hidden unless collaboration is explicitly enabled, and follows `showFileHeader` visibility. Users are deduplicated by ID. Five overlapping avatars are shown; `+N` contains only the remaining count. Hover/focus/click opens a list with a 150px maximum height and the editor's built-in scrollbar. Missing/broken images use a stable pseudo-random background and the first Unicode character of the user ID. Presentation data never enters document history.
|