This commit is contained in:
2025-12-08 00:22:13 +01:00
parent 695c0124d0
commit cf569a3b1b

View File

@@ -93,6 +93,12 @@
domc.addType(PLACEHOLDER_COMPONENT, {
extend: 'text',
isComponent(el) {
if (el && el.hasAttribute && el.hasAttribute('data-placeholder-type')) {
return { type: PLACEHOLDER_COMPONENT };
}
return false;
},
model: {
defaults: {
name: 'Placeholder',
@@ -223,14 +229,7 @@
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({
render() {
editor.DomComponents.View.prototype.render.apply(this, arguments);