Content blocks let you create content that you can share between multiple articles. This is useful for content such as disclaimers or boilerplate text that you want to create once, maintain centrally, and reuse in multiple places.
The reusable content is stored in a content block, which exists independently from article content in the help center. You can use content blocks in any article that is enabled to use them. In this article, regular text refers to any article text that you create that is not in a content block.
Guide admins and agents with permission to update content blocks can edit and update content blocks. When you update a content block, it is automatically updated in the articles in which it is used without impacting the article status.
Agents and Guide admins can work with content blocks.
Enabling content blocks for new articles
The Articles API has certain limitations if content blocks are enabled. See Help Center API limitations with content blocks.
To enable content blocks for new articles
- Create a new article.
- Click Save to activate the content block feature in your article.
You are ready to start reusing content.
37 Comments
Does anyone know if you can use a div in a list item in content blocks? It keeps throwing out my divs of my lists.
Hey Heather Firth,
The anchor element is likely being removed because it would be considered invalid markup. Can you try it with a closing tag and an href attribute i.e:
Edit: I've just become aware that the id attribute will be automatically removed from <a> tags when added manually via the content blocks code editor. I would suggest adding the id to the <h2> tag instead.
UPDATED:
I resolved this issue by using <div> instead. So, this gets around the issue (most likely Zendesk's "unsafe content" filtering):
<div class="alert alert-info">warning text here</div>
*****************************
I am trying to create a content block for a disclaimer we often put on articles. As part of the disclaimer text, I'm trying to use this HTML code:
<aside class="alert alert-info">warning text here</aside>
However, after I save the content block, I find that this HTML code isn't saved and replaced with <p></p>. And actually this seems to be the case with other HTML codes I try to save into a Content Block.
Is this a known issue? I know there's a similar issue with dynamic content. Please let me know if this is a known issue or if I'm doing something wrong, or if there is a workaround. Thanks
Jay Lee have you tried enabling the option to "Display unsafe content" in guide settings. Enabling this option has worked for me in keeping Zendesk from swapping out my completely valid code for "safer" code.
Is there a way to create or update content blocks via API?
As of the moment, we do not have any way to utilize (create & update) the Content Blocks via the Guide API at this time. I can imagine, it would be incredibly helpful.
I would recommend you to leave Feedback in our Community. Our Teams are frequently looking through the posts in order to get ideas on future additions to the Software. The more a votes a post gets, the higher the chance that the feature will be added in the future. Thank you!
When will HTML be supported in content blocks? I agree with some in that it is a blocker for us as we use a lot of custom HTML elements within our articles.
Please sign in to leave a comment.