grapesjs_codeapps
Version:
Free and Open Source Web Builder Framework/SC Modification
28 lines (25 loc) • 464 B
JavaScript
const Component = require('./Component');
module.exports = Component.extend(
{
defaults: {
...Component.prototype.defaults,
droppable: false,
editable: true
},
toHTML() {
return this.get('content');
}
},
{
isComponent(el) {
var result = '';
if (el.nodeType === 3) {
result = {
type: 'textnode',
content: el.textContent
};
}
return result;
}
}
);