remons-render-markdown 1.0.0-beta.3 → 1.0.0
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/package.json +1 -1
- package/readme.md +4 -4
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -64,6 +64,7 @@ import RenderMarkdown, { markdownFormat, languagesCommon, initHighlighter } fro
|
|
|
64
64
|
| codeType | string | ❌ | - | 指定代码类型(如 'javascript' 等),不传则按 Markdown 渲染 |
|
|
65
65
|
| editButton | React.ReactNode | ❌ | - | 自定义编辑按钮 |
|
|
66
66
|
| backTopTarget | HTMLElement | ❌ | body | 返回顶部按钮监听的容器 |
|
|
67
|
+
| showDriverGuide | boolean | ❌ | false | 是否显示新手引导 |
|
|
67
68
|
|
|
68
69
|
### markdownFormat 函数
|
|
69
70
|
|
|
@@ -302,9 +303,9 @@ title: 图表标题
|
|
|
302
303
|
|
|
303
304
|

|
|
304
305
|
|
|
305
|
-
####
|
|
306
|
+
#### renderMermaid 方法
|
|
306
307
|
|
|
307
|
-
|
|
308
|
+
支持渲染独立的 Mermaid 图表渲染组件,支持缩放、全屏、下载、源码查看等功能。
|
|
308
309
|
|
|
309
310
|
```tsx
|
|
310
311
|
import { renderMermaid } from 'remons-render-markdown';
|
|
@@ -332,7 +333,7 @@ graph TD
|
|
|
332
333
|
|
|
333
334
|
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|
|
334
335
|
|------|------|------|--------|------|
|
|
335
|
-
| source | string | ✅ | - | Mermaid
|
|
336
|
+
| source | string | ✅ | - | Mermaid 代码字符串,支持设置标题 |
|
|
336
337
|
| debounceMs | number | ❌ | 300 | 图表渲染时的 debounce 时间(毫秒) |
|
|
337
338
|
| enablePanzoom | boolean | ❌ | true | 是否启用缩放和平移功能 |
|
|
338
339
|
| showDownload | boolean | ❌ | true | 是否显示下载按钮(支持 SVG/PNG 格式) |
|
|
@@ -341,7 +342,6 @@ graph TD
|
|
|
341
342
|
| defaultCollapsed | boolean | ❌ | true | 默认折叠状态 |
|
|
342
343
|
| className | string | ❌ | "" | 自定义样式类名 |
|
|
343
344
|
| minHeight | number | ❌ | 200 | 最小高度(像素) |
|
|
344
|
-
| showDriverGuide | boolean | ❌ | false | 是否显示新手引导 |
|
|
345
345
|
|
|
346
346
|
**功能特性:**
|
|
347
347
|
- 缩放:支持放大、缩小、重置视图
|