Warum verwendet Discourse GIFs TC nicht toolbarEvent beim Hinzufügen des GIFs?

I was looking at the gifs TC yesterday, and I noticed this block of code:

Where it uses the appEvents service. The thing is, why can’t toolbarEvent be passed in at the action?

I’ve tried it and it seems to work. Was there a reason why that was not used?

Considering it uses TextManipulation under the hood, there seems to be a insertText method.

Just curious.

Thanks.

Digging a bit further, I found this line:

So… the app event still performs the same as textManipulation? What would be the added advantage in the TC?

Anyone has any ideas? I’m considering the appEvent versus toolbarEvent, and knowing the differences (if any) would be helpful.

I think discourse-gifs does it like this because the Modal is also launched from outside the toolbar:

If your new thing is entirely toolbar-based, then I agree toolbarEvents is the cleaner way to go :ok_hand: