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.
20 lines
519 B
20 lines
519 B
import Backbone from 'backbone';
|
|
|
|
export default Backbone.View.extend({
|
|
tagName: 'style',
|
|
|
|
initialize(o = {}) {
|
|
this.config = o.config || {};
|
|
const { model } = this;
|
|
this.listenTo(model, 'change', this.render);
|
|
this.listenTo(model, 'destroy remove', this.remove);
|
|
this.listenTo(model.get('selectors'), 'change', this.render);
|
|
},
|
|
|
|
render() {
|
|
const { model, el } = this;
|
|
const important = model.get('important');
|
|
el.innerHTML = model.toCSS({ important });
|
|
return this;
|
|
}
|
|
});
|
|
|