Skip to content

Commit

Permalink
docs: add title prop for editor create extension point (#325)
Browse files Browse the repository at this point in the history
为编辑器扩展添加 title 字段的描述,为 halo-dev/halo#5465 的改动添加文档。

/kind documentation

```release-note
None
```
  • Loading branch information
ruibaby committed Mar 27, 2024
1 parent d578915 commit 3922a17
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@ export interface EditorProvider {

其中,`component` 可以是组件对象或组件名称,且此组件有以下实现要求:

1. 组件必须包含以下 props:
1. `raw:string`:用于接收原始内容。
2. `content:string`:用于接收渲染后的内容。
3. `uploadImage?: (file: File) => Promise<Attachment>`:用于上传图片,在编辑器内部获取到 File 之后直接调用此方法即可得到上传后的附件信息。
2. 组件必须包含以下 emit 事件:
1. `update:raw`:用于更新原始内容。
2. `update:content`:用于更新渲染后的内容。
3. `update`:发送更新事件。
1. 组件包含以下 props:
1. `title:string`:用于接收标题。
2. `raw:string`:用于接收原始内容。
3. `content:string`:用于接收渲染后的内容。
4. `uploadImage?: (file: File) => Promise<Attachment>`:用于上传图片,在编辑器内部获取到 File 之后直接调用此方法即可得到上传后的附件信息。
2. 组件包含以下 emit 事件:
1. `update:title`:用于更新标题。
2. `update:raw`:用于更新原始内容。
3. `update:content`:用于更新渲染后的内容。
4. `update`:发送更新事件。

## 示例

Expand Down

0 comments on commit 3922a17

Please sign in to comment.