refactor(editor-ext): remove unused setImageCaption command (F7)

The setImageCaption command and its Commands<> declaration were dead:
captions are written via the generic updateAttributes in
useImageTextFieldControl, and a repo-wide grep finds zero callers.
Remove the speculative implementation (image.ts) and its type
declaration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
claude code agent 227
2026-06-29 01:43:08 +03:00
parent d39b7ae67c
commit 932bfce1d9

View File

@@ -55,7 +55,6 @@ declare module "@tiptap/core" {
setImageAlign: (
align: "left" | "center" | "right" | "floatLeft" | "floatRight",
) => ReturnType;
setImageCaption: (caption: string | undefined) => ReturnType;
setImageWidth: (width: number) => ReturnType;
setImageSize: (width: number, height: number) => ReturnType;
};
@@ -194,11 +193,6 @@ export const TiptapImage = Image.extend<ImageOptions>({
({ commands }) =>
commands.updateAttributes("image", { align }),
setImageCaption:
(caption) =>
({ commands }) =>
commands.updateAttributes("image", { caption }),
setImageWidth:
(width) =>
({ commands }) =>