Liyuan Li hace 5 años
padre
commit
33fbc2fcd5
Se han modificado 3 ficheros con 16 adiciones y 3 borrados
  1. 2 1
      CHANGELOG.md
  2. 13 1
      README.md
  3. 1 1
      README_en_US.md

+ 2 - 1
CHANGELOG.md

@@ -71,6 +71,7 @@
 
 ### v3.3.7 / 2020-07-17
 
+* [580](https://github.com/Vanessa219/vditor/issues/580) 重构 SV 模式 DOM `开发重构`
 * [567](https://github.com/Vanessa219/vditor/issues/567) SV 模式块引用嵌套列表、代码块问题 `修复缺陷`
 * [563](https://github.com/Vanessa219/vditor/issues/563) SV 模式列表项下的代码块问题 `修复缺陷`
 * [579](https://github.com/Vanessa219/vditor/issues/579) 样式调整 `改进功能`
@@ -148,7 +149,7 @@
   * 添加 `options.upload.fieldName`
   * `options.preview.markdown.setext` 默认值修改为 `true`
   * options.mode 默认值修改为 `ir`
-  * 工具栏配置:默认值:["desktop", "tablet", "mobile", "mp-wechat", "zhihu"] 
+  * 支持预览区域工具栏配置及自定义
 
 ### v3.2.12 / 2020-06-07
 

+ 13 - 1
README.md

@@ -187,7 +187,7 @@ const vditor = new Vditor(id, {options...})
 | tab | <kbd>tab</kbd> 键操作字符串,支持 `\t` 及任意字符串 | - |
 | typewriterMode | 是否启用打字机模式 | false |
 | cdn | 配置自建 CDN 地址 | `https://cdn.jsdelivr.net/npm/vditor@${VDITOR_VERSION}` |
-| mode | 可选模式:sv, ir, wysiwyg | 'wysiwyg' |
+| mode | 可选模式:sv, ir, wysiwyg | 'ir' |
 | debugger | 是否显示日志 | false |
 | value | 编辑器初始化值 | '' |
 | theme | 主题:classic, dark | 'classic' |
@@ -301,6 +301,18 @@ new Vditor('vditor', {
 | macros | 使用 MathJax 渲染时传入的宏定义 | {} |
 | engine | 数学公式渲染引擎:KaTeX, MathJax | 'KaTeX' |
 
+#### options.preview.actions?: Array<IPreviewAction | IPreviewActionCustom>
+
+默认值为 ["desktop", "tablet", "mobile", "mp-wechat", "zhihu"]。
+可从默认值中挑选进行配置,也可使用以下字段进行自定制开发。
+
+|   | 说明 | 默认值 |
+| - | - | - |
+| key | 按钮唯一标识,不能为空 | - |
+| text | 按钮文字 | - |
+| className | 按钮类名 | - |
+| click: (key: string) => void; | 按钮点击回调事件 | - |
+
 #### options.hint
 
 |   | 说明 | 默认值 |

+ 1 - 1
README_en_US.md

@@ -301,7 +301,7 @@ new Vditor('vditor', {
 
 #### options.preview.actions
 
-Default: "desktop" | "tablet" | "mobile" | "mp-wechat" | "zhihu"
+Default: ["desktop", "tablet", "mobile", "mp-wechat", "zhihu"]
 
 |   | Explanation | Default |
 | - | - | - |