Unable to load in CSS string with characters such as '#' with setStyle()
Question
You're submitting a BUG
-
Are you using the latest release (older versions are NOT supported)?
- If you're not sure, type
grapesjs.versionin console and press ENTER
- If you're not sure, type
-
Are you facing the bug with your local copy of GrapesJS or with the current demo?
-
If a local copy
- Indicate all informations about your OS, browser and GrapesJS version. Ubuntu 16.04 Firefox, Grapesjs V0.14.40
- Are you able to reproduce the bug from the demo? Yes any time I call setStyle with a CSS string, it rejects any css containing # which is used to mark IDs
-
What is the expected behavior? I am using setStyle to load in an external CSS based on ongoing projects. When grapesjs sets css for attributes it creates a random id and after I export this Css and attempt to load it and set it again with a css string, it fails.
-
What happens instead? The function setStyles returns an error
Answers (3)
First of all, use the latest version and then, can you show an example and the error returned by setStyle?
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1693
[BUG|/QUESTION] Strange characters (Â) within CSS/HTML preview; Elements are not deleted completely
BUGAre you using the latest release (older versions are NOT supported)?0.14.50Are you facing the bug with your local copy of GrapesJS or wi...
Issue #1941
[BUG]: When dragging a block over the canvas, JS in script, is appended in canvas before dropping the block.
You're submitting a BUG Are you using the latest release (older versions are NOT supported)? v0.14.57 Are you facing the bug with your loca...
Issue #1411
Manual triggering of the asset manager rendering is required after opening the AM pop-up
Questions Q: Are you using the latest release (older versions are NOT supported)? A: Yes Q. Are you facing the bug with your local copy of...
Issue #1369
[BUG] Class of a block doesn't always show in the classes section
Hello everyone, I have added many custom blocks and gave the same css class to all the images in those blocks. Let's call it for now 'image...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.