Kirbytext ignores line breaks

Why is my textarea ignoring line breaks?
I tried to make a break with just “Enter”; with “Shift + Enter” and even with a “< br >”

Textarea in my panel:

Rendered Text on website:

I render it like this:

    <?= $site->imprintText()->kt()->inline() ?>

My site.yml blueprint:

    label: Imprint / Privacy Policy

        width: 1/2
            label: Imprint Text
            type: textarea
              - link
              - email

        width: 1/2
            label: Privacy Policy Text
            type: textarea
              - link
              - email

Inserting a single line
break works, but as soon as I want to insert a double line

break, it is not displaying even a single line break…

Remove inline

already tried to remove it and there is no difference. Also I need the text to be an h4, not a paragraph…

Hey Marcel, it makes a difference whether you use the ->inline() conversion or not, you probably just didn’t see one in the visual output. What you try to achieve doesn’t work well with the defaults of these Kirby fields.

You set a textarea field in Panel which means a rich text field with rendered blocks. This usually renders full block HTML, meaning its own paragraphs etc. Once you convert to inline it removes all the block elements into inline text.

Your expected output can be better created using a Writer field with the inline option being set. See the docs for more infos.

Ensure that your Markdown config options reflect your desired output as well.


Thanks @helloanselm, the writer field works perfectly for me, I was not aware of it yet.