컴포저에서 카테고리가 변경될 때마다 함수를 트리거하는 방법

I think GitHub - discourse/discourse-custom-composer-placeholders · GitHub may work as an example of how to do that.
It changes the placeholder in the composer based on the category and also works when you change it.