Closed danielsefton closed 2 months ago
Do you have a replication case where a paste wouldn't update the model since the change
event should fire on paste
so not sure this event is needed. Could you setup a codepen or codesandbox where this issue can be reproduced. Thanks
At the moment I don't have much time to put together a reproducable example, so it's take it or leave it really.
It makes no sense to me that you say it should fire on paste by default. Why would it fire on paste if it's not added to modelEvents? Why have paste as an option for modelEvents in the first place? All I know is that unless I added that to modelEvents the paste event did not fire and caused a lot of confusion.
The form validation storybook seems to show that paste events trigger form changes.
I'm closing this PR as per my previous comment seems to be true.
@danielsefton Feel free to comment here if the problem persists or if you have a replication case.
Also, to explain why there is a separate paste event: there may be a case where you may not want all events that encompass the default change
event (which includes paste).
Since the paste plugin is now built-in to TinyMCE core, I believe this should be a default value in modelEvents. Otherwise it causes a lot of confusion as to why the angular form validation fails and prevents submission when pasting content into the editor.