vditor 3.8.14 → 3.8.17

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 CHANGED
@@ -114,6 +114,7 @@ Vditor 在这些方面做了努力,希望能为现代化的通用 Markdown 编
114
114
 
115
115
  * [Sym](https://github.com/88250/symphony) 一款用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)平台
116
116
  * [Solo](https://github.com/88250/solo) & [Pipe](https://github.com/88250/pipe) B3log 分布式社区的博客端节点,欢迎加入下一代社区网络
117
+ * [Tditor](https://tditor.com) 基于React、Vditor、Springboot, 一款打造极致文字创作体验的在线Markdown编辑平台
117
118
  * [Arya](https://github.com/nicejade/markdown-online-editor) 基于 Vue、Vditor,所构建的在线 Markdown 编辑器
118
119
  * [更多案例](https://github.com/Vanessa219/vditor/network/dependents?package_id=UGFja2FnZS0zMTY2Mzg4MzE%3D)
119
120
 
@@ -131,7 +132,7 @@ npm install vditor --save
131
132
 
132
133
  ```ts
133
134
  import Vditor from 'vditor'
134
- import "~vditor/src/assets/scss/index"
135
+ import "~vditor/src/assets/less/index"
135
136
 
136
137
  const vditor = new Vditor(id, {options...})
137
138
  ```
@@ -141,9 +142,9 @@ const vditor = new Vditor(id, {options...})
141
142
  * 在 HTML 中插入 CSS 和 JavaScript,可参考 [demo](https://b3log.org/vditor/demo/index.html)
142
143
 
143
144
  ```html
144
- <!-- ⚠️生产环境请指定版本号,如 https://cdn.jsdelivr.net/npm/vditor@x.x.x/dist... -->
145
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vditor/dist/index.css" />
146
- <script src="https://cdn.jsdelivr.net/npm/vditor/dist/index.min.js"></script>
145
+ <!-- ⚠️生产环境请指定版本号,如 https://unpkg.com/vditor@x.x.x/dist... -->
146
+ <link rel="stylesheet" href="https://unpkg.com/vditor/dist/index.css" />
147
+ <script src="https://unpkg.com/vditor/dist/index.min.js"></script>
147
148
  ```
148
149
 
149
150
  ### 示例代码
@@ -161,7 +162,7 @@ const vditor = new Vditor(id, {options...})
161
162
 
162
163
  * 编辑器初始化时可通过 `options.theme` 设置内置主题
163
164
  * 初始化完成后可通过 `setTheme` 更新编辑器主题
164
- * 可通过修改 [index.scss](https://github.com/Vanessa219/vditor/blob/master/src/assets/scss/index.scss) 中的变量对主题颜色进行定制
165
+ * 可通过修改 [index.less](https://github.com/Vanessa219/vditor/blob/master/src/assets/less/index.less) 中的变量对主题颜色进行定制
165
166
  * 可参考现有结构和类名在原有基础上进行修改
166
167
 
167
168
  #### 内容主题
@@ -209,7 +210,7 @@ Markdown 输出的 HTML 所展现的外观。内置 ant-design, light,dark,w
209
210
  | select(value: string) | 编辑器中选中文字后触发 | - |
210
211
  | tab | <kbd>tab</kbd> 键操作字符串,支持 `\t` 及任意字符串 | - |
211
212
  | typewriterMode | 是否启用打字机模式 | false |
212
- | cdn | 配置自建 CDN 地址 | `https://cdn.jsdelivr.net/npm/vditor@${VDITOR_VERSION}` |
213
+ | cdn | 配置自建 CDN 地址 | `https://unpkg.com/vditor@${VDITOR_VERSION}` |
213
214
  | mode | 可选模式:sv, ir, wysiwyg | 'ir' |
214
215
  | debugger | 是否显示日志 | false |
215
216
  | value | 编辑器初始化值 | '' |
@@ -328,7 +329,7 @@ new Vditor('vditor', {
328
329
  | - | - | - |
329
330
  | current | 当前主题 | "light" |
330
331
  | list | 可选主题列表 | { "ant-design": "Ant Design", dark: "Dark", light: "Light", wechat: "WeChat" } |
331
- | path | 主题样式地址 | `https://cdn.jsdelivr.net/npm/vditor@${VDITOR_VERSION}/dist/css/content-theme` |
332
+ | path | 主题样式地址 | `https://unpkg.com/vditor@${VDITOR_VERSION}/dist/css/content-theme` |
332
333
 
333
334
  #### options.preview.math
334
335
 
@@ -359,7 +360,7 @@ new Vditor('vditor', {
359
360
  | delay | 提示 debounce 毫秒间隔 | 200 |
360
361
  | emoji | 默认表情,可从[lute/emoji_map](https://github.com/88250/lute/blob/master/parse/emoji_map.go) 中选取,也可自定义 | { '+1': '👍', '-1': '👎', 'heart': '❤️', 'cold_sweat': '😰' } |
361
362
  | emojiTail | 常用表情提示 | - |
362
- | emojiPath | 表情图片地址 | `https://cdn.jsdelivr.net/npm/vditor@${VDITOR_VERSION}/dist/images/emoji` |
363
+ | emojiPath | 表情图片地址 | `https://unpkg.com/vditor@${VDITOR_VERSION}/dist/images/emoji` |
363
364
  | extend: IHintExtend[] | 对 @/话题等关键字自动补全的扩展 | [] |
364
365
 
365
366
  ```ts
@@ -520,7 +521,7 @@ if (xhr.status === 200) {
520
521
 
521
522
  #### static methods
522
523
 
523
- * 不需要进行编辑操作时,仅需引入 [`method.min.js`](https://cdn.jsdelivr.net/npm/vditor/dist/) 后如下直接调用
524
+ * 不需要进行编辑操作时,仅需引入 [`method.min.js`](https://unpkg.com/vditor/dist/) 后如下直接调用
524
525
 
525
526
  ```js
526
527
  Vditor.mermaidRender(document)
@@ -600,7 +601,7 @@ options?: IPreviewOptions {
600
601
 
601
602
  ### CDN 切换
602
603
 
603
- 由于使用了按需加载的机制,默认 CDN 为 [https://cdn.jsdelivr.net/npm/vditor](https://cdn.jsdelivr.net/npm/vditor)@版本号
604
+ 由于使用了按需加载的机制,默认 CDN 为 [https://unpkg.com/vditor](https://unpkg.com/vditor)@版本号
604
605
 
605
606
  如果代码有修改或需要使用自建 CDN 的话,可按以下步骤进行操作:
606
607
 
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vditor v3.8.14 - A markdown editor written in TypeScript.
2
+ * Vditor v3.8.17 - A markdown editor written in TypeScript.
3
3
  *
4
4
  * MIT License
5
5
  *