Issue #2936✓ SolvedOpened Aug 3, 2020by lavioros5 reactions

Inline style loads on id instead of class

Quick answerby artf5

I'd suggest using this option

Read full answer below ↓

Question

Hello, I have been using your tool for a while and I decided to upgrade to a newer version(from v0.12.37 to v0.16.3 + gjs-preset-newsletter). I have the styles stored inline, I know it is not desirable, but since we use the tool for authoring emails, it is still a safer option. Is there a way to load inline styles on the class, if the component has a class already set(as it used to be in older versions)? I have a JSfiddle example here: https://jsfiddle.net/Lo91v0um/1/ Hence, in my case, I have the following component: <div style="font-size: 20px;" class="my-class" >A text component</div> If I...

Answers (1)

👍 Most helpfulartfAug 26, 2020

I'd suggest using this option

grapesjs.init({
  ...
  selectorManager: {
   componentFirst: true,
  },
})

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...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.