Editor -> Blocks confusion

Hi lovely Kirby community,

I was researching the custom block type functionality in order to add a button block. Then I read that, with the update, editor to block migration should be pretty easy! So I updated :slight_smile:

After updating, existing blog posts on my site render just fine, but when adding additional blocks to them or creating new blog posts entirely, none of the blocks content actually appear on the page.

Here鈥檚 what I鈥檝e done so far.

路 Updated my blueprint:

            label: Introduction
            type: textarea
            label: Content
            type: blocks

路 Updated my template:

<?= $page->text()->toBlocks() ?>

路 Updated the snippets and placed them in site/snippets/blocks/ folder:


路 Deleted site/plugins/editor folder.

The existing .txt content files (that still work!) are formatted like this:


        "attrs": [],
        "content": "Inden for psykologi snakker man om systematiske forvr\u00e6ngninger i menneskets m\u00e5de at g\u00e5 til verden p\u00e5. Med andre ord, s\u00e5 kan den m\u00e5de vi t\u00e6nker om os selv og andre p\u00e5, v\u00e6re disproportional med, hvordan tingene egentlig forholder sig. Disse bliver kaldt for kognitive bias. I litteraturen findes der en hel del bias, men ikke dem alle er lige godt underbygget videnskabeligt. Vi kommer her med 5 bias, som er bredt anerkendt \u2013 og ikke mindst nogle, som vi kan genkende i os selv. Ved at blive opm\u00e6rksomme p\u00e5 nogle af de kognitive vaner vi har, kan vi blive bedre til at se tingene anderledes.",
        "id": "_DmDIB9CtM",
        "type": "paragraph"


While new files (the ones that don鈥檛 work) are formatted like this:

Text: [{"content":{"text":"<p>Tid til en test<\/p>"},"id":"b2350301-a7ce-4812-b4e3-9a1a7dce32ba","isHidden":false,"type":"text"}]

鈥oes the formatting have anything to do with my problem? Or maybe there鈥檚 a different idea out there as to what I鈥檓 missing?

Thank you so much in advance, I can鈥檛 believe the support and curiosity I keep finding in this community!


Add a pretty: true property to your text field in your blueprint and you will get a pretty print of the json formatted content in your textfile.

This will not affect your output, so there is still a problem with your snippets. Reading and implementing this cookbook recipe was very helpful to me: Block factory: Creating your own blocks collection | Kirby CMS