Files
baserow/web-frontend/modules/core/editor/image.js
T

18 lines
369 B
JavaScript

import { Image } from '@tiptap/extension-image'
export const ScalableImage = Image.extend({
addAttributes() {
return {
...this.parent?.(),
maxWidth: {
default: '100%',
renderHTML: (attributes) => {
return {
style: `max-width: ${attributes.maxWidth}; height: auto;`,
}
},
},
}
},
})