Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1911

Text-as with childable cannot work with preserve-blank for component setting

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.0
    • None
    • Configuration
    • None

      For example in lang-addon.xml

      	<component>
      		<component-name>a</component-name>
      		<component-class&gt;org.zkoss.zul.A</component-class&gt;
      		<widget-class&gt;zul.wgt.A</widget-class&gt;
      		<text-as childable="true">label</text-as>
      			<!-- treat text within the element as the label property if no element inside -->
      		<mold>
      			<mold-name>default</mold-name>
      			<mold-uri>mold/a.js</mold-uri>
      			<css-uri>css/a.css.dsp</css-uri>
      		</mold>
      		<preserve-blank/>
      	</component>
      

      And test with the following example,

      <a href="#"> 
      		Inbox 
      		<label class="badge">42</label>
      </a>
      

      The "Inbox" text should add some space between the label component.

            jumperchen jumperchen
            jumperchen jumperchen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: