Recent searches
No recent searches
Content block ability to use html attributes and to nest elements
Posted Feb 09, 2023
It's great that we have the content block feature to support single-use content. However, it's annoying that you can't use the content block editor much like the articles editor, nest HTML elements, and apply HTML attributes.
Some examples of the things that get removed from content blocks after I save. (In some circumstances, there's no warning. It just deletes the code!)
<h2><a id="title">TITLE</a></h2>: RESULT AFTER SAVING: <h2>TITLE</h2>
Can't use classes on anything other than divs.
<p class="tip">Use this tip.</p>: RESULT AFTER SAVING: <p>Use this tip.</p>
Ordinary procedure with a div as a note to highlight the step:
<ol>
<li>You must do this action.
<div class="caution">
<ul>
<li>Caution! Make sure you...
</li>
</ul>
</div>
</li>
<li>Then you do this.
</li>
</ol>
Results in list being slipt out so number is started again:
<ol>
<li>You must do this action.
</li>
</ol>
<div class="caution">
<ul>
<li>Caution! Make sure you...
</li>
</ul>
</div>
<ol>
<li>Then you do this.
</li>
</ol>
Example with the div outside of the list item
<ol>
<li>You must do this action.
</li>
<li>Then you do this.
</li>
<div class="caution">
<ul>
<li>Caution! Make sure you...
</li>
</ul>
</div>
</ol>
Just deletes the last div, no warning:
<ol>
<li>You must do this action.
</li>
<li>Then you do this.
</li>
</ol>
5
7 comments
Libby Tooke-Mitchell
I am also trying to add formatting such as accordions to my content blocks and it won't let me.
While it's great that the exist and I seem not to have to enable them on every article individually any more it would be better if they could support some more formatting options such as callouts, accordions, button links and formatted tables.
0
Grace K
I'm also running into this issue. Some of the content we want to make into content blocks uses HTML tags like <span> that get stripped out of the content block editor.
0
Katarzyna Karpinska
While it is true that the content block's editor does not allow for as many HTML tags as article one we plan to balance it in the future by providing more out-of-the-box advanced HTML components. tables are first in line.
1
Alan Blair
Katarzyna Karpinska Fantastic news! The lack of table support has been a real barrier to us implementing content blocks.
Code support for blockquotes would also be amazing as we use these to highlight important points, etc, with the styles being delivered through class declarations in styles.css file.
0
Lyn Thompson
Hello,
Is there any updates as to when we can have tables added? Also, it would be great if we could use CSS classes to format the articles rendering. (For example, we use lightbox code to make our images clickable.)
0
Don
Katarzyna Karpinska For content blocks, we still need the ability to add classes and other HTML attributes like classes and style, in order to add custom in-house classes.Right now it only allows plain <p> and <span> tag. Can't do any in-house customization. This is severely limiting content block usage. We should have the same HTML capabilities as the HTML editor in an article. We have an upcoming project where a content block could have helped update many articles at once, but we just found out that we can't.
Before anyone mentions it, yes 'Display unsafe content' is setting is enabled for our knowledgebase.
0
Katarzyna Karpinska
Don, we'll be working on bringing this parity early in '24.
1