diff --git a/public/assets/js/bridge/blocks-custom.js b/public/assets/js/bridge/blocks-custom.js index 9ffd2a5..7b5ae4c 100644 --- a/public/assets/js/bridge/blocks-custom.js +++ b/public/assets/js/bridge/blocks-custom.js @@ -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);