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:
@@ -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 }) =>
|
||||
|
||||
Reference in New Issue
Block a user