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 (, , , , ).
33 lines
562 B
TypeScript
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);
|
|
}
|
|
});
|