Issue #2164Opened July 24, 2019by CimattiConsulting0 reactions

[QUESTION] How to overwrite classes manager?

Question

Hi @artf , Is there a way to modify the attribute where the classes are placed? (default: class) is there also a way to change the position and tag of the styles? (default: <style>)

Answers (1)

artfJuly 25, 20190 reactions

Is there a way to modify the attribute where the classes are placed? (default: class)

Not really, the only thing you can do now is to extend methods from base components. This is where is assigned in the model (used in the final HTML code) https://github.com/artf/grapesjs/blob/02ceecc87dc2116435cab1c65014fab7d6a05293/src/dom_components/model/Component.js#L422

and here for the View (when is rendered in canvas) https://github.com/artf/grapesjs/blob/02ceecc87dc2116435cab1c65014fab7d6a05293/src/dom_components/view/ComponentView.js#L219

is there also a way to change the position and tag of the styles? Nope, styles are handled (imported inside CssComposer) and removed internally by the editor

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.