How to use richtext in multifield (in CQ5 dialog)? (prevent “this.el.dom is undefined” error)

谁说我不能喝 提交于 2019-12-05 19:06:09

I have found a workaround, that does not require changing CQ widget's code. You need to set richtext's destroy event handler, to create dummy this.el.dom:

<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>
<fieldConfig
       jcr:primaryType="cq:Widget"
       height="{Long}100"
       xtype="richtext">
       <listeners
           jcr:primaryType="nt:unstructured"
           destroy="function() {this.el.dom={};}"/>
</fieldConfig>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!