Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import MjImage from 'mjml-image'
import { registerDependencies } from 'mjml-validator'
registerDependencies({
'mj-column': ['mc-image'],
'mj-hero': ['mc-image'],
'mc-image': [],
});
export default class McImage extends MjImage {
static tagOmission = true
static allowedAttributes = {
...MjImage.allowedAttributes,
'mc:edit': 'string',
'mc:hideable': 'string',
}
static defaultAttributes = {
...MjImage.defaultAttributes,
'mc:hideable': false,
}
// MODIFIED form https://github.com/mjmlio/mjml/blob/master/packages/mjml-image/src/index.js
renderImage() {
const height = this.getAttribute('height')
const img = `
'mj-column': ['mc-image'],
'mj-hero': ['mc-image'],
'mc-image': [],
});
export default class McImage extends MjImage {
static tagOmission = true
static allowedAttributes = {
...MjImage.allowedAttributes,
'mc:edit': 'string',
'mc:hideable': 'string',
}
static defaultAttributes = {
...MjImage.defaultAttributes,
'mc:hideable': false,
}
// MODIFIED form https://github.com/mjmlio/mjml/blob/master/packages/mjml-image/src/index.js
renderImage() {
const height = this.getAttribute('height')
const img = `