Skip to content

Commit 83bb301

Browse files
committed
docs: add before-preview-change prop
1 parent d65e1b0 commit 83bb301

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ Disabled menu. default is the upload local image menu under the image toolbar. E
161161
- type:`Object`
162162
- default:`{ accept: 'image/*' }`
163163

164+
### before-preview-change
165+
166+
-Type: `Function`
167+
-Default value: `-`
168+
-Callback parameters: `(text, next)`
169+
170+
Function triggered before preview parsing. After configuring this property, you must call the next method and pass in the md text that needs to be rendered, otherwise the preview component will not be rendered.
171+
164172
### codemirror-config
165173

166174
- type:`Object`

docs/zh/api.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,14 @@ export default {
186186

187187
上传本地图片的相关配置。参考高级用法:[如何插入本地图片](./senior/upload-image.md)
188188

189+
### before-preview-change
190+
191+
- 类型:`Function`
192+
- 默认值:`-`
193+
- 回调参数:`(text, next)`
194+
195+
在预览解析前触发的函数,配置此属性后必须要调用 next 方法并传入需要渲染的 md 文本,否则 preview 组件将不会进行渲染。
196+
189197
### codemirror-config
190198

191199
- 类型:`Object`

0 commit comments

Comments
 (0)