# JavaScript Hook for Composer

**URL:** <https://meta.discourse.org/t/javascript-hook-for-composer/137967>\
**Category:** Development\
**Created:** [January 7, 2020, 1:31pm UTC](https://meta.discourse.org/t/javascript-hook-for-composer/137967 "2020-01-07T13:31:33Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![AlexanderFillbrunn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexanderfillbrunn/32/165671_2.png) [@AlexanderFillbrunn](https://meta.discourse.org/u/AlexanderFillbrunn)\
**Post date:** [January 7, 2020, 2:35pm UTC](https://meta.discourse.org/t/javascript-hook-for-composer/137967/3 "2020-01-07T14:35:06Z")

</div>

Hi @merefield,  
thanks a lot, this is already quite helpful. Just where is the best place to initialize this? Should I check in my plugin’s initializer function whether .d-editor-input element exists and hook it up accordingly, or is there a place to register the plugin as an extension to the compose view, so that it only gets loaded when the user actually opens the composer.  
Kind regards  
Alexander

---

_[View the full topic](https://meta.discourse.org/t/javascript-hook-for-composer/137967)._
