On second-time use template grapes editor not accepting css which the editor created with random ids on the first time
@Spiral1234 if you're not able to reproduce the issue it's probably something on your end and without a reproducible demo it's hard to understand what might be a problem
Read full answer below βQuestion
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 111.0.5563.147 (Official Build) (64-bit) Reproducible demo link I can't Reproducible on jsfilddle. i provided detail below. Describe the bug How to reproduce the bug?This is my template which I uploaded in Grapes in which I have inline CSS in a style tag in the head as well as an inline style in body tags https://jsfiddle.net/spiral417/udye5ov1/First-time Grapesjs fetched inline CSS from body tags and insert random ids and put CSS in these ids. so I'm saving all CSS styles but when I use t...
Answers (2)
@Spiral1234 if you're not able to reproduce the issue it's probably something on your end and without a reproducible demo it's hard to understand what might be a problem
The issue you're encountering stems from how GrapesJS processes and normalizes styles, particularly inline styles, when importing HTML. Let's break down the root cause and provide the correct approach. Root Cause Explanation When GrapesJS imports HTML, it performs a crucial style normalization step...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5040
Added style able events such that styling can be overwritten, open
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Version 111.0.5563.147 (Official Build) (6...
Issue #6659
Symbol styles not synced
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 145.0 (64-bit) Reproducible demo l...
Issue #4859
Editing CSS property sets a style to a common class instead of element
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome v108Reproducible demo link https://gr...
Issue #4191
We are trying to store the data from grapesJS editor in Angular 10 application, getting CORS error, image attached below
GrapesJS version [x] I confirm to use the latest version of GrapesJS What browser are you using? Chrome 99.0.4844.5 Reproducible demo link...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Tutorial
How to Build a Production GrapesJS Editor: The Complete Walkthrough of Brief, Preset, Plugins, and Services
A complete walkthrough of building a production GrapesJS editor: how to choose a preset, pick plugins, and scope setup services without burning a sprint.
Tutorial
Big Updates: TinyMCE 8 and Placeholder 2.0 for GrapesJS
In May we shipped major updates to two of our most popular GrapesJS plugins β TinyMCE Inline Text Editor and Placeholder.
Tutorial
Find the Right GrapesJS Plugin in Seconds: Smarter Discovery Is Live
We're shipping a set of discovery upgrades. New label filters, a proper compatibility switch for GrapesJS vs Studio, one-click and a smarter sort bar.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.