# Using EUI inside FieldFormatter plugin

**URL:** <https://discuss.elastic.co/t/using-eui-inside-fieldformatter-plugin/214032>\
**Category:** Kibana\
**Created:** [January 7, 2020, 11:06am UTC](https://discuss.elastic.co/t/using-eui-inside-fieldformatter-plugin/214032 "2020-01-07T11:06:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [January 7, 2020, 11:22am UTC](https://discuss.elastic.co/t/using-eui-inside-fieldformatter-plugin/214032/2 "2020-01-07T11:22:16Z")

</div>

Hi @Elaak,

Field formatters don't expose a `render` function of some kind that would be necessary to implement something like this in a clean way. You just return the HTML, it's not possible to attach event handlers to your HTML elements that would allow you to react to a click to do something like opening a popup. However you can work around by this by a global event handler and a data-attribute on your button. Then you can intercept all clicks to all buttons and trigger your action if the clicked element includes the data attribute. I answered a similar question here: [Run script inside hmtl of field formatter](https://discuss.elastic.co/t/run-script-inside-hmtl-of-field-formatter/205805)

In your case the script wouldn't trigger an HTTP call, but render a react element using ReactDOM.render.

Let me know whether that helps!

---

_[View the full topic](https://discuss.elastic.co/t/using-eui-inside-fieldformatter-plugin/214032)._
