May 3, 2020
Estimated Post Reading Time ~

Handling richtext in multifield - AEM

Solution 1:
1) Overlay /libs/cq/ui/widgets/source/widgets/form/RichText.js 
2) In the overlaid file, at Line 910;  replace (a) by (b)
(a) this.el.dom.value = html;
(b) if(this.el.dom){this.el.dom.value = html;} 

Solution 2:
You need to set richtext's destroy event handler, to create dummy this.el.dom as shown below:

<myField
    jcr:primaryType="cq:Widget"
    name="./myField"
    xtype="multifield">
    <fieldConfig
        jcr:primaryType="cq:Widget"
        xtype="richtext">
        <listeners
            jcr:primaryType="nt:unstructured"
            destroy="function() {this.el.dom={};}"/>
    </fieldConfig>
</myField>



By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.