-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS class is erased #9423
Comments
You should not be adding classes to the comment delimiters directly via the code editor.
To add CSS while using the editor, you can use the HTML block where you can paste any random HTML and it will be kept as is. |
No, something is not right:
This is what I'm doing:
|
Oh, this is for a custom block, I see! Sorry about he confusion. It looks like your code has an issue; the issue you’re describing can’t be replicated with built-in blocks. You may want to check out the Gutenberg handbook and the block api; it looks like you aren’t saving your block of the class attribute. Unfortunately we can’t provide detailed support here as we use this issue tracker to monitor Gutenberg’s code, but it’s possibly the Make WP support forums or Make WP Slack would be good places to get some help with the code. Hope that helps! |
Thanks, it looks like a bug to me. The above is from the handbook and it doesn't contain any information on how to save
|
Describe the bug
This is really annoying that every time I enter the editor page and specify
some-class--something
for a block then it's saved like this (I see this in revisions)<!-- wp:slug/my-block {"className":"some-class\u002d\u002dsomething"} /-->
and theclassName
is completely erased after the reload of the page and the next save... (it persists during one save though).Solution
It should save class like
some-class--something
and never erase this without me knowing that.The text was updated successfully, but these errors were encountered: