dsd
This commit is contained in:
@@ -93,6 +93,12 @@
|
|||||||
|
|
||||||
domc.addType(PLACEHOLDER_COMPONENT, {
|
domc.addType(PLACEHOLDER_COMPONENT, {
|
||||||
extend: 'text',
|
extend: 'text',
|
||||||
|
isComponent(el) {
|
||||||
|
if (el && el.hasAttribute && el.hasAttribute('data-placeholder-type')) {
|
||||||
|
return { type: PLACEHOLDER_COMPONENT };
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
model: {
|
model: {
|
||||||
defaults: {
|
defaults: {
|
||||||
name: 'Placeholder',
|
name: 'Placeholder',
|
||||||
@@ -223,14 +229,7 @@
|
|||||||
comps.reset([{ type: 'textnode', content: text }]);
|
comps.reset([{ type: 'textnode', content: text }]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}, {
|
},
|
||||||
isComponent(el) {
|
|
||||||
if (el && el.hasAttribute && el.hasAttribute('data-placeholder-type')) {
|
|
||||||
return { type: PLACEHOLDER_COMPONENT };
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
view: editor.DomComponents.View.extend({
|
view: editor.DomComponents.View.extend({
|
||||||
render() {
|
render() {
|
||||||
editor.DomComponents.View.prototype.render.apply(this, arguments);
|
editor.DomComponents.View.prototype.render.apply(this, arguments);
|
||||||
|
|||||||
Reference in New Issue
Block a user