Recent searches


No recent searches

Prevent stripping of custom classes in content blocks



Posted Feb 12, 2024

Since it was announced that tables can be used in content blocks, our team of writers in Guide has noticed that when a content block contains custom formatting (such as custom classes for tables), any subsequent edits to the content block strips out the custom formatting. Zendesk Support confirmed that this is expected behavior.

We've run into this problem with two of our content blocks that contain tables. Our current workaround is to save the HTML for these blocks elsewhere, then paste the code into the content block code editor if we need to make any changes.

However, we're planning to revamp almost 30 content blocks in the next month or so, and this issue could severely limit our options if we wanted to use custom classes for these blocks. Maintaining HTML for each block elsewhere and copy/pasting for each edit would become a major inconvenience.

The ideal solution is for custom classes to behave in content blocks the same way they do in articles.

Thank you!


1

2

2 comments

image avatar

Katarzyna Karpinska

Zendesk Product Manager

Hi Anelise Leishman

Thank you for your feedback, it's hard for me to address your issues without seeing the code. But you may find this article helpful to see which HTML attributes are supported in content blocks (and articles). We are also planning to introduce a new tool to work with HTML in content blocks soon, which I expect could help your case. 

 

1


Hi Katarzyna Karpinska—We noticed that editing content blocks not only still strips custom formatting, but adds a new zd-html-block element at the top of the content block code.

I thought HTML blocks were only in early access at this point, so I'm not sure whether this is the same thing or if it can help us solve this problem. Any context you can provide here?

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post