# Markdown in accordion

**URL:** https://forum.getkirby.com/t/markdown-in-accordion/24563
**Category:** Questions
**Created:** [January 25, 2022, 3:52pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563 "2022-01-25T15:52:43Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 3:52pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/1 "2022-01-25T15:52:43Z")

</div>

We installed kirby plugin accordion. [https://github.com/Klickmeister/kirby-panel-accordion](https://github.com/Klickmeister/kirby-panel-accordion)  
There is summary and detailed text.  
I need the detailed text to be in markdown.  
I changed somewhere in the code but it did nothing. 😦

---

<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 25, 2022, 3:53pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/2 "2022-01-25T15:53:42Z")

</div>

Hey, welcome to our forum.

I’m missing some context. What accordion are you referring to? What did you change and where?

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 4:13pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/3 "2022-01-25T16:13:19Z")

</div>

We installed kirby plugin accordion. https://github.com/Klickmeister/kirby-panel-accordion

---

<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 25, 2022, 4:15pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/4 "2022-01-25T16:15:48Z")

</div>

That’s a very old plugin that was created for Kirby 2 and is not compatible with Kirby 3, which I assume you are using?

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 4:19pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/5 "2022-01-25T16:19:40Z")

</div>

3.6.0-rc.2  
But it is working quite well. I only need markdown instead of text…

Question 2: is there something similar instead of Accordion in Kirby 3?

---

<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 25, 2022, 4:26pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/6 "2022-01-25T16:26:24Z")

</div>

I don’t see how that field could possibly work in Kirby 3, it wouldn’t even load because it doesn’t have the obligatory index.php file. And I don’t understand what that field has got to to with markdown, since the whole purpose of this field was to hide/show other fields on click.

> [@petenka](#):
>
> Question 2: is there something similar instead of Accordion in Kirby 3?

Not that I know of, instead of grouping by headlines, you can use tabs in the Panel.

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 4:37pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/7 "2022-01-25T16:37:41Z")

</div>

Maybe our previous programmer was the good one 🙂  
Ok, is here somebody who is familiar with the good old Accordion?

In the YML file, field types are defined, e.g:  
type: writer  
type: text  
I would like to have type: markdown  
but it is not working ☹

---

<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 25, 2022, 4:40pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/8 "2022-01-25T16:40:10Z")

</div>

> [@petenka](#):
>
> I would like to have type: markdown

`Markdown` is not a built-in field type. You can either use the `textarea` field (which is a markdown field) or you can install the `markdown` field plugin which comes with more options.

> **[GitHub - fabianmichael/kirby-markdown-field: Super-sophisticated markdown...](https://github.com/fabianmichael/kirby-markdown-field)**
>
> Super-sophisticated markdown editor for Kirby 3, community built. - GitHub - fabianmichael/kirby-markdown-field: Super-sophisticated markdown editor for Kirby 3, community built.

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 4:41pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/9 "2022-01-25T16:41:13Z")

</div>

I already have that plugin. I can use markdown when writing an article.  
But I want to use it in accordion, too.

---

<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 25, 2022, 4:42pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/10 "2022-01-25T16:42:09Z")

</div>

Maybe you can provide your blueprint for reference, it’s not really clear without code what you are trying to do and where it might go wrong.

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 4:46pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/11 "2022-01-25T16:46:37Z")

</div>

the **textarea** could be a solution for me, but it does not allow DIV tag.  
Can I somehow allow it somewhere?

---

<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 25, 2022, 4:52pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/12 "2022-01-25T16:52:44Z")

</div>

I’m really sorry, but if you don’t answer my questions, it’s hard to be of any help.

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 5:12pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/13 "2022-01-25T17:12:38Z")

</div>

```auto
name: Accordion
wysiwyg: true
fields:
  accordion:
    type: structure
    columns:
      summary:
          width: 1/4
      details:
          width: 2/4
      toggle:
          text: false
    fields:
      summary:
        type: text
        width: 3/4
        placeholder: Add title here
      toggle:
        label: Open on load?
        type: toggle
        default: true
        text:
          - "No"
          - "Yes"
        width: 1/4
      details:
        **type: textarea**
        placeholder: Add hidden text here
        required: true

```

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 5:14pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/14 "2022-01-25T17:14:10Z")

</div>

Now I used **type: textarea**  
that is almost ok if only it allowed DIV tag

---

<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 25, 2022, 5:42pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/15 "2022-01-25T17:42:23Z")

</div>

Ok, so you are using a custom block called accordion and not this old plugin you posted above. Completely different story. That’s why it helps to provide all necessary information.

I don’t see any reason why you shouldn’t be able to use the markdown field in that context though. What exactly is the issue?

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 5:55pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/16 "2022-01-25T17:55:10Z")

</div>

![accordion](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/6/639fb4a449e5092636feb0ab42767f4c33bb6d06.png)

---

<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 25, 2022, 6:05pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/17 "2022-01-25T18:05:31Z")

</div>

I just tested this and works for me, but you probably have to clear the media folder first.

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 6:09pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/18 "2022-01-25T18:09:17Z")

</div>

There are 2 options:

- textarea - works for me almost OK, if only it allowed DIV tag
- markdown - does not work, see the previous image

---

<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 25, 2022, 6:13pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/20 "2022-01-25T18:13:24Z")

</div>

![Bildschirmfoto 2022-01-25 um 19.11.09](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/9/987e874ce1cfa8f97aa6d2f41096c912feb1876d.png)

---

<div class="post-metadata">

### Author: ![petenka](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/petenka/32/11416_2.png) [@petenka](https://forum.getkirby.com/u/petenka)
#### Post date: [January 25, 2022, 6:15pm UTC](https://forum.getkirby.com/t/markdown-in-accordion/24563/21 "2022-01-25T18:15:28Z")

</div>

Thank you, but what does this screenshot mean?  
What is this answer to?

[Next page](https://forum.getkirby.com/t/markdown-in-accordion/24563.md?page=2)
