Merge pull request #3801 from continuedev/dallin/tall-images

Fix: Tall Images in Editor
This commit is contained in:
Patrick Erichsen 2025-01-22 11:37:40 -08:00 • committed by GitHub
commit 9c21960298
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -303,7 +303,6 @@ function TipTapEditor(props: TipTapEditorProps) {
"Images need to be in jpg or png format and less than 10MB in size.",
]);
}
return undefined;
}
const { prevRef, nextRef, addRef } = useInputHistory(props.historyKey);
@ -351,7 +350,7 @@ function TipTapEditor(props: TipTapEditorProps) {
},
}).configure({
HTMLAttributes: {
class: "editor-image bg-black object-contain max-h-[250px] w-full",
class: "object-contain max-h-[210px] max-w-full mx-1",
},
}),
Placeholder.configure({
@ -802,7 +801,7 @@ function TipTapEditor(props: TipTapEditorProps) {
const contextItem = rifWithContentsToContextItem(
data.rangeInFileWithContents,
);
console.log(contextItem);
let index = 0;
for (const el of editor.getJSON()?.content ?? []) {
if (el.attrs?.item?.name === contextItem.name) {