Code indentation issue in structure field

Hi all,

I’m testing for my small writing and coding class, but the code indentation in structure filed is not working.

My blueprint is:

slides:
  label: Slides
  type: structure
  fields:
     text:
       label: Text
       type: textarea

I want to make presentations with this. So code example can be in the text field in the structure field. My expect is:

<html>
  <head></head>
  <body></body>
</html>

But the result is:

<html>
<head></head>
<body></body>
</html>

Anyone know about this issue?

That is a known issue that we can’t solve: [Panel] Textarea in structure field: Spaces are deleted on save. · Issue #1308 · getkirby/kirby · GitHub

How about using a nested blocks field instead?

Thanks a lot. I checked the link. I got it, but I still think Kirby is all-round. I will try alternative ways.