Files
OSIT-AE-App-Svelte/src/lib/components/shad-editor/custom/Extentions/ImageExtention.ts
Scott Idem 7e1eaba3bc feat: Migrate ESLint to flat config and resolve initial linting errors
Migrated the ESLint configuration to the new flat config format ()
and addressed several initial linting errors.

Key changes include:
- Updated ESLint configuration to treat  as warnings instead of errors.
- Fixed  errors in  by declaring  and .
- Corrected  error in  by using  instead of an out-of-scope .
- Resolved  error in  by replacing the undefined  directive with the  component.
- Addressed  errors in  by replacing  with  and  with .
- Fixed  errors in  by importing necessary modules (, , ) and adding missing props (, , , , ).
2025-11-17 18:46:54 -05:00

33 lines
562 B
TypeScript

import { SvelteNodeViewRenderer } from 'svelte-tiptap';
import ImageExtendedComponent from '../image-extended-component.svelte';
import Image from '@tiptap/extension-image';
export const ImageExtension = Image.extend({
addAttributes() {
return {
src: {
default: null
},
alt: {
default: null
},
title: {
default: null
},
width: {
default: '100%'
},
height: {
default: null
},
align: {
default: 'left'
}
};
},
addNodeView: () => {
return SvelteNodeViewRenderer(ImageExtendedComponent);
}
});