Open trych opened 4 years ago
@bastianallgeier any news here? it seems this issue is not only for a code block. we currently try to upgrade our projects to kirby v3 and trying to render editor content via ->blocks()
. inside a structure
the result is always that it renders the JSON structure instead of HTML.
Describe the bug When an editor field is nested within a structure field, I cannot use the code field properly, not even when using the
pretty: false
option as advised elsewhere.I am able to create a code field and enter a code snippet just fine, but when I reload the panel page, the code actually disappears (it's not displayed at all in the editor block, see screenshots).
Before reloading:
After reloading:
(Edit: Also, now I noticed in the panel's console it gives me this error:
block component does not exist: paragraph
).In the content file, the code is now listed like this:
And when I try to use this in my template, using
it renders the literal JSON string like this in the frontend:
Would be great, if I could somehow be able to use code blocks within editor fields within structure fields as well! :)