Issue #1758Opened January 29, 2019by tjb2950 reactions

Unable to load in CSS string with characters such as '#' with setStyle()

Question

You're submitting a BUG

  1. Are you using the latest release (older versions are NOT supported)?

    1. If you're not sure, type grapesjs.version in console and press ENTER
  2. Are you facing the bug with your local copy of GrapesJS or with the current demo?

  3. If a local copy

    1. Indicate all informations about your OS, browser and GrapesJS version. Ubuntu 16.04 Firefox, Grapesjs V0.14.40
    2. 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
  4. 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.

  5. What happens instead? The function setStyles returns an error

Answers (3)

artfFebruary 5, 20190 reactions

First of all, use the latest version and then, can you show an example and the error returned by setStyle?

no-response[bot]February 16, 20190 reactions

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.

lock[bot]February 16, 20200 reactions

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.

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.