can you please tell me how i use composer in my nodebb plugin.

$("#composer").on('click', function(event){ require(['composer'], function(composer) { composer.newTopic({ cid: "", title: '', body: "", tags: [] }); });

i'm doing this. i'm getting the error

resize.js?v=m7k4h3q8uhk:30 Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined