Skip to content

Commit ad6963f

Browse files
committed
📝 #1158
1 parent 5ed8c28 commit ad6963f

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
### 升级
44
* 3.9
5+
* 添加 markmapRender 方法
6+
* 添加 SMILESRender 方法
57
* 添加 insertMD 方法
68
* 添加 options.upload.renderLinkDest
79
* 添加 options.preview.math.mathJaxOptions
@@ -19,6 +21,7 @@
1921

2022
### v3.10.7 / 2024-10
2123

24+
* [支持化学物质结构渲染](https://github.com/Vanessa219/vditor/issues/1158) `引入特性`
2225
* [内容为空时使用工具栏插入表情错误](https://github.com/Vanessa219/vditor/issues/1662) `修复缺陷`
2326
* [更新 hljs,支持更多的语言和外观](https://github.com/Vanessa219/vditor/issues/1680) `改进功能`
2427
* [撤销后 echart 无法渲染](https://github.com/Vanessa219/vditor/issues/1673) `修复缺陷`

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Vditor 在这些方面做了努力,希望能为现代化的通用 Markdown 编
114114

115115
* [Sym](https://github.com/88250/symphony) 一款用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)平台
116116
* [Solo](https://github.com/88250/solo) & [Pipe](https://github.com/88250/pipe) B3log 分布式社区的博客端节点,欢迎加入下一代社区网络
117-
* [Tditor](https://tditor.com) 基于React、Vditor、Springboot, 一款打造极致文字创作体验的在线Markdown编辑平台
117+
* [Tditor](https://tditor.com) 基于React、Vditor、Springboot,一款打造极致文字创作体验的在线Markdown编辑平台
118118
* [Arya](https://github.com/nicejade/markdown-online-editor) 基于 Vue、Vditor,所构建的在线 Markdown 编辑器
119119
* [更多案例](https://github.com/Vanessa219/vditor/network/dependents?package_id=UGFja2FnZS0zMTY2Mzg4MzE%3D)
120120

@@ -222,7 +222,7 @@ Markdown 输出的 HTML 所展现的外观。内置 ant-design, light,dark,w
222222
#### options.toolbar
223223

224224
* 工具栏,可使用 name 进行简写: `toolbar: ['emoji', 'br', 'bold', '|', 'line']` 。默认值参见 [src/ts/util/Options.ts](https://github.com/Vanessa219/vditor/blob/master/src/ts/util/Options.ts)
225-
* name 可枚举为: `emoji` , `headings` , `bold` , `italic` , `strike` , `|` , `line` , `quote` , `list` , `ordered-list` , `check` ,`outdent` ,`indent` , `code` , `inline-code` , `insert-after` , `insert-before` ,`undo` , `redo` , `upload` , `link` , `table` , `record` , `edit-mode` , `both` , `preview` , `fullscreen` , `outline` , `code-theme` , `content-theme` , `export`, `devtools` , `info` , `help` , `br`
225+
* name 可枚举为: `emoji``headings``bold``italic``strike``|``line``quote``list``ordered-list``check` ,`outdent` ,`indent``code``inline-code``insert-after``insert-before` ,`undo``redo``upload``link``table``record``edit-mode``both``preview``fullscreen``outline``code-theme``content-theme``export`, `devtools``info``help``br`
226226
*`name` 不在枚举中时,可以添加自定义按钮,格式如下:
227227

228228
```js
@@ -424,7 +424,7 @@ xhr.send(formData); // formData = FormData.append("file[]", File)
424424
}
425425
```
426426

427-
* 为了防止站外图片失效, `linkToImgUrl` 可将剪贴板中的站外图片地址传到服务器端进行保存处理,其数据结构如下:
427+
* 为了防止站外图片失效,`linkToImgUrl` 可将剪贴板中的站外图片地址传到服务器端进行保存处理,其数据结构如下:
428428

429429
```js
430430
// POST data
@@ -594,6 +594,8 @@ options?: IPreviewOptions {
594594
| - | - |
595595
| previewImage(oldImgElement: HTMLImageElement, lang: keyof II18n = "zh_CN", theme = "classic") | 点击图片预览 |
596596
| mermaidRender(element: HTMLElement, cdn = options.cdn, theme = options.theme) | 流程图/时序图/甘特图 |
597+
| SMILESRender(element: HTMLElement, cdn = options.cdn, theme = options.theme) | 化学物质结构 |
598+
| markmapRender(element: HTMLElement, cdn = options.cdn) | markdown 思维导图 |
597599
| flowchartRender(element: HTMLElement, cdn = options.cdn) | flowchart 渲染 |
598600
| codeRender(element: HTMLElement, option?: IHljs) | 为 element 中的代码块添加复制按钮 |
599601
| chartRender(element: (HTMLElement \| Document) = document, cdn = options.cdn, theme = options.theme) | 图表渲染 |
@@ -636,7 +638,7 @@ options?: IPreviewOptions {
636638
如果代码有修改或需要使用自建 CDN 的话,可按以下步骤进行操作:
637639
638640
* 初始化时,需对 `options``IPreviewOptions` 中的 `cdn``emojiPath`, `themes` 进行配置
639-
* `highlightRender` , `mathRender` , `abcRender` , `chartRender` , `mermaidRender` `flowchartRender``mindmapRender``graphvizRender``setCodeTheme``setContentTheme` 方法中需添加 cdn 参数
641+
* `highlightRender``mathRender``abcRender``chartRender``mermaidRender``SMILESRender``markmapRender``flowchartRender``mindmapRender``plantumlRender``graphvizRender``setCodeTheme``setContentTheme` 方法中需添加 cdn 参数
640642
* 将 build 成功的 dist 目录或 [jsDelivr](https://www.jsdelivr.com/package/npm/vditor?path=dist) 中的 dist 目录拷贝至正确的位置
641643
642644
### 升级

README_en_US.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ options?: IPreviewOptions {
546546
| - | - |
547547
| previewImage(oldImgElement: HTMLImageElement, lang: keyof II18n = "zh_CN", theme = "classic") | Click on the image to preview |
548548
| mermaidRender(element: HTMLElement, cdn = options.cdn, theme = options.theme) | flowchart/sequence diagram/gantt diagram rendering |
549+
| SMILESRender(element: HTMLElement, cdn = options.cdn, theme = options.theme) | the structure of chemical |
550+
| markmapRender(element: HTMLElement, cdn = options.cdn) | markdown Mind Map |
549551
| flowchartRender(element: HTMLElement, cdn = options.cdn) | flowchart.js rendering |
550552
| codeRender(element: HTMLElement, option?: IHljs) | Add a copy button for the code block in element |
551553
| chartRender(element: (HTMLElement\| Document) = document, cdn = options.cdn, theme = options.theme) | Chart rendering |
@@ -588,7 +590,7 @@ Due to the on-demand loading mechanism, the default CDN is [https://unpkg.com/vd
588590
If the code is modified or you need to use a self-built CDN, you can follow the steps below:
589591
590592
* The initial `options` and` IPreviewOptions` need to add `cdn` configuration
591-
* `highlightRender`,` mathRender`, `abcRender`,` chartRender`, `mermaidRender` methods need to add cdn parameter
593+
* `highlightRender`, `mathRender`, `abcRender`, `chartRender`, `mermaidRender`, `SMILESRender`, `markmapRender`, `flowchartRender`, `mindmapRender`, `plantumlRender`, `graphvizRender`, `setCodeTheme`, `setContentTheme` methods need to add cdn parameter
592594
* Copy the dist directory in the successful build or [jsDelivr](https://www.jsdelivr.com/package/npm/vditor?path=dist) to the correct location
593595
594596
### Upgrade

src/method.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Vditor {
3838
public static mermaidRender = mermaidRender;
3939
/** 化学物质结构渲染 */
4040
public static SMILESRender = SMILESRender;
41-
/** 支持markdown的思维导图 */
41+
/** 支持 markdown 的思维导图 */
4242
public static markmapRender = markmapRender;
4343
/** flowchart.js 渲染 */
4444
public static flowchartRender = flowchartRender;

0 commit comments

Comments
 (0)