Medium Text Editor - Input / Update / Change Text Event

Hi,

I am using a text area medium text editor and would like to capture the input/update/change event when user makes any changes to the text.
I tried using the data > changed etc events on the TEXTAREA which gets converted to medium editor in runtime, but it didn’t invoke. Update event did work, but it kept calling it in a loop or something continuously.

Is there a way to reliably capture the event when user has modified the text inside a medium editor?

Seems that the event is indeed incorrect, the changed event doesn’t exist and the updated event triggers each time app connect data updates. Will fix these events.

Here an update for the updated and changed event, it should trigger correctly now.

dmxMediumEditor.zip (6.1 KB)

1 Like

Both events now getting invoked.

One issue though: I have set the value of text area to come from server connect dmx-bind.
On update of server connect, this bound field data changes in the DB, causing the changed/updated event to be fired, even though no data was directly input here.

I think an input event would be better suited such use case. Would that be possible to configure too?

The changed event should do this. The medium editor doesn’t have an input event, we subscribe to the editableinput event of the editor and the changed event should only trigger on that event. The updated event should trigger each time the value is being updated.

I tried both update and changed. But they seem to be working as same.
Change is also getting triggered when value in server connect changes.
Can you please check?

It seems that the medium editor triggers editableInput always when content changes, also if it is done via JavaScript. Trying to find a workaround, but don’t see any other event that could help.

Thanks for the update. Have put in a ternary condition using a flag variable as a workaround for now.
Hope you can find a solution.

Have an other update. The updated event still triggers the same, but filtered out a bit for the changed event. It should now only trigger on user interaction.

dmxMediumEditor.zip (6.1 KB)

1 Like

This seems to be working well for me now. Thanks a lot. :slight_smile: