@cherry-markdown/cherry-markdown-dev 0.9.4-dev.202506120857.0c29374 → 0.9.4-dev.202506281413.ba2c6df

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.
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cherry-markdown/cherry-markdown-dev",
3
3
  "license": "Apache-2.0",
4
- "version": "0.9.4-dev.202506120857.0c29374",
4
+ "version": "0.9.4-dev.202506281413.ba2c6df",
5
5
  "description": "a new markdown editor",
6
6
  "repository": {
7
7
  "type": "git",
package/types/cherry.d.ts CHANGED
@@ -137,7 +137,7 @@ export interface _CherryOptions<T extends CherryCustomOptions = CherryCustomOpti
137
137
  /** 文件上传回调 */
138
138
  fileUpload?: CherryFileUploadHandler;
139
139
  /** 多文件上传回调 */
140
- fileUploadMulti?: CherryFileUploadHandler;
140
+ fileUploadMulti?: CherryFileUploadMultiHandler;
141
141
  /** 编辑器内容改变并完成渲染后触发 */
142
142
  afterChange?: CherryLifecycle;
143
143
  /** 编辑器完成初次渲染后触发 */
@@ -721,6 +721,24 @@ export interface CherryFileUploadHandler {
721
721
  ) => void): void;
722
722
  }
723
723
 
724
+ export interface CherryFileUploadMultiHandler {
725
+ /**
726
+ * @param files 用户上传的文件对象数组
727
+ * @param callback 回调函数,接收最终的文件url
728
+ */
729
+ (files: File[],
730
+ /**
731
+ * @param params.name 回填的alt信息
732
+ * @param params.poster 封面图片地址(视频的场景下生效)
733
+ * @param params.isBorder 是否有边框样式(图片场景下生效)
734
+ * @param params.isShadow 是否有阴影样式(图片场景下生效)
735
+ * @param params.isRadius 是否有圆角样式(图片场景下生效)
736
+ * @param params.width 设置宽度,可以是像素、也可以是百分比(图片、视频场景下生效)
737
+ * @param params.height 设置高度,可以是像素、也可以是百分比(图片、视频场景下生效)
738
+ */
739
+ callback: (url: string, params?: { name?: string, poster?: string, isBorder?: boolean, isShadow?: boolean, isRadius?: boolean; width?: string, height?: string }
740
+ ) => void): void;
741
+ }
724
742
 
725
743
  type ShortcutKeyMapStruct = {
726
744
  /**