# Using markdown in .txt file

**URL:** <https://forum.getkirby.com/t/using-markdown-in-txt-file/30237>\
**Category:** Questions\
**Tags:** v3\
**Created:** [December 7, 2023, 9:22pm UTC](https://forum.getkirby.com/t/using-markdown-in-txt-file/30237 "2023-12-07T21:22:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![green\_skies](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/green_skies/32/14086_2.png) [@green\_skies](https://forum.getkirby.com/u/green_skies)\
**Post date:** [December 7, 2023, 9:22pm UTC](https://forum.getkirby.com/t/using-markdown-in-txt-file/30237/1 "2023-12-07T21:22:15Z")

</div>

Hi all,

Sorry, I’m aware this might be a simple question but i can’t seem to find answers in the resources or elsewhere online. Is markdown able to be used within a page’s .txt content file? The kirby docs seem like they are implying this, and of course there must be a way to specify bold/italic text, links etc. in the content file but when i use markdown here it comes out in plain text on my site. Is there a specific indicator that needs to be used to make kirby interpret the markdown?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [December 8, 2023, 12:15am UTC](https://forum.getkirby.com/t/using-markdown-in-txt-file/30237/2 "2023-12-08T00:15:23Z")

</div>

Yes, if you use a texterarea field, you put valid standard markdown in the textarea field in the panel. if you use the the `->kirbytext` or the shorthand `->kt` on that feild in the php template, the markdown will get rendered as HTML.

So something like `$page->mytextareafield->kt()` will spit out html if the markdown in that field is valid.

> **[$field-\>kirbytext()](https://getkirby.com/docs/reference/templates/field-methods/kirbytext)**
>
> Converts the field content from Markdown/Kirbytext to valid HTML

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [December 8, 2023, 12:28am UTC](https://forum.getkirby.com/t/using-markdown-in-txt-file/30237/3 "2023-12-08T00:28:07Z")

</div>

But if its just bold / italic / adding a link you are after you might look at the Writer field, as thats wiswyg rather than having to know the mark down or those.

> **[Writer](https://getkirby.com/docs/reference/panel/fields/writer)**
>
> A simple WYSIWYG editor field for inline content with formats like bold, italic, etc.

---

<div class="post-metadata">

**Author:** ![green\_skies](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/green_skies/32/14086_2.png) [@green\_skies](https://forum.getkirby.com/u/green_skies)\
**Post date:** [December 12, 2023, 6:15pm UTC](https://forum.getkirby.com/t/using-markdown-in-txt-file/30237/4 "2023-12-12T18:15:07Z")

</div>

I prefer not to use the panel and haven’t even set it up yet—so if i’m filling in a text-based field in a .txt file, and i use markdown in it, do i just need to add -\>kirbytext to the place in the php template where i call upon that field?

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [December 12, 2023, 6:28pm UTC](https://forum.getkirby.com/t/using-markdown-in-txt-file/30237/5 "2023-12-12T18:28:42Z")

</div>

Yes thats right, that will render the textarea that has markdown / kirbytags and even raw HTML if thats in there too.

You can also use `->kt()` instead which is less typing and does the same as `->kirbytext()`.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [December 12, 2023, 6:31pm UTC](https://forum.getkirby.com/t/using-markdown-in-txt-file/30237/6 "2023-12-12T18:31:53Z")

</div>

On a side note, you can also enable mardown extra in the config which give you more options.

> **[markdown](https://getkirby.com/docs/reference/system/options/markdown)**
>
> Options for the Markdown parser

[https://michelf.ca/projects/php-markdown/extra/](https://michelf.ca/projects/php-markdown/extra/)

---

<div class="post-metadata">

**Author:** ![green\_skies](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/green_skies/32/14086_2.png) [@green\_skies](https://forum.getkirby.com/u/green_skies)\
**Post date:** [December 12, 2023, 6:33pm UTC](https://forum.getkirby.com/t/using-markdown-in-txt-file/30237/7 "2023-12-12T18:33:03Z")

</div>

perfect! thanks so much for your help : )
