ComboboxControl convert label to text not pure HTML.
-
<div class=”comment-body markdown-body js-preview-body” style=”min-height: 503px;”><p>Hi, currently I am working on an icon block for Gutenberg.<br>
As we have “ComboboxControl” there is a great feature to build this block simply.<br>
However, a problem that I have is simple I need its label to be respective to HTML; now whatever I put in this “ComboboxControl” as option label convert to a string instead of being pure HTML.<br>
I need the “ComboboxControl” options label to be HTML to show how the icon will be, like a preview.</p>
<p>This is options array:<br>
options={ [ { value: 'person', label: '<i class="icons">person</i>', }, { value: 'event', label: '<i class="icons">event</i>', }, ] }
</p>- This is what happens in the page source:
- This is what it should be:
- This is what should be and should not be:
- The topic ‘ComboboxControl convert label to text not pure HTML.’ is closed to new replies.