mirror of https://github.com/artf/grapesjs.git
1 changed files with 21 additions and 0 deletions
@ -0,0 +1,21 @@ |
|||
import Component from './Component'; |
|||
import { toLowerCase } from '../../utils/mixins'; |
|||
|
|||
const type = 'head'; |
|||
|
|||
export default class ComponentHead extends Component { |
|||
get defaults() { |
|||
return { |
|||
// @ts-ignore
|
|||
...super.defaults, |
|||
type, |
|||
tagName: type, |
|||
draggable: false, |
|||
droppable: ['title', 'style', 'base', 'link', 'meta', 'script', 'noscript'], |
|||
}; |
|||
} |
|||
|
|||
static isComponent(el: HTMLElement) { |
|||
return toLowerCase(el.tagName) === type; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue