mirror of https://github.com/artf/grapesjs.git
4 changed files with 43 additions and 5 deletions
@ -0,0 +1,18 @@ |
|||
var Component = require('./Component'); |
|||
|
|||
module.exports = Component.extend({ |
|||
|
|||
getName() { |
|||
let name = this.get('tagName'); |
|||
return name.charAt(0).toUpperCase() + name.slice(1); |
|||
}, |
|||
|
|||
}, { |
|||
|
|||
isComponent(el) { |
|||
if (el instanceof SVGElement) { |
|||
return {type: 'svg'}; |
|||
} |
|||
}, |
|||
|
|||
}); |
|||
@ -0,0 +1,9 @@ |
|||
const ComponentView = require('./ComponentView'); |
|||
|
|||
module.exports = ComponentView.extend({ |
|||
|
|||
_createElement: function(tagName) { |
|||
return document.createElementNS('http://www.w3.org/2000/svg', tagName); |
|||
} |
|||
|
|||
}); |
|||
Loading…
Reference in new issue