2023-08-19 13:28:54 +00:00
|
|
|
import Image from "@tiptap/extension-image";
|
|
|
|
import TrackImageDeletionPlugin from "../plugins/delete-image";
|
|
|
|
import UploadImagesPlugin from "../plugins/upload-image";
|
|
|
|
|
|
|
|
const UpdatedImage = Image.extend({
|
|
|
|
addProseMirrorPlugins() {
|
|
|
|
return [UploadImagesPlugin(), TrackImageDeletionPlugin()];
|
|
|
|
},
|
|
|
|
addAttributes() {
|
|
|
|
return {
|
|
|
|
...this.parent?.(),
|
|
|
|
width: {
|
2023-09-03 13:20:30 +00:00
|
|
|
default: "35%",
|
2023-08-19 13:28:54 +00:00
|
|
|
},
|
|
|
|
height: {
|
|
|
|
default: null,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default UpdatedImage;
|