You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/editor/src/view/hooks/useFilesGallery/README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ _UseFilesGalleryOptions_
27
27
| download |`(url: string, type: FilesGalleryItemType, element: Element) => string or undefined`|||| The file download link getter (if you want to show the download action) |
28
28
| copyUrl |`(url: string, type: FilesGalleryItemType, element: Element) => string or undefined`|||| The file copy link getter (if you want to show the copy link action) |
29
29
| overrideItemProps |`(url: string, type: FilesGalleryItemType, element: Element, currentProps: GalleryItemProps) => GalleryItemProps`|||| The custom gallery item props getter (if you want to override the default gallery item props) |
30
+
| resolveCustomItem |`(url: string, type: 'file', element: Element, linkObj: {name?: string or null; mimetype?: string or null}) => GalleryItemProps or undefined`|||| Resolves base `GalleryItemProps` for elements not handled by the default image/video logic (e.g. arbitrary file links). Return `undefined` to skip the element. The returned props go through the same `download`/`copyUrl`/`overrideItemProps` pipeline with `type: 'file'`. If the returned props contain `actions`, they are merged with the auto-generated download/copy actions. Note: `FilesGalleryItemType` is now `'image' \| 'video' \| 'file'` — callers doing exhaustive `switch` on `type` in other options may need to handle the new `'file'` case. |
30
31
31
32
32
33
_useFilesGallery returns function `openFilesGallery` with the following args_:
0 commit comments