mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
feat(editor): add favicon, title, description support for footnote url reference (#11924)
Closes: [BS-3272](https://linear.app/affine-design/issue/BS-3272/footnote-适配-exa-api-返回结果) ## What's Changed Add link preview data support (favicon, title, description) for URL references in footnotes: - Store and display URL preview data in footnotes - Add encoding/decoding support for favicon URLs - Optimize link preview by using existing preview data when available
This commit is contained in:
@@ -65,6 +65,9 @@ export type ReferenceInfo = z.infer<typeof ReferenceInfoSchema>;
|
||||
* 3. url: string - the url of the reference
|
||||
* 4. fileName: string - the name of the attachment
|
||||
* 5. fileType: string - the type of the attachment
|
||||
* 6. favicon: string - the favicon of the url reference
|
||||
* 7. title: string - the title of the url reference
|
||||
* 8. description: string - the description of the url reference
|
||||
*/
|
||||
export const FootNoteReferenceParamsSchema = z.object({
|
||||
type: z.enum(FootNoteReferenceTypes),
|
||||
@@ -73,6 +76,9 @@ export const FootNoteReferenceParamsSchema = z.object({
|
||||
fileName: z.string().optional(),
|
||||
fileType: z.string().optional(),
|
||||
url: z.string().optional(),
|
||||
favicon: z.string().optional(),
|
||||
title: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
});
|
||||
|
||||
export type FootNoteReferenceParams = z.infer<
|
||||
|
||||
Reference in New Issue
Block a user