Highlighted

onChange for RichText

AndreiUifi

07-11-2017

How to do the onchange for the richtext?

I did it like this but i doesn't work

<someField
   jcr:primaryType="cq:Widget"
   allowBlank="true"
   name="./someField"
   xtype="richtext">
  <rtePlugins
   jcr:primaryType="nt:unstructured">
  <subsuperscript
   jcr:primaryType="nt:unstructured"
   features="[subscript,superscript]"/>
  </rtePlugins>
  <listeners
   jcr:primaryType="nt:unstructured"
   change="function() {console.log('success')}"
   />
</someField>

Replies

Highlighted
Highlighted

mjb54261515

07-11-2017

In classic UI  change  exits. pls use correct method paramentes to work.

change : ( CQ.Ext.form.Field this, Mixed newValue, Mixed oldValue )

Fires just before the field blurs if the field value has changed.Listeners will be called with the following arguments:
  • this : CQ.Ext.form.Field
  • newValue : MixedThe new value
  • oldValue : MixedThe original value

1343294_pastedImage_1.png

CQ5 | Widgets API