Skip to content

Commit c37591f

Browse files
committed
fixup! fixup! ✨(frontend) set empty alt for decorative images in blocknote editor
1 parent edb0b04 commit c37591f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/AccessibleImageBlock.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
/* eslint-disable @typescript-eslint/no-explicit-any */
21
import {
32
BlockFromConfig,
43
BlockNoteEditor,
4+
BlockSchemaWithBlock,
5+
InlineContentSchema,
6+
StyleSchema,
57
createBlockSpec,
68
imageBlockConfig,
79
imageParse,
810
imageRender,
911
imageToExternalHTML,
1012
} from '@blocknote/core';
1113

14+
type ImageBlockConfig = typeof imageBlockConfig;
15+
1216
export const accessibleImageRender = (
13-
block: BlockFromConfig<typeof imageBlockConfig, any, any>,
14-
editor: BlockNoteEditor<any, any, any>,
17+
block: BlockFromConfig<ImageBlockConfig, InlineContentSchema, StyleSchema>,
18+
editor: BlockNoteEditor<
19+
BlockSchemaWithBlock<ImageBlockConfig['type'], ImageBlockConfig>,
20+
InlineContentSchema,
21+
StyleSchema
22+
>,
1523
) => {
1624
const imageRenderComputed = imageRender(block, editor);
1725
const dom = imageRenderComputed.dom;

0 commit comments

Comments
 (0)