# Deactivate specific markdown options

**URL:** <https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628>\
**Category:** Questions\
**Tags:** v3\
**Created:** [January 3, 2021, 9:23am UTC](https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628 "2021-01-03T09:23:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruno](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bruno/32/6422_2.png) [@bruno](https://forum.getkirby.com/u/bruno)\
**Post date:** [January 3, 2021, 9:23am UTC](https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628/1 "2021-01-03T09:23:46Z")

</div>

I have this line in a textarea field in the panel:

```auto
25. - 30. September 2018
Raum 2.70

```

which renders as:

```auto
<ol start="25">
<li>
<ul>
<li>
<ol start="30">
<li>September 2018<br>
Raum 2.70</li>
</ol>
</li>
</ul>
</li>
</ol>

```

which is of course understandable behavior, but definitely not wanted here.

I know I can use a backslash to escape dots and dashes, but a lot of content is imported from text files so I’d like to avoid manually going through all of it.

But I basically only need kirbytags and line breaks on this specific field type, so is there a way to disable specific formatting options in the markdown parser? Or another approach I could try?

---

<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 3, 2021, 9:55am UTC](https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628/2 "2021-01-03T09:55:12Z")

</div>

I don’t think you can simply deactivate it. I basically see two/three options:

1. A custom `kirbytext()` method that just does the kirbytag parsing without the markdown parsing.
2. A custom markdown component, that doesn’t do any Markdown parsing: [https://getkirby.com/docs/reference/plugins/components/markdown](https://getkirby.com/docs/reference/plugins/components/markdown)
3. Don’t use textarea with Markdown/Kirbytext, but the new blocks field.

---

<div class="post-metadata">

**Author:** ![bruno](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bruno/32/6422_2.png) [@bruno](https://forum.getkirby.com/u/bruno)\
**Post date:** [January 3, 2021, 10:02am UTC](https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628/3 "2021-01-03T10:02:52Z")

</div>

Thanks!  
(2) Is it possible to use a custom markdown component on specific fields only or will this new plugin automatically be applied globally?

---

<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 3, 2021, 10:05am UTC](https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628/4 "2021-01-03T10:05:17Z")

</div>

Good question, don’t know.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [January 3, 2021, 10:10am UTC](https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628/5 "2021-01-03T10:10:18Z")

</div>

No, the custom component would be globally used.

---

<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 3, 2021, 10:11am UTC](https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628/6 "2021-01-03T10:11:15Z")

</div>

I think a custom field method would probably be the best option then.

---

<div class="post-metadata">

**Author:** ![bruno](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/bruno/32/6422_2.png) [@bruno](https://forum.getkirby.com/u/bruno)\
**Post date:** [January 3, 2021, 10:21am UTC](https://forum.getkirby.com/t/deactivate-specific-markdown-options/20628/7 "2021-01-03T10:21:35Z")

</div>

```auto
<?php

Kirby::plugin('bruno/field-methods', [
    'fieldMethods' => [
        'ktNoMarkdown' => function ($field) {
            return nl2br(kirbytags($field->value));
        }
    ]
]);

```

I think this does it for now. Thanks @distantnative & @texnixe!
