Removing Code Block from CMS item's Rich Text Field

I’ve accidentally added a code block element to a rich text field in one of my CMS items—the new, native code block feature.

On hover, this element has only a wrench icon for changing the element’s settings (for things like code syntax, line enumeration, etc.), but it has no option to delete the element.

I’ve tried everything from CMD+SHIFT+Down to mashing delete and backspace, but this thing doesn’t want to remove itself from my CMS item :sweat_smile:

Contractual obligations prevent me from sharing the project’s read-only link, but I’ve attached a screenshot.

Has anyone found a way to remove one of these from the rich text field(s) in their CMS items?

Thanks for any help you can provide :pray:

1 Like

It seems to be a work in progress, it can’t be styled yet either ( adding margins and padding, background color, etc. ). I’m able to delete mine by placing the cursor on the line before the code block, and shift-click to the line after the code block.

As long as you get the whole thing, you should be able to delete it.

RESOLVED

Had to trade some emails with technical support, but we got it figured out.

The problem was that it isn’t obvious when the element is selected.

If you run into this issue, try clicking the element—you’ll see the wrench tooltip appear. In this state, the element is effectively “selected”. From there, you can remove it by hitting backspace or delete. Alternatively, you can hit enter, create a new line, and backspace twice.

Thanks for the solution. This is very poor interface design. I hope Webflow fixes the problem.