mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 00:08:25 +00:00
18 lines
369 B
JavaScript
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;`,
|
|
}
|
|
},
|
|
},
|
|
}
|
|
},
|
|
})
|