diff --git a/src/commands/view/ComponentStyleClear.js b/src/commands/view/ComponentStyleClear.js index 9c667d4a9..4e06ec02e 100644 --- a/src/commands/view/ComponentStyleClear.js +++ b/src/commands/view/ComponentStyleClear.js @@ -10,7 +10,7 @@ module.exports = { if (!len) { const rules = ed.CssComposer.getAll(); - let toClear = target.get('style-clear'); + let toClear = target.get('style-signature'); toClear = isArray(toClear) ? toClear : [toClear]; rules.forEach(rule => { diff --git a/src/dom_components/model/Component.js b/src/dom_components/model/Component.js index b251d53eb..ff8d3aab9 100644 --- a/src/dom_components/model/Component.js +++ b/src/dom_components/model/Component.js @@ -62,7 +62,7 @@ const avoidInline = em => em && em.getConfig('avoidInlineStyle'); * will be hidden from the style manager. Default: `true` * @property {Array} [stylable-require=[]] Indicate an array of style properties to show up which has been marked as `toRequire`. Default: `[]` * @property {Array} [unstylable=[]] Indicate an array of style properties which should be hidden from the style manager. Default: `[]` - * @property {Array} [style-clear=''] This option comes handy when you need to remove component-specific rules. The editor will remove rules when there are no components, of that type, in the canvas. Eg. '['.navbar', '[navbar-']'. Default: `''` + * @property {Array} [style-signature=''] This option comes handy when you need to remove or export strictly component-specific rules. Be default, if this option is not empty, the editor will remove rules when there are no components, of that type, in the canvas. Eg. '['.navbar', '[navbar-']'. Default: `''` * @property {Boolean} [highlightable=true] It can be highlighted with 'dotted' borders if true. Default: `true` * @property {Boolean} [copyable=true] True if it's possible to clone the component. Default: `true` * @property {Boolean} [resizable=false] Indicates if it's possible to resize the component. It's also possible to pass an object as [options for the Resizer](https://github.com/artf/grapesjs/blob/master/src/utils/Resizer.js). Default: `false` @@ -95,7 +95,7 @@ const Component = Backbone.Model.extend(Styleable).extend( badgable: true, stylable: true, 'stylable-require': '', - 'style-clear': '', + 'style-signature': '', unstylable: '', highlightable: true, copyable: true, diff --git a/src/dom_components/view/ComponentsView.js b/src/dom_components/view/ComponentsView.js index 1ff9ebf3b..e1d3e0626 100644 --- a/src/dom_components/view/ComponentsView.js +++ b/src/dom_components/view/ComponentsView.js @@ -19,7 +19,7 @@ module.exports = Backbone.View.extend({ const children = view.childrenView; children && children.stopListening(); if (em) { - removed.get('style-clear') && + removed.get('style-signature') && em .get('Commands') .run('core:component-style-clear', { target: removed });