# 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:** 1

<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, 1:31pm UTC](https://meta.discourse.org/t/javascript-hook-for-composer/137967/1 "2020-01-07T13:31:33Z")

</div>

Hi,  
I had a [previous post](https://meta.discourse.org/t/plugin-example-for-pop-up-auto-completion/128998) that did not get any response, maybe because the request was too narrow. So here I try again: I would like to hook into the compose editor so that when the user types a certain sequence of characters (e.g. --) followed by a query, I can show a popup with search results. Once the user clicks one of those, a normal link is inserted where the query was typed. What is best practise to access the composer element and have my plugin notified once the user composes a post? I had a look at the plugin API and some plugins on GitHub, but could not find any good example.  
Kind regards  
Alexander

---

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