You are viewing limited content. For full access, please sign in.

Question

Question

Change Event on Rich Text Field

asked on February 13, 2023

I haven't used the Rich Text Field very much, and I have one that I need to use, and need to have some Javascript triggered from any changes on the Rich Text Field.  I'm having a hard time getting it to work.

Forms Version 11.0.2212.30907 on Classic Designer.

Does anyone have any experience making this work?

None of these options worked: 

  $('#q52').change(function() {
    console.log('changed');
  });
  $('#Field52').change(function() {
    console.log('changed');
  });
  $('#RTFEditor-Field52').change(function() {
    console.log('changed');
  });

 

Is there something obvious I'm missing?  Does this field not have the event listeners set-up?

Thank you!

0 0

Answer

SELECTED ANSWER
replied on February 13, 2023

This isn't perfect, but it works for my needs.  It identifies if any keypress (more specifically keyup) events happen in the field. 

  $("#RTFEditor-Field52").wysiwyg();
  $('#RTFEditor-Field52').wysiwyg('document').keyup(function(e) {
    console.log('changed');
  });

 

Obviously, the Field00 number will be different based on individual forms.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.