Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 2, 2015

[RICHTEXT] How to process richtext value before it is submitted, richtext adds spacing on a empty tag automatically

The richtext will automatic add a spacing in a empty tag. Given that, if we input: <div class="content border-b"><div class="thumbnail"><span class="icon-phone"></span></div></div> richtext will chage it to: <div class="content border-b"><div class="thumbnail"><span class="icon-phone">&nbsp</span></div></div> In some case, we don’t want that. The solution: We will add a listener for richtext field to process the value before submit to CRX. Config: <teasertext                        jcr:primaryType="cq:Widget"                        fieldLabel="Teaser Text"                        name="./teasertext"                        removeSingleParagraphContainer="{Boolean}true"                        xtype="richtext">                        <rtePlugins

[DIALOG] REUSING TABS OR FIELDS FROM AN EXISTING DIALOG WITH CQINCLUDE

How to reuse existing dialog elements in other dialogs Given that we have a dialog: <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"    jcr:primaryType="cq:Dialog"    xtype="dialog">    <items        jcr:primaryType="cq:Widget"        xtype="tabpanel">        <items jcr:primaryType="cq:WidgetCollection">            <cta                jcr:primaryType="cq:Panel"                title="CTA">                <items jcr:primaryType="cq:WidgetCollection">                 <background                        jcr:primaryType="cq:Widget"                        fieldLabel="Background Color"                        name="./background"                        fieldDescription="