How to modify composer.js file into the plugin directory

Hi
I am writing one plugin named discourse topic curator in which i modified the composer.hbs template file but now i want to modify the composer.js file which is present in below path,
https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/app/controllers/composer.js

i was able to modify composer.js file but i want to ask you that how i can modify this file in the plugin without touching main composer.js file which is present in controllers directory.

i shared my github link below with you
https://github.com/siddhudhangar/discourse-topic-curator

Could anybody help me out how to solve this problem ?

Please anyone help me out for solving this issue ?

You should use the javascript plugin API. If you explain what you’re trying to achieve, I’m sure we can work out the best API method to use.

2 Likes

I created one composer.js.es6 file in the initializers directory in composer.js.es6 file i added save method there and i was able to change some functionality of save method which is defined in composer.js file successfully using api.modifyClass function. Thank you very much @david
for your help.

2 Likes