Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import MjText from 'mjml-text'
import { registerDependencies } from 'mjml-validator'
registerDependencies({
'mj-column': ['mc-text'],
'mj-hero': ['mc-text'],
'mc-text': [],
});
export default class McText extends MjText {
static allowedAttributes = {
...MjText.allowedAttributes,
'mc:edit': 'string',
'mc:hideable': 'string',
}
static defaultAttributes = {
...MjText.defaultAttributes,
'mc:hideable': false
}
isHideable() {
if (this.getAttribute('mc:hideable') !== false) {
return true
}
return false
}