vditor 3.10.2 → 3.10.4

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
@@ -309,7 +309,7 @@ new Vditor('vditor', {
309
309
  | style | 可选值参见[Chroma](https://xyproto.github.io/splash/docs/longer/all.html) | `github` |
310
310
  | lineNumber | 是否启用行号 | false |
311
311
  | langs | 自定义指定语言 | [CODE_LANGUAGES](https://github.com/Vanessa219/vditor/blob/53ca8f9a0e511b37b5dae7c6b15eb933e9e02ccd/src/ts/constants.ts#L20) |
312
- | renderMenu | 渲染菜单按钮 | - |
312
+ | renderMenu(code: HTMLElement, copy: HTMLElement) | 渲染菜单按钮 | - |
313
313
 
314
314
  #### options.preview.markdown
315
315
 
@@ -359,6 +359,12 @@ new Vditor('vditor', {
359
359
  | className | 按钮类名 | - |
360
360
  | click(key: string) | 按钮点击回调事件 | - |
361
361
 
362
+ #### options.preview.render.media
363
+
364
+ | | 说明 | 默认值 |
365
+ |--------|-----------|------|
366
+ | enable | 是否启用多媒体渲染 | true |
367
+
362
368
  #### options.image
363
369
 
364
370
  | | 说明 | 默认值 |
@@ -575,6 +581,7 @@ options?: IPreviewOptions {
575
581
  lazyLoadImage?: string; // 设置为 Loading 图片地址后将启用图片的懒加载
576
582
  markdown?: options.preview.markdown;
577
583
  theme?: options.preview.theme;
584
+ render?: options.preview.render;
578
585
  renderers?: ILuteRender; // 自定义渲染 https://ld246.com/article/1588412297062
579
586
  }
580
587
  ```
package/dist/index.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vditor v3.10.2 - A markdown editor written in TypeScript.
2
+ * Vditor v3.10.4 - A markdown editor written in TypeScript.
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -529,9 +529,6 @@
529
529
  box-sizing: border-box;
530
530
  font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", "Hiragino Sans GB", "Microsoft Yahei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols";
531
531
  }
532
- .vditor .vditor-copy {
533
- z-index: auto;
534
- }
535
532
  .vditor--fullscreen {
536
533
  position: fixed;
537
534
  top: 0;
@@ -1324,6 +1321,7 @@
1324
1321
  .vditor-outline li > span > svg {
1325
1322
  height: 10px;
1326
1323
  width: 10px;
1324
+ flex-shrink: 0;
1327
1325
  }
1328
1326
  .vditor-outline li > span:hover {
1329
1327
  color: var(--toolbar-icon-hover-color);
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ declare class Vditor extends VditorMethod {
9
9
  * @param options Vditor 参数
10
10
  */
11
11
  constructor(id: string | HTMLElement, options?: IOptions);
12
+ private showErrorTip;
12
13
  /** 设置主题 */
13
14
  setTheme(theme: "dark" | "classic", contentTheme?: string, codeTheme?: string, contentThemePath?: string): void;
14
15
  /** 获取 Markdown 内容 */