I have a dialog with an xtype selection. I'd like to display icons against the options in the list by specifying html in the option text. I've seen it implemented in various places in the CQ dialogs, such as Admitted Groups on the Advanced tab of the page properties dialog, where a user icon is displayed next to the group name (an xtype of authselection?)
I have the following:
<icon jcr:primaryType="cq:Widget" fieldLabel="Icon" name="./icon" type="select" xtype="selection"> <options jcr:primaryType="cq:WidgetCollection"> <none jcr:primaryType="nt:unstructured" text="(none)" value=""/> <icon1 jcr:primaryType="nt:unstructured" text="<span class=\'icon1\'><\/span>Icon 1" value="icon1"/> <icon2 jcr:primaryType="nt:unstructured" text="<span class=\'icon2\'><\/span>Icon 2" value="icon2"/> </options> </icon>
The icon is correctly displayed in the list when the selection is dropped down, but when an option is selected, it displays the html markup in the input field.
<span class='icon1'></span>Icon 1