What is your expected output? Why do you want additional br tags? The correct way to render your content is with simply using kirbytext() not in combination with anything else.
For my client, I want the front-end to behave as close as possible to the render of the text in the panel :
carriage return in the panel -> carriage return in the front-end
line break in the panel -> line break in the front-end
Line feeds work by adding three spaces after a line (or enabling markdown breaks), but not between block elements. It’s not a good idea to enforce margins by adding line breaks, anyway.
Is it possible to get a version of text through kirbytext() that doesn’t contain actual line-breaks in the code so I can use it for Jquery?
I want to use it like in the upper part of the picture.
but it always turns out to look like in the lower part of the picture when I check the web inspector, the code is disturbed and it won’t work…