mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
23 lines
501 B
TypeScript
23 lines
501 B
TypeScript
|
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: {
|
||
|
default: '35%',
|
||
|
},
|
||
|
height: {
|
||
|
default: null,
|
||
|
},
|
||
|
};
|
||
|
},
|
||
|
});
|
||
|
|
||
|
export default UpdatedImage;
|