2023-08-16 17:13:17 +00:00
|
|
|
import Image from "@tiptap/extension-image";
|
2023-08-18 09:57:13 +00:00
|
|
|
import TrackImageDeletionPlugin from "../plugins/delete-image";
|
2023-08-17 15:07:01 +00:00
|
|
|
import UploadImagesPlugin from "../plugins/upload-image";
|
2023-08-16 17:13:17 +00:00
|
|
|
|
|
|
|
const UpdatedImage = Image.extend({
|
2023-08-17 15:07:01 +00:00
|
|
|
addProseMirrorPlugins() {
|
2023-08-18 09:57:13 +00:00
|
|
|
return [UploadImagesPlugin(), TrackImageDeletionPlugin()];
|
2023-08-17 15:07:01 +00:00
|
|
|
},
|
2023-08-16 17:13:17 +00:00
|
|
|
addAttributes() {
|
|
|
|
return {
|
|
|
|
...this.parent?.(),
|
|
|
|
width: {
|
2023-08-17 15:07:01 +00:00
|
|
|
default: '35%',
|
2023-08-16 17:13:17 +00:00
|
|
|
},
|
|
|
|
height: {
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default UpdatedImage;
|