0 Replies Latest reply on May 14, 2013 10:01 AM by GaryHomewood

    Add html to xtype:selection options

    GaryHomewood

      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="&lt;span class=\'icon1\'>&lt;\/span>Icon 1"
                           value="icon1"/>
                      <icon2
                           jcr:primaryType="nt:unstructured"
                           text="&lt;span class=\'icon2\'>&lt;\/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
      
      

       

      Any workarounds?