# Custom textarea button not showing

**URL:** https://forum.getkirby.com/t/custom-textarea-button-not-showing/30596
**Category:** Questions
**Tags:** v4
**Created:** [January 26, 2024, 1:08pm UTC](https://forum.getkirby.com/t/custom-textarea-button-not-showing/30596 "2024-01-26T13:08:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Adrieng](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/adrieng/32/14454_2.png) [@Adrieng](https://forum.getkirby.com/u/Adrieng)
#### Post date: [January 26, 2024, 1:08pm UTC](https://forum.getkirby.com/t/custom-textarea-button-not-showing/30596/1 "2024-01-26T13:08:30Z")

</div>

Hi there,

I’m trying to create a custom textarea button. I just used the sample and it doesn’t work.

The plugin correctly appears in the system panel view.

index.js :

```auto
window.panel.plugin("adrienpayet/panel-text-comments", {
  textareaButtons: {
    highlight: {
      label: "Highlight",
      icon: "wand",
      click: function () {
        this.command("toggle", "<mark>", "</mark>");
      },
      shortcut: "m",
    },
  },
});

```

The blueprint :

```auto
    fields:
      edito:
        type: textarea
        buttons:
          - highlight

```

I also declared the plugin in its index.php :

```auto
<?php

Kirby::plugin('adrienpayet/panel-text-comments', []);

```

Is there any mistake ?

---

<div class="post-metadata">

### Author: ![scottboms](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/scottboms/32/15709_2.png) [@scottboms](https://forum.getkirby.com/u/scottboms)
#### Post date: [January 26, 2024, 5:38pm UTC](https://forum.getkirby.com/t/custom-textarea-button-not-showing/30596/2 "2024-01-26T17:38:15Z")

</div>

The one thing I see that I don’t think is right is that you don’t need `window.panel.plugin...` which should just be `panel.plugin("adrienpayet/panel-text-comments", { ` etc.

There’s an open bug about textareaButtons because if you use them in more than one textarea field in a single blueprint, it causes the page to endlessly spiral.

---

<div class="post-metadata">

### Author: ![derfabifabi](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/derfabifabi/32/10908_2.png) [@derfabifabi](https://forum.getkirby.com/u/derfabifabi)
#### Post date: [February 16, 2024, 3:38pm UTC](https://forum.getkirby.com/t/custom-textarea-button-not-showing/30596/3 "2024-02-16T15:38:19Z")

</div>

I’ve noticed that too.  
As soon as I integrate my custom button, my backend freezes

[I did it exactly the same way](https://getkirby.com/docs/reference/plugins/extensions/textarea-buttons)  
Any Updates on this one?

**edit:**  
The error occurs as soon as more than one text area contains a custom button.  
Think that’s a bug.

---

<div class="post-metadata">

### Author: ![bothworlds](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bothworlds/32/13968_2.png) [@bothworlds](https://forum.getkirby.com/u/bothworlds)
#### Post date: [April 13, 2024, 5:47pm UTC](https://forum.getkirby.com/t/custom-textarea-button-not-showing/30596/4 "2024-04-13T17:47:46Z")

</div>

I was browsing the forum today and found a similar issue, where the Kirby sanitizer needs to be prepared for the custom button.

Maybe it helps someone here:

> [@Custom writer marks in Kirby 4](https://forum.getkirby.com/t/custom-writer-marks-in-kirby-4/31236/2):
>
> The docs should probably mention this. But “unknown” (to Kirby) tags are filtered out by the sanitizer. You can allow tags in your plugin’s index.php \<?php Kirby\Sane\Html::$allowedTags['mark'] = true; Kirby::plugin('mark/eg', [// ...]);

---

<div class="post-metadata">

### Author: ![BennHi](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@BennHi](https://forum.getkirby.com/u/BennHi)
#### Post date: [January 18, 2025, 8:05pm UTC](https://forum.getkirby.com/t/custom-textarea-button-not-showing/30596/5 "2025-01-18T20:05:31Z")

</div>

Has this issue ever been resolved? Anyone found a solution? I’ve just spent hours thinking the issue is me but I am starting to doubt that.

---

<div class="post-metadata">

### Author: ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)
#### Post date: [January 18, 2025, 8:17pm UTC](https://forum.getkirby.com/t/custom-textarea-button-not-showing/30596/6 "2025-01-18T20:17:06Z")

</div>

Could you please post the code you tried? I just tested the code example from the docs, which seems to work fine, at least in Kirby 4.5.0.
