plane/apps/app/components/tiptap/extensions/updated-image.tsx

22 lines
409 B
TypeScript
Raw Normal View History

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