mirror of https://github.com/artf/grapesjs.git
nocodeframeworkdrag-and-dropsite-buildersite-generatortemplate-builderui-builderweb-builderweb-builder-frameworkwebsite-builderno-codepage-builder
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
673 B
33 lines
673 B
import Component from './Component';
|
|
import { escape } from 'utils/mixins';
|
|
|
|
export default Component.extend(
|
|
{
|
|
defaults: {
|
|
...Component.prototype.defaults,
|
|
tagName: '',
|
|
droppable: false,
|
|
layerable: false,
|
|
selectable: false,
|
|
editable: true,
|
|
},
|
|
|
|
toHTML() {
|
|
const parent = this.parent();
|
|
const cnt = this.get('content');
|
|
return parent && parent.is('script') ? cnt : escape(cnt);
|
|
},
|
|
},
|
|
{
|
|
isComponent(el) {
|
|
var result = '';
|
|
if (el.nodeType === 3) {
|
|
result = {
|
|
type: 'textnode',
|
|
content: el.textContent,
|
|
};
|
|
}
|
|
return result;
|
|
},
|
|
}
|
|
);
|
|
|