How to access content in panel? blueprint?

Hello everybody

I need some help with access content in kirby cms latest version.

I have thousands of pages that have a field which is stored like this


----

Text:

[{"attrs":[],"content":"<p><p><p><iframe width=\"560\" height=\"315\" src=\"\/\/www.youtube.com\/embed\/v+i+d+e+o\" frameborder=\"0\" allowfullscreen><\/iframe><\/p><\/p><br\/><p>here is a paragraph.<\/p><\/p>","id":"_3ia4t26gy","type":"raw-html"}]

----

and I created a new field called raw-html like this


name: Raw-html
icon: code
wysiwyg: true
fields:
  content:
    label: Raw-html
    type: writer
    placeholder: Enter some text…

but in the panel the field is always empty and if I add & save something then it saved like this


----

Text: [{"content":{"content":"<p>test</p>"},"id":"a06745a4-9fb9-42d1-9c86-8889c41d6e3f","isHidden":false,"type":"raw-html"}]

----

my question is how can I access to the content of this
[{"attrs":[],"content":"<p><p><p><iframe width=\"560\" height=\"315\" src=\"\/\/www.youtube.com\/embed\/v+i+d+e+o\" frameborder=\"0\" allowfullscreen><\/iframe><\/p><\/p><br\/><p>here is a paragraph.<\/p><\/p>","id":"_3ia4t26gy","type":"raw-html"}]
in the panel with ability to modify the content? because I have thousands of field like this

sorry for my bad english, I’m beginner with kirby and php :sweat_smile:
Thanx

This looks like a blocks field with a custom block type to me.

Did you create a block snippet for this new block type yet?

Thank you for a quick reply

No, I don’t have now a snippet for it
actually I want to be able to see & edit raw-html which are already stored like this from the panel.
is the snippets what I’m looking for?

Each custom block consists of a block blueprint for the Panel, and a block snippet in /site/snippets/blocks/… to render the block in the frontend (and an optional Vue preview to render a preview in the Panel). See Custom blocks | Kirby CMS

Inside this block snippet, you would access this content field via $block->content().