# FieldFormat plugin for Kibana 7.6

**URL:** https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177
**Category:** Kibana
**Created:** [March 4, 2020, 11:24pm UTC](https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177 "2020-03-04T23:24:46Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jdd1](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jdd1](https://discuss.elastic.co/u/jdd1)
#### Post date: [March 4, 2020, 11:24pm UTC](https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177/1 "2020-03-04T23:24:46Z")

</div>

According to the migration notes, it appears FieldFormats (ui/registry/field\_formats) has been migrated to data.fieldFormats. However, it does not look like the FieldFormatsRegistryProvider has been migrated. Is it possible to still create a custom FieldFormat with a configuration editor? I successfully created a custom FieldFormat with data.fieldFormats. However, when I try to register an editor with FieldFormatsRegistryProvider in that same plugin, it does not appear.

---

<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: [March 5, 2020, 7:51am UTC](https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177/2 "2020-03-05T07:51:09Z")

</div>

Hi @jdd1, the registry for field format editors is not migrated yet. You should be able to use `RegistryFieldFormatEditorsProvider` (`src/legacy/ui/public/registry/field_format_editors.js` ) to register your custom editor component.

You can see how it's used e.g. in `src/legacy/ui/public/field_editor/components/field_format_editor/register.js`

---

<div class="post-metadata">

### Author: ![jdd1](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jdd1](https://discuss.elastic.co/u/jdd1)
#### Post date: [March 5, 2020, 5:18pm UTC](https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177/3 "2020-03-05T17:18:31Z")

</div>

@flash1293, I believe I have tried this. When I add the following code to public/index.js:

```javascript
export class MyFormatEditor extends DefaultFormatEditor {
  static formatId = 'my_field_format';
  constructor(props) { super(props); }
  render() {
    return (<Fragment><div>Test!</div></Fragment);
  }
}

RegistryFieldFormatEditorsProvider.register(()=>MyFormatEditor);

```

It still does not appear. I added some code to \_registry.js to verify that it is actually being called, which it is. I also added some code to print the contents of the current registry, and it appears when I import RegistryFieldFormatEditorsProvider, it is either creating an additional instance or it is being overwritten by the built-in FieldTypes editors.

---

<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: [March 13, 2020, 8:21am UTC](https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177/4 "2020-03-13T08:21:48Z")

</div>

Sounds like it is not ending up in the same bundle as the main Kibana app. If you can share your complete plugin code (e.g. in a Github repo), it would be much easier to help you, even though I understand that's not possible in all cases.

There is no specific [uiExport](https://www.elastic.co/guide/en/kibana/7.6/development-uiexports.html) for field formatters, but using the `visTypes` one should also do the trick. In your custom plugins `Plugin` class, list the file with the format editor under `uiExports.visTypes`:

```auto
      new Plugin({
        id: 'test',
        uiExports: {
          visTypes: ['plugin/test/path/to/format_editor'],
 // ...

```

---

<div class="post-metadata">

### Author: ![jdd1](https://avatars.discourse-cdn.com/v4/letter/j/f07891/32.png) [@jdd1](https://discuss.elastic.co/u/jdd1)
#### Post date: [March 16, 2020, 10:33pm UTC](https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177/5 "2020-03-16T22:33:27Z")

</div>

@flash1293, I'm not sure entirely where I'm supposed to put this? I'm trying to use the new plugin construct (/public/index.ts, /public/plugin.ts), so I don't know where this belongs.

---

<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: [March 16, 2020, 11:18pm UTC](https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177/6 "2020-03-16T23:18:29Z")

</div>

Hi @jdd1,

That explains the problem - as the field format editors are still in the legacy platform, you can’t call them from the new platform (using plugin.ts and kibana.json).

You either have to wait till they are migrated to the new platform or use a separate plugin in the legacy plugin format to register the editor till then.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 13, 2020, 11:18pm UTC](https://discuss.elastic.co/t/fieldformat-plugin-for-kibana-7-6/222177/7 "2020-04-13T23:18:37Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
